I saw the other thread on this but the topic of custom buttons is really lacking. I’m trying to create a tree button with a circle (flat looking) and an arrow inside it. That’s it. I started trying to build a button up to implement it and got all sorts of errors. This was my first attempt at just a nothing “give it a try” type of button:
function makeCustomButton() {
var g = go.GraphObject.make;
var button = g(go.Panel, “Auto”,
{
isActionable: true
},
g(go.Shape, “Ellipse”, //the border
{
name: “ButtonBorder”,
height: 16,
width: 16,
fill: null,
stroke: “black”,
strokeWidth: 2
})
)
}
Then I tried to implement it in my template (also couldn’t find any documentation on this so it was just a wild guess…)
), //End of table
g(makeCustomButton(),
new go.Binding("alignment", "alignment"),
new go.Binding("alignmentFocus", "alignmentFocus"),
{ visible: true }
)
And then I get the error GraphObject.make requires a class function or class name, not: undefined. This happens during the template initialization and I have no idea what it's referring to (i.e. I have no idea how to call my custom button template).
Thanks!