Browse Source
Document um.skip (#5852)
Add docblock
Co-authored-by: Stefano <stefano@burken.lan>
pull/5899/head
Stefano Azzalini
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
8 additions and
0 deletions
-
src/undo_manager/index.ts
|
|
|
@ -321,6 +321,14 @@ export default class UndoManagerModule extends Module<UndoManagerConfig & { name |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Execute the provided callback temporarily stopping tracking changes |
|
|
|
* @param clb The callback to execute with changes tracking stopped |
|
|
|
* @example |
|
|
|
* um.skip(() => { |
|
|
|
* // Do stuff without tracking
|
|
|
|
* }); |
|
|
|
*/ |
|
|
|
skip(clb: Function) { |
|
|
|
const isTracking = !!this.um.isTracking(); |
|
|
|
|
|
|
|
|