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

How to insertLink custom data for link while drawing link

$
0
0

@pratap wrote:

Hi... All

I am trying to insert Custom Link data while drawing Link.
By using linkingTool.insert(fromnode, fromport, tonode, toport) but getting error
i.e.
go.js:13 Uncaught Error: Diagram.select:part value is not an instance of Part: [object Object]
at Object.k (go.js:13)
at Object.Cd (go.js:15)
at Object.A (go.js:14)
at E.select.E.select (go.js:808)
at wi.doMouseUp (go.js:550)
at E.doMouseUp (go.js:725)
at a.qp (go.js:932)

And my code is

var tool = myDiagramModalInputTable.toolManager.linkingTool;
tool.insertLink = function (fromnode, fromport, tonode, toport) {

    var newLink = {

    };

   //**Which Object could be return???**
    **return {from: fromnode.data.key, to: tonode.data.key}**;
}

if I am missing anything please help me...

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles