Error on Stroke.Width link

Hi There, I have a link template and a width drop down in the inspector that sets the width of the link. When I set it I get the error below: property set error: Error: Shape.strokeWidth must be a real number type, and not NaN or Infinity: 10

Nd the width id not set.

My link template is:

var genericLinkTemplate =
$(go.Link, // slightly curved, by default
{
routing: go.Link.Orthogonal, curve: go.Link.JumpOver, corner: 10,
fromSpot: go.Spot.AllSides, toSpot: go.Spot.AllSides, resegmentable: true,
reshapable: true, relinkableFrom: true, relinkableTo: true, toEndSegmentLength: 20,
}, // users can reshape the link route
new go.Binding(“points”).makeTwoWay(),
new go.Binding(“curviness”),
$(go.Shape, // the link’s path shape
//new go.Binding(“stroke”, “patt”),
new go.Binding(“stroke”, “color”).makeTwoWay(),
new go.Binding(“strokeWidth”, “width”).makeTwoWay(),
new go.Binding(“pathPattern”, “patt”, convertPathPatternToShape)),
$(go.Shape,
new go.Binding(“fromArrow”, “fromArrow”), { fromArrow: “Circle” }, new go.Binding(“fill”, “color”).makeTwoWay()),
$(go.Shape,
new go.Binding(“toArrow”, “toArrow”), { toArrow: “Standard” }, new go.Binding(“fill”, “color”).makeTwoWay()),
$(go.Panel, “Auto”,
{ cursor: “move” }, // visual hint that the user can do something with this link label

            $(go.TextBlock, "",  // the label text
                {
                    textAlign: "center",
                    font: "10pt helvetica, arial, sans-serif",
                    stroke: "black",
                    margin: 4,
                    editable: true  // editing the text automatically updates the model data
                },
                new go.Binding("text", "text").makeTwoWay()),
        )
    );

My inspector

function makeInspector(fromArrowHeads, toArrowHeads, linkStyles) {

    var inspector = new Inspector('myInspectorDiv', myDiagram,
        {
            properties: {
                "width": {
                    show: Inspector.showIfLink, type: 'select',
                    choices: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
                }
            }
        });

    window.inspector = inspector;
}

Clearly the string “10” is not a number. I suggest you remove the double-quotes from your Array of choices.

That works , thanks Walter. It used to work on the version go-1.7.29.js. I will go with this way cause it makes sense. Thank you

The Inspector was enhanced in 1.8, if I recall correctly.