Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Trouble finding tool

$
0
0

@cbh wrote:

I have created a custom resizing tool and added it to the mousedown tools collection and it works great.
Almost.
When I give the tool a name - say name: “myResizingTool” it breaks the functionality.
In addition, if I leave the name alone it will inherit the name “Resizing”.
Now when I want to find the tool to call a function on it I can’t find “myResizingTool” but I can get it like this:

var tool = myDiagram.toolManager.mouseDownTools._dataArray[2];//.findTool("myResizingTool");
    tool.foo(obj);

Is this an acceptable practice?
Why does naming my resizing tool break the resizing functionality?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles