$("CheckBox", "choice",
{
row: 2,
column: 0,
"Button.width": 20,
"Button.height": 20,
"ButtonBorder.figure": "Circle",
"ButtonBorder.stroke": "blue",
"ButtonIcon.figure": "Circle",
"ButtonIcon.fill": "blue",
"ButtonIcon.strokeWidth": 0,
"ButtonIcon.desiredSize": new go.Size(10, 10)
},
$(go.TextBlock, "is hidden"),
{
"_doClick": function (e, obj) {
console.log(obj);
}
}
),
How did you define your “CheckBox”? The second argument should be the name of the data property that will be toggled. So maybe something like: obj.part.data.choice
.
See the complete definition of the “CheckBox” builder at http://gojs.net/latest/extensions/Buttons.js.
See examples at CheckBoxes.
obj.part.data.option1 - undefined