copy

creates a copy of a shape at the defined position

void copy(string|number id,number index, [object target] );

Parameters

idstring|numberthe id of a shape to copy
indexnumberthe index to create a copy at
targetobjectoptional, the target data collection object

Example

diagram.data.copy("4",5); // copies the shape with id=4 to the position with index 5

See also
  • API
  • Back to top