I am new to GOJS. All i need tis to bind the arrowheads to the toArrow property inspector and change it from Text to Enum/dropdown. please see the code below.
Your help is highly appreciated.
Alpheus
var arrowheads = go.Shape.getArrowheadGeometries().toKeySet().toArray();
if (arrowheads.length % 2 === 1) arrowheads.push(""); // make sure there’s an even number
// create all of the link data, two arrowheads per link
var linkdata = [];
var i = 0;
for (var i = 0; i < arrowheads.length; i++) {
linkdata.push(arrowheads[i]);
}
It would be great if there was something like this
“toArrow”: {
type: “Enum”,
enumValues: [go.Link.Shape.Standard, go.Link.Shape.Triangle, go.Link.Shape.Boomerang, go.Link.Shape.Triangle],
defaultValue: go.Link.Shape.Standard
}
Thanks Walter, I got the drop downs working but the links are affected in that they have a square box when linking two nodes for the first time. they only disappear when I select the toArrow and fromArrow properties. I am not sure what is happening. please see code and picture below:
I"m new to GOJS I’m also facing Blakcsqare issue , where should i initialize initial value for Shape.fromArrow and Shape.toArrow . please post the sample code