Hi there,
I am using GoJS with angular. I have a directive for my diagram and it works fine.
I want though to make my diagram enabled and disabled for edit links betwween shapes with a switch button.
So i’ve got something like this in my directive:
scope.isEditable = true;
// Update if when tab if opened
scope.$on('editRelatisons', function (value, state) {
if(state === 'true') {
scope.isEditable = true;
} else {
scope.isEditable = false;
}
console.log(scope.isEditable);
});
And in my diagram something like this:
//define a shape that holds the body
$GO(go.Shape, "RoundedRectangle", {
portId: "",
fromLinkable: scope.isEditable,
toLinkable: scope.isEditable,
fromLinkableSelfNode: false,
toLinkableSelfNode: false,
fromLinkableDuplicates: false,
toLinkableDuplicates: false,
I’m broadcasting the status to false or true correctly but it make no impact on my diagram. Links keeps the initial scope’s state.
Any idea?
Thanks