Memento plugin constructor for Sketchable instances.
- Source:
Methods
(static) redo() → {Sketchable}
Goes forward to the previous CANVAS state, if available.
- Source:
Example
sketchableInstance.memento.redo();
(static) restore(state) → {Sketchable}
Restore a CANVAS state.
- Source:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
state |
object
|
State data.
|
Example
var someState = sketchableInstance.memento.state();
sketchableInstance.memento.restore(someState);
(static) save() → {Sketchable}
Save a snapshot of the current CANVAS.
- Source:
Example
sketchableInstance.memento.save();
(static) state() → {object}
Read current CANVAS state: { image:String, strokes:Array }
.
- Source:
Returns:
- Type:
-
object
Example
var state = sketchableInstance.memento.state();
(static) undo() → {Sketchable}
Goes back to the previous CANVAS state, if available.
- Source:
Example
sketchableInstance.memento.undo();