Static
cellsHolds the array of Cell 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.
Static
copyCopies the given array of Cell from the specified graph to cells. Returns the original array of cells that has been cloned. Descendants of cells in the array are ignored.
AbstractGraph that contains the cells to be copied.
Optional
cells: Cell[]Optional array of Cell to be copied.
Static
cutCuts the given array of Cell from the specified graph.
If cells is null
then the selection cells of the graph will be used.
AbstractGraph that contains the cells to be cut.
Optional array of Cell to be cut.
Returns the cells that have been cut from the graph.
Static
getReturns the cells in the clipboard.
Static
isReturns true
if the clipboard currently has no data stored.
Static
pastePastes the Cells into the specified graph associating them to the default parent. The cells are added to the graph using AbstractGraph.importCells and returned.
AbstractGraph to paste the Cells into.
Static
removeHook to remove the given cells from the given graph after a cut operation.
AbstractGraph that contains the cells to be cut.
Array of Cell to be cut.
Static
setSets the cells in the clipboard. Fires a InternalEvent.CHANGE event.
Singleton that implements a clipboard for graph cells.
To copy the selection cells from the graph to the clipboard and paste them into graph2, do the following:
For fine-grained control of the clipboard data the AbstractGraph.canExportCell and AbstractGraph.canImportCell functions can be overridden.
To restore previous parents for pasted cells, the implementation for copy and paste can be changed as follows.