Static
cellsHolds the array of mxCell currently in the clipboard.
Static
insertCounts the number of times the clipboard data has been inserted.
Static
STEPSIZEDefines the step size to offset the cells after each paste operation. Default is 10.
Static
copyStatic
cutStatic
getStatic
isStatic
pastePastes the cells into the specified graph restoring the relation to parents, if possible. If the parents are no longer in the graph or invisible then the cells are added to the graph's default or into the swimlane under the cell's new location if one exists. The cells are added to the graph using graph.importCells and returned.
Static
removeStatic
setSets the cells in the clipboard. Fires a mxEvent.CHANGE event.
Singleton that implements a clipboard for graph cells.
Example:
This copies the selection cells from the graph to the clipboard and pastes them into graph2.
For fine-grained control of the clipboard data the graph.canExportCell and graph.canImportCell functions can be overridden.
To restore previous parents for pasted cells, the implementation for copy and paste can be changed as follows.