Class Palette

GoJS® Diagramming Components
version 3.0.1
by Northwoods Software®

Hierarchy

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.GridSorting.Forwards (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).
Index

Constructors

Accessors

Diagram.allowClipboard Diagram.allowCopy Diagram.allowDelete Diagram.allowDragOut Diagram.allowDrop Diagram.allowGroup Diagram.allowHorizontalScroll Diagram.allowInsert Diagram.allowLink Diagram.allowMove Diagram.allowRelink Diagram.allowReshape Diagram.allowResize Diagram.allowRotate Diagram.allowSelect Diagram.allowTextEdit Diagram.allowUndo Diagram.allowUngroup Diagram.allowVerticalScroll Diagram.allowZoom Diagram.animationManager Diagram.autoScale Diagram.autoScrollInterval Diagram.autoScrollRegion Diagram.click Diagram.commandHandler Diagram.contentAlignment Diagram.contextClick Diagram.contextMenu Diagram.currentCursor Diagram.currentTool Diagram.defaultCursor Diagram.defaultScale Diagram.defaultTool Diagram.div Diagram.documentBounds Diagram.doubleClick Diagram.firstInput Diagram.fixedBounds Diagram.grid Diagram.groupSelectionAdornmentTemplate Diagram.groupTemplate Diagram.groupTemplateMap Diagram.handlesDragDropForTopLevelParts Diagram.hasHorizontalScrollbar Diagram.hasVerticalScrollbar Diagram.highlighteds Diagram.initialAutoScale Diagram.initialContentAlignment Diagram.initialDocumentSpot Diagram.initialPosition Diagram.initialScale Diagram.initialViewportSpot Diagram.isEnabled Diagram.isModelReadOnly Diagram.isModified Diagram.isMouseCaptured Diagram.isReadOnly Diagram.isTreePathToChildren Diagram.lastInput Diagram.layers Diagram.layout Diagram.linkSelectionAdornmentTemplate Diagram.linkTemplate Diagram.linkTemplateMap Diagram.links Diagram.maxScale Diagram.maxSelectionCount Diagram.minScale Diagram.model Diagram.mouseDragOver Diagram.mouseDrop Diagram.mouseEnter Diagram.mouseHold Diagram.mouseHover Diagram.mouseLeave Diagram.mouseOver Diagram.nodeSelectionAdornmentTemplate Diagram.nodeTemplate Diagram.nodeTemplateMap Diagram.nodes Diagram.opacity Diagram.padding Diagram.parts Diagram.position Diagram.positionComputation Diagram.renderer Diagram.routers Diagram.scale Diagram.scaleComputation Diagram.scrollHorizontalLineChange Diagram.scrollMargin Diagram.scrollMode Diagram.scrollVerticalLineChange Diagram.scrollsPageOnFocus Diagram.selection Diagram.skipsUndoManager Diagram.themeManager Diagram.toolManager Diagram.toolTip Diagram.undoManager Diagram.validCycle Diagram.viewSize Diagram.viewportBounds Diagram.zoomPoint

Methods

Diagram.add Diagram.addChangedListener Diagram.addDiagramListener Diagram.addLayer Diagram.addLayerAfter Diagram.addLayerBefore Diagram.addModelChangedListener Diagram.alignDocument Diagram.attach Diagram.centerRect Diagram.clear Diagram.clearHighlighteds Diagram.clearSelection Diagram.commit Diagram.commitTransaction Diagram.computeBounds Diagram.computeMove Diagram.computePartsBounds Diagram.copyParts Diagram.delayInitialization Diagram.ensureBounds Diagram.findLayer Diagram.findLinkForData Diagram.findLinkForKey Diagram.findLinksByExample Diagram.findNodeForData Diagram.findNodeForKey Diagram.findNodesByExample Diagram.findObjectAt Diagram.findObjectsAt Diagram.findObjectsIn Diagram.findObjectsNear Diagram.findPartAt Diagram.findPartForData Diagram.findPartForKey Diagram.findPartsAt Diagram.findPartsIn Diagram.findPartsNear Diagram.findRouter Diagram.findTopLevelGroups Diagram.findTreeRoots Diagram.focus Diagram.highlight Diagram.highlightCollection Diagram.layoutDiagram Diagram.makeImage Diagram.makeImageData Diagram.makeSvg Diagram.moveParts Diagram.rebuildParts Diagram.remove Diagram.removeChangedListener Diagram.removeDiagramListener Diagram.removeLayer Diagram.removeModelChangedListener Diagram.removeParts Diagram.requestUpdate Diagram.rollbackTransaction Diagram.scroll Diagram.scrollToRect Diagram.select Diagram.selectCollection Diagram.set Diagram.setDivBackground Diagram.setProperties Diagram.startTransaction Diagram.transformDocToView Diagram.transformViewToDoc Diagram.updateAllRelationshipsFromData Diagram.updateAllTargetBindings Diagram.updateAllThemeBindings Diagram.zoomToFit Diagram.zoomToRect

Constructors

  • Parameters

    • Optional div: string | Element

      A reference to a DIV HTML element or its ID as a string. If no DIV is supplied, a Palette will be created in memory. The Palette's Diagram.div property can then be set later on.

    • Optional init: Partial<Palette>

      A JavaScript object specifying optional initialization properties object. Can specify Palette properties, and Palette sub-properties, just as when initializing a Diagram. Example:

      {
      allowZoom: false,
      "animationManager.isEnabled": false
      }

    Returns Palette

  • Parameters

    • Optional init: Partial<Palette>

      A JavaScript object specifying optional initialization properties object. Can specify Palette properties, and Palette sub-properties, just as when initializing a Diagram. Example:

      {
      allowZoom: false,
      "animationManager.isEnabled": false
      }

    Returns Palette