### Programmatically Starting the ResizingTool Source: https://gojs.net/latest/api/symbols/ResizingTool.html Example showing how to programmatically initiate the ResizingTool for a selected node by setting the handle and activating the tool. ```APIDOC const node = ...; myDiagram.select(node); const adorn = node.findAdornment("Resizing"); const tool = myDiagram.toolManager.resizingTool; // specify which resize handle of the "Resizing" Adornment of the selected node tool.handle = adorn.elt(...); myDiagram.currentTool = tool; // starts the ResizingTool tool.doActivate(); // activates the ResizingTool ``` -------------------------------- ### Programmatically Starting the RotatingTool Source: https://gojs.net/latest/api/symbols/RotatingTool.html Example demonstrating how to programmatically initiate the RotatingTool for a selected node by setting the tool's handle and activating it. ```APIDOC ```javascript const node = ...; myDiagram.select(node); const adorn = node.findAdornment("Rotating"); const tool = myDiagram.toolManager.rotatingTool; // specify the rotation handle of the "Rotating" Adornment of the selected node tool.handle = adorn.elt(0); myDiagram.currentTool = tool; // starts the RotatingTool tool.doActivate(); // activates the RotatingTool ``` ``` -------------------------------- ### start() Source: https://gojs.net/latest/api/symbols/Animation.html Starts the animation sequence. ```APIDOC ## start() ### Description Start this animation. This adds the Animation to its AnimationManager's list of active animations. ``` -------------------------------- ### Programmatically Starting the RelinkingTool Source: https://gojs.net/latest/api/symbols/RelinkingTool.html This example demonstrates how to manually configure and activate the RelinkingTool to allow a user to reconnect a specific link end. ```APIDOC ## Programmatically Starting RelinkingTool ### Description To initiate the relinking process programmatically, you must set the `originalLink` and `isForwards` properties on the tool instance before activating it. ### Usage ```javascript const tool = myDiagram.toolManager.relinkingTool; tool.originalLink = ...; // specify which Link to have the user reconnect tool.isForwards = true; // specify which end of the Link to reconnect myDiagram.currentTool = tool; // starts the RelinkingTool tool.doActivate(); // activates the RelinkingTool ``` ``` -------------------------------- ### Programmatically Start Dragging Source: https://gojs.net/latest/api/symbols/DraggingTool.html Example of how to programmatically initiate a drag operation for a specific node. ```APIDOC const node = ...; myDiagram.select(node); // in this case the only selected node const tool = myDiagram.toolManager.draggingTool; tool.currentPart = node; // the DraggingTool will not call standardMouseSelect myDiagram.currentTool = tool; // starts the DraggingTool tool.doActivate(); // activates the DraggingTool ``` -------------------------------- ### Animation Class Usage Source: https://gojs.net/latest/api/symbols/Animation.html Example of how to instantiate an Animation object, add property transitions, and start the animation. ```APIDOC const node = myDiagram.nodes.first(); const shape = part.findObject("SHAPE"); const animation = new go.Animation(); // Animate this Node from its current position to (400, 500) animation.add(node, "position", node.position, new go.Point(400, 500)); // Animate the fill of the Shape within the Node, from its current color to blue animation.add(shape, "fill", shape.fill, "blue"); // Start the animation animation.start(); ``` -------------------------------- ### doActivate Source: https://gojs.net/latest/api/symbols/LinkingTool.html Starts the linking operation. ```APIDOC ## doActivate() ### Description Start the linking operation. This calls findLinkablePort to find the port from which to start drawing a new link, starts a transaction, captures the mouse, and initializes temporary nodes and links. ### Returns - **void** ``` -------------------------------- ### graduatedStart Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the fractional distance along the main shape of a "Graduated" Panel at which this text should start. ```APIDOC ## graduatedStart ### Description Gets or sets the fractional distance along the main shape of a "Graduated" Panel at which this text should start. The default is 0; the value should range from 0 to 1. ### Returns - **number** - The fractional distance. ``` -------------------------------- ### Installing FreehandDrawingTool Source: https://gojs.net/latest/api/symbols/FreehandDrawingTool.html How to install the FreehandDrawingTool as the first mouse-down tool in a GoJS diagram. ```APIDOC ## Installation ### Description To use the FreehandDrawingTool, instantiate it and insert it into the diagram's toolManager.mouseDownTools collection. ### Example ```javascript myDiagram.toolManager.mouseDownTools.insertAt(0, new FreehandDrawingTool()); ``` ``` -------------------------------- ### standardWaitAfter Source: https://gojs.net/latest/api/symbols/ActionTool.html Starts a timer for hover or hold events. ```APIDOC ## standardWaitAfter(delay: number, event?: InputEvent) ### Description Starts a new timer to call doWaitAfter after a given delay. It cancels any previously running 'WaitAfter' timer. ### Parameters - **delay** (number) - Required - The delay in milliseconds. - **event** (InputEvent) - Optional - An optional event that caused this timer. ### Returns - **void** ``` -------------------------------- ### canStart Source: https://gojs.net/latest/api/symbols/ClickSelectingTool.html Determines if the tool can start when a click occurs. ```APIDOC ## canStart() ### Description This tool can run whenever a click occurs. ### Returns - **boolean** ``` -------------------------------- ### root Source: https://gojs.net/latest/api/symbols/SerpentineLayout.html Gets or sets the starting node of the sequence. ```APIDOC ## get root() ### Description Gets or sets the starting node of the sequence. The default value is null. ### Returns - **Node | null** - The starting node or null. ``` -------------------------------- ### startObject Source: https://gojs.net/latest/api/symbols/LinkingTool.html Gets or sets the GraphObject at which findLinkablePort should start its search. ```APIDOC ## startObject ### Description Gets or sets the GraphObject at which findLinkablePort should start its search. Setting this property allows for explicitly starting a new user mouse-gesture to draw a new link from a specific object. ### Returns GraphObject | null ``` -------------------------------- ### Initialize and Populate a List Source: https://gojs.net/latest/api/symbols/List.html Demonstrates creating a new List instance and adding elements to it. ```javascript const list = new go.List(); // or in TypeScript: new go.List(); list.add(new go.Point(0, 0)); list.add(new go.Point(20, 10)); list.add(new go.Point(10, 20)); // now list.length === 3 // and list.elt(1) instanceof go.Point ``` -------------------------------- ### Initialize a GoJS Overview Source: https://gojs.net/latest/api/symbols/Overview.html Create an Overview instance and link it to an existing Diagram by setting the observed property. ```javascript const myDiagram = new go.Diagram("myDiagramDIV"); . . . other initialization . . . // create and initialize the Overview: new go.Overview("myOverviewDIV").observed = myDiagram; ``` -------------------------------- ### isEnabled Source: https://gojs.net/latest/api/symbols/DraggingTool.html Gets or sets whether this tool can be started by a mouse event. ```APIDOC ## isEnabled ### Description Gets or sets whether this tool can be started by a mouse event. The default value is true. ### Returns - **boolean** ``` -------------------------------- ### Initialize a Diagram with configuration options Source: https://gojs.net/latest/api/symbols/Diagram.html Demonstrates creating a new Diagram instance and configuring various properties like zoom, grid settings, tool behaviors, and event listeners in a single object. ```javascript const myDiagram = new go.Diagram("myDiagramDiv", { allowZoom: false, "animationManager.isEnabled": false, // turn off automatic animations "grid.visible": true, // display a background grid for the whole diagram "grid.gridCellSize": new go.Size(20, 20), // allow double-click in background to create a new node "clickCreatingTool.archetypeNodeData": { text: "Node" }, // allow Ctrl-G to call the groupSelection command "commandHandler.archetypeGroupData": { text: "Group", isGroup: true, color: "blue" }, "commandHandler.copiesTree": true, // for the copy command "commandHandler.deletesTree": true, // for the delete command "toolManager.hoverDelay": 100, // how quickly tooltips are shown // mouse wheel zooms instead of scrolls "toolManager.mouseWheelBehavior": go.WheelMode.Zoom, "draggingTool.dragsTree": true, // dragging for both move and copy "draggingTool.isGridSnapEnabled": true, layout: new go.TreeLayout( { angle: 90, sorting: go.TreeLayout.SortingAscending }), "undoManager.isEnabled": true, // enable undo & redo // a Changed listener on the Diagram.model "ModelChanged": e => { if (e.isTransactionFinished) saveModel(); } }); ``` -------------------------------- ### isActive Source: https://gojs.net/latest/api/symbols/DraggingTool.html Gets or sets whether this tool is started and is actively doing something. ```APIDOC ## isActive ### Description Gets or sets whether this tool is started and is actively doing something. The default value is false. ### Returns - **boolean** ``` -------------------------------- ### isTreeExpanded Source: https://gojs.net/latest/api/symbols/Group.html Gets or sets whether the subtree graph starting at this node is expanded. ```APIDOC ## isTreeExpanded ### Description Gets or sets whether the subtree graph starting at this node is expanded. Changing this property's value will call collapseTree or expandTree. ### Signature `get isTreeExpanded(): boolean` ### Returns - **boolean** - Whether the tree is expanded. ``` -------------------------------- ### doActivate Source: https://gojs.net/latest/api/symbols/ResizeMultipleTool.html Initializes the tool by finding the handle, saving original bounds, capturing the mouse, and starting a transaction. ```APIDOC ## doActivate() ### Description Finds the handle, remembers the object's original bounds, saves the results of computeMinSize, computeMaxSize, and computeCellSize, captures the mouse, and starts a transaction. ### Returns - **void** ``` -------------------------------- ### canStart(): boolean Source: https://gojs.net/latest/api/symbols/FreehandDrawingTool.html Determines if the tool can start based on diagram modifiability and insertion permissions. ```APIDOC ### canStart(): boolean Only start if the diagram is modifiable and allows insertions. OPTIONAL: if the user is starting in the diagram's background, not over an existing Part. ``` -------------------------------- ### startPoint Source: https://gojs.net/latest/api/symbols/GuidedDraggingTool.html Gets or sets the mouse point from which parts start to move in document coordinates. ```APIDOC ## Property: startPoint ### Description Gets or sets the mouse point from which parts start to move. The value is a Point in document coordinates. ### Returns - **Point** - The starting mouse point. ``` -------------------------------- ### delay Source: https://gojs.net/latest/api/symbols/DragSelectingTool.html Gets or sets the time in milliseconds for which the mouse must be stationary before this tool can be started. ```APIDOC ## delay ### Description Gets or sets the time in milliseconds for which the mouse must be stationary before this tool can be started. The default value is 175 milliseconds. ### Returns - **number** - The delay in milliseconds. ``` -------------------------------- ### new SpotRotatingTool(init?: Partial) Source: https://gojs.net/latest/api/symbols/SpotRotatingTool.html Constructs a new instance of the SpotRotatingTool. ```APIDOC ## constructor ### Description Creates a new instance of the SpotRotatingTool. ### Parameters - **init** (Partial) - Optional - An object containing initial property values. ### Returns - **SpotRotatingTool** - The newly created tool instance. ``` -------------------------------- ### alternateNodeIndentPastParent Source: https://gojs.net/latest/api/symbols/TreeLayout.html Gets or sets the fraction of this node's breadth added to alternateNodeIndent to determine spacing at the start of the children. ```APIDOC ## alternateNodeIndentPastParent ### Description Gets or sets the fraction of this node's breadth added to alternateNodeIndent to determine any spacing at the start of the children. The default value is 0.0. ### Returns - **number** - The fraction of the node's breadth. ``` -------------------------------- ### Using PanelTypes for Panel Construction Source: https://gojs.net/latest/api/symbols/PanelTypes.html Demonstrates the different ways to specify a panel type when creating a new go.Panel instance. ```javascript new go.Panel(go.PanelTypes.Table, ...) // equivalent to: new go.Panel("Table", ...) // or: new go.Panel(go.Panel.Table, ...) ``` -------------------------------- ### Initialize a Panel Source: https://gojs.net/latest/api/symbols/Panel.html Demonstrates various ways to instantiate a Panel using different type identifiers and adding elements. ```javascript // Either: new go.Panel(go.Panel.Horizontal, ... // Or {@link PanelType}, a const of valid string values: new go.Panel(go.PanelType.Horizontal, ... // Or a string: new go.Panel("Horizontal", ... // Full example: p = new go.Panel("Horizontal", { width: 60, height: 60 }) // panel properties // elements in the panel: .add( new go.Shape("Rectangle", { fill: "white", stroke: "green" }), new go.TextBlock("Some Text") ); ``` -------------------------------- ### formatting Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the policy for trimming whitespace on each line of text. ```APIDOC ## formatting ### Description Gets or sets the policy for trimming whitespace on each line of text. Possible values are TextFormat.Trim or TextFormat.None. ### Returns TextFormat ``` -------------------------------- ### Create and start a manual animation Source: https://gojs.net/latest/api/symbols/Animation.html Demonstrates how to instantiate an Animation, add property changes for a node and a shape, and trigger the animation. ```javascript const node = myDiagram.nodes.first(); const shape = part.findObject("SHAPE"); // assumes this Node contains a go.Shape with .name = "SHAPE" const animation = new go.Animation(); // Animate this Node from its current position to (400, 500) animation.add(node, "position", node.position, new go.Point(400, 500)); // Animate the fill of the Shape within the Node, from its current color to blue animation.add(shape, "fill", shape.fill, "blue"); // Both of these effects will animate simultaneously when start() is called: animation.start(); ``` -------------------------------- ### wordSpacing Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets additional spacing between words. ```APIDOC ## wordSpacing ### Description Gets or sets additional spacing between words. The default is '0px'. The value may be negative. Note: This feature is unsupported in Safari as of 2025. ### Returns - **string** - The word spacing value. ``` -------------------------------- ### layerSpacingParentOverlap Source: https://gojs.net/latest/api/symbols/FishboneLayout.html Gets or sets the fraction of the node's depth for which the children's layer starts overlapped with the parent's layer. ```APIDOC ## layerSpacingParentOverlap ### Description Gets or sets the fraction of the node's depth for which the children's layer starts overlapped with the parent's layer. The default value is 0.0. ### Returns - **number** ``` -------------------------------- ### Basic Set Usage Source: https://gojs.net/latest/api/symbols/Set.html Demonstrates initializing a Set, adding elements, and checking for existence. ```javascript const set = new go.Set(); // In TypeScript: new go.Set(); set.add("orange"); set.add("apple"); set.add("orange"); // now set.size === 2 // and set.has("orange") === true // and set.has("banana") === false ``` -------------------------------- ### name Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the unique name for the object within a Panel. ```APIDOC ## name ### Description Gets or sets the name for this object. The name should be unique within a Panel to facilitate object lookup. ### Returns - **string** - The name of the object. ``` -------------------------------- ### isUnderline Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets whether or not the text is underlined. ```APIDOC ## get/set isUnderline ### Description Gets or sets whether or not the text is underlined. The default is false. ### Returns - **boolean** ``` -------------------------------- ### Minimal Diagram Construction Source: https://gojs.net/latest/api/symbols/Diagram.html Setup the required HTML container and initialize a new GoJS Diagram instance. ```html
``` ```javascript const myDiagram = new go.Diagram("myDiagramDiv", // create a Diagram for the Div HTML element { // with various property and subproperty settings... "undoManager.isEnabled": true // enable undo & redo }); ``` -------------------------------- ### textEditor Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the HTMLInfo used as the text editor in the TextEditingTool. ```APIDOC ## textEditor ### Description Gets or sets the HTMLInfo instance used for text editing. If null, the default editor is used. ### Returns - **HTMLInfo|null** - The text editor instance. ``` -------------------------------- ### maxLines Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the maximum number of lines that this TextBlock can display. ```APIDOC ## get/set maxLines ### Description Gets or sets the maximum number of lines that this TextBlock can display. Value must be a greater than zero whole number or Infinity. ### Returns - **number** ``` -------------------------------- ### font Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the current font settings using a CSS font string. ```APIDOC ## font ### Description Gets or sets the current font settings. The font property must be a valid CSS string describing a font. ### Returns string ``` -------------------------------- ### flip Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets how the TextBlock is displayed: Either normally or with a Horizontal or Vertical flip or both. ```APIDOC ## flip ### Description Gets or sets how the TextBlock is displayed: Either normally or with a Horizontal or Vertical flip or both. Possible values are Flip.None, Flip.Horizontal, Flip.Vertical, or Flip.Both. ### Returns Flip ``` -------------------------------- ### make Source: https://gojs.net/latest/api/symbols/TextBlock.html Constructs and initializes a new object instance. ```APIDOC ## Static make ### Description This static function builds an object given its class and additional arguments providing initial properties or GraphObjects that become Panel elements. ### Parameters - **cls** ("ContextMenu" | "ToolTip") - Required - The class type or name of the object to construct. - **...initializers** (Array) - Optional - Initial properties or GraphObjects to apply to the new instance. ``` -------------------------------- ### wrap Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets whether the text should be wrapped if it is too long to fit on one line. ```APIDOC ## wrap ### Description Gets or sets whether the text should be wrapped if it is too long to fit on one line. Possible values are Wrap.DesiredSize, Wrap.Fit, Wrap.BreakAll, and Wrap.None. The default value is Wrap.DesiredSize. ### Returns - **Wrap** - The current wrapping behavior. ``` -------------------------------- ### alternateLayerSpacingParentOverlap Source: https://gojs.net/latest/api/symbols/TreeLayout.html Gets or sets the alternate fraction of the node's depth for which the children's layer starts overlapped with the parent's layer. ```APIDOC ## alternateLayerSpacingParentOverlap ### Description Gets or sets the alternate fraction of the node's depth for which the children's layer starts overlapped with the parent's layer. The default value is 0.0. ### Returns - **number** - The fraction of the node's depth. ``` -------------------------------- ### new GuidedDraggingTool(init?: Partial) Source: https://gojs.net/latest/api/symbols/GuidedDraggingTool.html Constructs a new instance of the GuidedDraggingTool and initializes the temporary guideline parts. ```APIDOC ## new GuidedDraggingTool(init?: Partial) ### Description Constructs a GuidedDraggingTool and sets up the temporary guideline parts. ### Parameters - **init** (Partial) - Optional - An object containing initial property values. ``` -------------------------------- ### textAlign Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the alignment location in the TextBlock's given space. ```APIDOC ## textAlign ### Description Gets or sets the alignment location in the TextBlock's given space. Possible values are "start", "end", "left", "right", and "center". ### Returns - **string** - The current alignment value. ``` -------------------------------- ### overflow Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets how text that is too long to display should be handled. ```APIDOC ## overflow ### Description Gets or sets how text that is too long to display should be handled, such as using TextOverflow.Clip or TextOverflow.Ellipsis. ### Returns - **TextOverflow** - The overflow handling mode. ``` -------------------------------- ### getBaseline Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets the function that computes the position to draw the baseline of a line of text in all TextBlocks. ```APIDOC ## Static getBaseline ### Description Gets the function that, given the TextBlock and numerical text height, computes the position to draw the baseline of a line of text in all TextBlocks. By default this is null and default behavior returns (textHeight * 0.75). ### Returns ((textBlock: TextBlock, textHeight: number) => number) | null ``` -------------------------------- ### new FreehandDrawingTool(init?: Partial) Source: https://gojs.net/latest/api/symbols/FreehandDrawingTool.html Constructs a new FreehandDrawingTool instance. ```APIDOC ## new FreehandDrawingTool(init?: Partial) ### Description Creates a new instance of the FreehandDrawingTool. ### Parameters - **init** (Partial) - Optional - An object containing initial property values for the tool. ``` -------------------------------- ### attach(config: any): this Source: https://gojs.net/latest/api/symbols/TextBlock.html Sets a collection of properties based on the provided configuration object or array of objects. It is similar to GraphObject.make and is used for attaching properties, including those starting with an underscore. ```APIDOC ## attach(config) ### Description Sets a collection of properties according to the property/value pairs on the given Object or array of Objects. This method is used for initialization, particularly for attaching new properties that do not exist on the GraphObject (must start with '_') or setting sub-properties. ### Parameters - **config** (any) - Required - A JavaScript object containing properties to attach, or an array of such objects. ### Returns - **this** (GraphObject) - Returns the current GraphObject instance. ``` -------------------------------- ### letterSpacing Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets additional spacing between letters. ```APIDOC ## get/set letterSpacing ### Description Gets or sets additional spacing between letters. The default is '0px'. The value may be negative. ### Returns - **string** ``` -------------------------------- ### text Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the TextBlock's text string. The text, along with font, wrap, and sizing restrictions, determines the natural size of the TextBlock. ```APIDOC ## text ### Description Gets or sets the TextBlock's text string. The default is an empty string. ### Returns - **string** - The current text content. ``` -------------------------------- ### isStrikethrough Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets whether or not the text has a strikethrough line. ```APIDOC ## get/set isStrikethrough ### Description Gets or sets whether or not the text has a strikethrough line (line-through). The default is false. ### Returns - **boolean** ``` -------------------------------- ### spacingAbove Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets additional spacing above each line of text. The default is zero. The value may be negative. ```APIDOC ## spacingAbove ### Description Gets or sets additional spacing above each line of text. The default is zero. The value may be negative. This can be useful when you need to adjust the font spacing on custom fonts or monospace fonts to suit your needs. ### Returns - **number** - The spacing value in pixels. ``` -------------------------------- ### editable Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets whether or not this TextBlock allows in-place editing of the text string. ```APIDOC ## editable ### Description Gets or sets whether or not this TextBlock allows in-place editing of the text string by the user with the help of the TextEditingTool. The default is false. ### Returns boolean ``` -------------------------------- ### getUnderline Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets the function that computes the position to draw the underline of a line of text in all TextBlocks. ```APIDOC ## Static getUnderline ### Description Gets the function that, given the TextBlock and numerical text height, computes the position to draw the underline of a line of text in all TextBlocks. By default this is null and default behavior returns (textHeight * 0.75). ### Returns ((textBlock: TextBlock, textHeight: number) => number) | null ``` -------------------------------- ### portSpot Source: https://gojs.net/latest/api/symbols/FishboneLayout.html Gets or sets the spot that this node's port gets as its FromSpot. ```APIDOC ## portSpot ### Description Gets or sets the spot that this node's port gets as its FromSpot. The default value is Spot.Default. ### Returns - **Spot** ``` -------------------------------- ### spacingBelow Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets additional spacing below each line of text. The default is zero. The value may be negative. ```APIDOC ## spacingBelow ### Description Gets or sets additional spacing below each line of text. The default is zero. The value may be negative. This can be useful when you need to adjust the font spacing on custom fonts or monospace fonts to suit your needs. ### Returns - **number** - The spacing value in pixels. ``` -------------------------------- ### stroke Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the Brush or string that describes the stroke (color) of the text that is drawn. ```APIDOC ## stroke ### Description Gets or sets the Brush or string that describes the stroke (color) of the text that is drawn. The default value is "black". Any valid CSS string can specify a solid color, and the Brush class can be used to specify a gradient or pattern. ### Returns - **BrushLike** - The brush or color string used for the text stroke. ``` -------------------------------- ### childPortSpot Source: https://gojs.net/latest/api/symbols/FishboneLayout.html Gets or sets the spot that children nodes' ports get as their ToSpot. ```APIDOC ## childPortSpot ### Description Gets or sets the spot that children nodes' ports get as their ToSpot. The default value is Spot.Default. ### Returns Spot ``` -------------------------------- ### canStart() Source: https://gojs.net/latest/api/symbols/PolygonDrawingTool.html Determines if the tool can start based on the current mouse position. ```APIDOC ## canStart() ### Description Don't start this tool in a mode-less fashion when the user's mouse-down is on an existing Part. When this tool is a mouse-down tool, it requires using the left mouse button in the background of a modifiable Diagram. ### Returns - **boolean** ``` -------------------------------- ### graduatedSkip Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the function to determine which values along a "Graduated" Panel will be skipped. ```APIDOC ## graduatedSkip ### Description Gets or sets the function to determine which values along a "Graduated" Panel will be skipped. The default is null and doesn't skip any text labels. ### Returns - **((val: number, tb: TextBlock) => boolean) | null** - The skip function. ``` -------------------------------- ### textValidation Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the predicate that determines whether a user-edited string is valid. ```APIDOC ## textValidation ### Description Gets or sets the predicate function used to validate edited text. The function signature is: function(textBlock, oldString, newString). ### Returns - **function|null** - The validation predicate or null. ``` -------------------------------- ### canStart Source: https://gojs.net/latest/api/symbols/GuidedDraggingTool.html Determines if the tool can start based on diagram state and mouse movement. ```APIDOC ## Method: canStart ### Description This tool can run if the diagram allows selection and moves/copies/dragging-out, if the mouse has moved far enough away to be a drag and not a click, and if findDraggablePart has found a selectable part at the mouse-down point. ### Returns - **boolean** - True if the tool can start. ``` -------------------------------- ### alternatePortSpot Source: https://gojs.net/latest/api/symbols/TreeLayout.html Gets or sets the alternate spot that this node's port gets as its FromSpot. ```APIDOC ## alternatePortSpot ### Description Gets or sets the alternate spot that this node's port gets as its FromSpot. The default value is Spot.Default. ### Returns - **Spot** - The spot assigned to the port. ``` -------------------------------- ### isMultiline Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets whether or not the text displays multiple lines or embedded newlines. ```APIDOC ## isMultiline ### Description Gets or sets whether or not the text displays multiple lines or embedded newlines. If this is false, all characters including and after the first newline will be omitted. The default is true. ### Returns - **boolean** - True if multiline is enabled. ``` -------------------------------- ### segmentOffset Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the offset of a GraphObject that is in a Link from a point on a segment or in a Panel. ```APIDOC ## segmentOffset ### Description Gets or sets the offset of a GraphObject that is in a Link from a point on a segment or in a Panel. The X component of the Point indicates the distance along the route, and the Y component indicates the distance away from the route. The value defaults to the Point (0, 0). ### Returns - **Point** ``` -------------------------------- ### interval Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets how frequently this text should be drawn within a "Graduated" Panel. ```APIDOC ## interval ### Description Gets or sets how frequently this text should be drawn within a "Graduated" Panel, in multiples of the Panel.graduatedTickUnit. The default is 1. ### Returns - **number** - The interval value. ``` -------------------------------- ### graduatedFunction Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the function to convert from a value along a "Graduated" Panel to a string. ```APIDOC ## graduatedFunction ### Description Gets or sets the function to convert from a value along a "Graduated" Panel to a string. The default returns a string representing the value rounded to at most 2 decimals. ### Returns - **((val: number, tb: TextBlock) => string) | null** - The conversion function. ``` -------------------------------- ### doStart Source: https://gojs.net/latest/api/symbols/ActionTool.html Initializes the tool when it becomes the current tool. This method is called by the Diagram and should not be called directly by users. ```APIDOC ## doStart() ### Description Performs per-use initialization for the tool, such as setting up internal data structures or capturing the mouse. This method is called by the Diagram when the tool becomes active. ### Returns - **void** ``` -------------------------------- ### alternateChildPortSpot Source: https://gojs.net/latest/api/symbols/ParallelLayout.html Gets or sets the alternate spot that children nodes' ports get as their ToSpot. ```APIDOC ## alternateChildPortSpot ### Description Gets or sets the alternate spot that children nodes' ports get as their ToSpot. The default value is Spot.Default. ### Returns - **Spot** - The spot value. ``` -------------------------------- ### errorFunction Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the function to call if a text edit made with the TextEditingTool is invalid. ```APIDOC ## errorFunction ### Description Gets or sets the function to call if a text edit made with the TextEditingTool is invalid. The default is null. ### Returns ((tool: TextEditingTool, oldString: string, newString: string) => void) | null ``` -------------------------------- ### textEdited Source: https://gojs.net/latest/api/symbols/TextBlock.html Gets or sets the function called after the TextBlock's text has been edited by the TextEditingTool. ```APIDOC ## textEdited ### Description Gets or sets the callback function executed after text editing. The function signature is: function(textBlock, previousText, currentText). ### Returns - **function|null** - The callback function or null. ``` -------------------------------- ### selectionObjectName Source: https://gojs.net/latest/api/symbols/Adornment.html Gets or sets the name of the GraphObject that should get a selection handle when this part is selected. ```APIDOC ## selectionObjectName ### Description Gets or sets the name of the GraphObject that should get a selection handle when this part is selected. The initial value is an empty string. ### Returns - **string** - The name of the selection object. ``` -------------------------------- ### new SectorReshapingTool(init?: Partial) Source: https://gojs.net/latest/api/symbols/SectorReshapingTool.html Constructs a new instance of the SectorReshapingTool. ```APIDOC ## new SectorReshapingTool(init?: Partial) ### Description Constructs a SectorReshapingTool and sets the name for the tool. ### Parameters - **init** (Partial) - Optional - Initial properties for the tool. ### Returns - **SectorReshapingTool** - The newly created tool instance. ```