Palette extends the Diagram class to allow objects to be dragged and placed onto other Diagrams. Its Diagram.layout is a GridLayout. The Palette is Diagram.isReadOnly but to support drag-and-drop its Diagram.allowDragOut is true.
For more discussion, see Introduction to Palettes. See samples that make use of Palettes in the samples index.
You can control the order of Parts in the palette in several manners:
myPalette.model.nodeDataArray
myPalette.layout.sorting = go.GridLayout.Forward
myPalette.layout.comparer
A reference to a div or its ID as a string.
Palette extends the Diagram class to allow objects to be dragged and placed onto other Diagrams. Its Diagram.layout is a GridLayout. The Palette is Diagram.isReadOnly but to support drag-and-drop its Diagram.allowDragOut is true.
For more discussion, see Introduction to Palettes. See samples that make use of Palettes in the samples index.
You can control the order of Parts in the palette in several manners:
myPalette.model.nodeDataArray
, just setmyPalette.layout.sorting = go.GridLayout.Forward
(GridLayout.sorting).myPalette.layout.comparer
(GridLayout.comparer).