Skip to main content

Home > @jsplumbtoolkit/browser-ui > ShapeLibraryPaletteOptions > dataGenerator

ShapeLibraryPaletteOptions.dataGenerator property

Optional data generator to allow you to specify initial data for some element to be dragged. Note that you cannot override the object's type with this function. The palette will set the new object's type to match the type of the element that the user is dragging from the palette.

Signature:

dataGenerator?: DataGeneratorFunction<T>;