UndoRedoService
Undo-redo service.
Definition
Package:@progress/kendo-react-diagram
Properties
options
any
Configuration options for the observable instance.
Methods
Standard addition of a unit. See also the batch version; begin-addCompositeUnit-commit methods.
The unit to be added.
execute?booleanIf false, the unit will be added but not executed.
Adds a unit as part of the begin-commit batch.
Starts the collection of units. Add those with the addCompositeItem method and call commit. Or cancel to forget about it.
Binds event handlers to one or more events.
The event name(s) to bind to, or an object mapping event names to handlers
handlers?EventHandlersThe event handler(s) to bind. Can be a function or an object mapping event names to handlers
one?booleanIf true, the handler will be executed only once and then automatically unbound
Returns:this
The Observable instance for method chaining
Cancels the collection process of unit started with 'begin'.
Clears the stack.
Commits a batch of units.
Gets the number of undoable units in the stack.
number
The number of undoable units.
Destroys the observable instance and removes all event handlers. This method should be called when the observable is no longer needed to prevent memory leaks.
Binds event handlers to be executed first (prepends to the handlers list). These handlers will be called before any previously bound handlers for the same event.
The event name(s) to bind to
handlersEventHandlersThe event handler(s) to bind
Returns:this
The Observable instance for method chaining
Binds event handlers that will be executed only once. After execution, the handlers are automatically unbound.
The event name(s) to bind to
handlersEventHandlersThe event handler(s) to bind
Returns:this
The Observable instance for method chaining
Redo of the last undone action.
Triggers an event, calling all bound handlers for that event.
The name of the event to trigger
eventArgs?anyOptional event arguments to pass to the handlers
Returns:boolean
True if any handler called preventDefault(), false otherwise
Removes event handlers from events.
The event name to unbind from. If undefined, all events are unbound
handler?EventHandlersThe specific handler to remove. If undefined, all handlers for the event are removed
Returns:this
The Observable instance for method chaining
Rollback of the unit on top of the stack.