Palette class

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:

  • If you want to keep the order given by myPalette.model.nodeDataArray, just set myPalette.layout.sorting = go.GridLayout.Forward (GridLayout#sorting).
  • If you want to sort based on some text string associated with each Part, just bind Part#text.
  • If you want to sort more generally, set myPalette.layout.comparer (GridLayout#comparer).
Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

Palette.$1()
factory
Palette.$2([dynamic init])
factory
Palette.$3([Object? div, dynamic init])
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited