Manager for automatically saving diagrams. The save hook must be implemented.
var mgr = new mxAutoSaveManager(editor.graph); mgr.save = function() { mxLog.show(); mxLog.debug('save'); };
mxAutoSaveManager | Manager for automatically saving diagrams. |
Functions | |
mxAutoSaveManager | Constructs a new automatic layout for the given graph. |
Variables | |
graph | Reference to the enclosing mxGraph. |
autoSaveDelay | Minimum amount of seconds between two consecutive autosaves. |
autoSaveThrottle | Minimum amount of seconds between two consecutive autosaves triggered by more than <autoSaveThreshhold> changes within a timespan of less than autoSaveDelay seconds. |
autoSaveThreshold | Minimum amount of ignored changes before an autosave. |
ignoredChanges | Counter for ignored changes in autosave. |
lastSnapshot | Used for autosaving. |
enabled | Specifies if event handling is enabled. |
changeHandler | Holds the function that handles graph model changes. |
Functions | |
isEnabled | Returns true if events are handled. |
setEnabled | Enables or disables event handling. |
setGraph | Sets the graph that the layouts operate on. |
save | Empty hook that is called if the graph should be saved. |
graphModelChanged | Invoked when the graph model has changed. |
reset | Resets all counters. |
destroy | Removes all handlers from the graph and deletes the reference to it. |
mxAutoSaveManager.prototype.graph
Reference to the enclosing mxGraph.
mxAutoSaveManager.prototype.autoSaveThrottle
Minimum amount of seconds between two consecutive autosaves triggered by more than <autoSaveThreshhold> changes within a timespan of less than autoSaveDelay seconds. Eg. a value of 1 (s) means the graph is not stored more than once per second even if there are more than autoSaveThreshold changes within that timespan. Default is 2.
mxAutoSaveManager.prototype.isEnabled = function()
Returns true if events are handled. This implementation returns enabled.
mxAutoSaveManager.prototype.setEnabled = function( value )
Enables or disables event handling. This implementation updates enabled.
enabled | Boolean that specifies the new enabled state. |
mxAutoSaveManager.prototype.destroy = function()
Removes all handlers from the graph and deletes the reference to it.
Constructs a new automatic layout for the given graph.
function mxAutoSaveManager( graph )
Reference to the enclosing mxGraph.
mxAutoSaveManager.prototype.graph
Minimum amount of seconds between two consecutive autosaves.
mxAutoSaveManager.prototype.autoSaveDelay
Minimum amount of seconds between two consecutive autosaves triggered by more than autoSaveThreshhold changes within a timespan of less than autoSaveDelay seconds.
mxAutoSaveManager.prototype.autoSaveThrottle
Minimum amount of ignored changes before an autosave.
mxAutoSaveManager.prototype.autoSaveThreshold
Counter for ignored changes in autosave.
mxAutoSaveManager.prototype.ignoredChanges
Used for autosaving.
mxAutoSaveManager.prototype.lastSnapshot
Specifies if event handling is enabled.
mxAutoSaveManager.prototype.enabled
Holds the function that handles graph model changes.
mxAutoSaveManager.prototype.changeHandler
Returns true if events are handled.
mxAutoSaveManager.prototype.isEnabled = function()
Enables or disables event handling.
mxAutoSaveManager.prototype.setEnabled = function( value )
Sets the graph that the layouts operate on.
mxAutoSaveManager.prototype.setGraph = function( graph )
Empty hook that is called if the graph should be saved.
mxAutoSaveManager.prototype.save = function()
Invoked when the graph model has changed.
mxAutoSaveManager.prototype.graphModelChanged = function( changes )
Resets all counters.
mxAutoSaveManager.prototype.reset = function()
Removes all handlers from the graph and deletes the reference to it.
mxAutoSaveManager.prototype.destroy = function()