interface ShapeLibraryPaletteProps {
    canvasStrokeWidth?: number;
    dataGenerator?: DataGeneratorFunction<ObjectData>;
    dragSize?: Size;
    fill?: string;
    iconSize?: Size;
    initialSet?: string;
    outline?: string;
    paletteStrokeWidth?: number;
    selectAfterDrop?: boolean;
    shapeLibrary: ShapeLibraryImpl<ObjectData>;
    showAllMessage?: string;
    surface: Surface;
}

Properties

canvasStrokeWidth?: number

Stroke width to use for shapes dropped on canvas. Defaults to 2.

dataGenerator?: DataGeneratorFunction<ObjectData>

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.

dragSize?: Size

Optional size to use for dragged elements.

fill?: string

Optional fill color to use for dragged elements. This should be in RGB format, not a color like 'white' or 'cyan' etc.

iconSize?: Size

Optional size to use for icons.

initialSet?: string

ID of the initial set to show, if any. When you have multiple shapes in a set you may want the palette to open up showing just one set.

outline?: string

Optional color to use for outline of dragged elements. Should be in RGB format.

paletteStrokeWidth?: number

Stroke width to use for shapes in palette. Defaults to 1.

selectAfterDrop?: boolean

When true (which is the default), a newly dropped vertex will be set as the underlying Toolkit's selection.

shapeLibrary: ShapeLibraryImpl<ObjectData>

The shape library to render.

showAllMessage?: string

Message to use for the 'show all' option in the shape set drop down when there is more than one set of shapes. Defaults to Show all.

surface: Surface

Surface to attach the drag/drop to.

Version :