Search code examples
gojs

GoJs Diagram Change HoverDelay Timeout


I'd like to allow users to set the hoverDelay diagram option through a form. How do I/ can I update the hoverDelay value after the diagram has been created?

Here is how i setup my diagram:

 this.myDiagram =
            Make(go.Diagram, this._element.nativeElement, // must be the ID or reference to an HTML DIV
                {
                    // start everything in the middle of the viewport
                    initialContentAlignment: go.Spot.TopCenter,
                    initialAutoScale: go.Diagram.Uniform,
                    layout: Make(go.LayeredDigraphLayout, { direction: 90, layerSpacing: 10, columnSpacing: 80, setsPortSpots: false }),
                    "animationManager.isInitial": false,
                    hoverDelay : 500
                });

starting from the myDiagram object is there a way to update its hoverDelay to say 1000 after the diagram is instantiated?

Thanks!


Solution

  • It's a property of the ToolManager, so you can call:

    myDiagram.toolManager.hoverDelay = 1000; // or some other number
    

    at any time.