i’m little new with go js and i don’t understand how, is its possible, i can change a color button background or just the shape inside it,
my proble is assing to a node the color shape but i don’t understand how
my button (inside a node)
$("Button",{click: changeColor},
$(go.Shape,
{ fill: 'red', stroke: null, desiredSize: new go.Size(20, 20) },
new go.Binding("fill", "color").makeTwoWay()
)
this is my function
function changeColor(button) {
var node = button.part.adornedPart;
var shape = node.findObject("SHAPE");
node.diagram.startTransaction("Change color");
shape.fill = button.shape.fill; //<- doesnt work
node.diagram.commitTransaction("Change color");
};