senoz
February 21, 2019, 8:01am
#1
Tree Mapping in GOJS. I like to do if parent is mapped together then I allow children to map in the tree.
+ Parent1---------------------------Parent2
child1------------------------------Child10
child2
+Child3-------------------------------+Child11
child4--------------------------------Child12
Could you please help on this?
walter
February 21, 2019, 10:11am
#2
That sounds as if you need to define a linkValidation predicate: GoJS Validation -- Northwoods Software
senoz
February 27, 2019, 7:32am
#3
How to restrict the link to delete from the tree mapping
if (e.change === go.ChangedEvent.Remove && e.propertyName === "linkDataArray") {
return false;
}
I have to restrict the user to delete the link… above code is not working
walter
February 27, 2019, 11:06am
#4
Override CommandHandler | GoJS API
For example:
$(go.Diagram, ...,
{
"commandHandler.canDeleteSelection":
function() {
if (this.diagram.selection.any(function(p) {
return p instanceof go.Link && ... ;
})) return false;
return go.CommandHandler.prototype.canDeleteSelection.call(this);
},
...
});
senoz
February 27, 2019, 12:04pm
#5
We need the From and to points of the try to deleted items
walter
February 27, 2019, 12:46pm
#6
Surely you already know about Link.fromNode and Link.toNode ?
walter
Split this topic
February 28, 2019, 10:56am
#7
2 posts were split to a new topic: Unable to call getDocumentPoint
senoz
March 6, 2019, 12:43pm
#8
I have already listed the tree in tree mapping… I need to replace the nodeDataArray with new values it should be in the same tree format. I changed it but its not working…
walter
March 6, 2019, 1:05pm
#9
One doesn’t normally replace the Model.nodeDataArray unless one actually wants to replace the whole Diagram.model . This question does not involve the tree mapping sample, so I think it would be better as a separate topic.