Hi i’m trying to override the groupselection function to add some functionality to it, but i’m running into a problem.
i’ve looked at the Extensions intro in the API (http://gojs.net/latest/intro/extensions.html) and tried to do something similar, here’s the code:
var tool = diagram.commandHandler;
tool.groupSelection = function() {
graphWorker.setSelectedObjectKeys(diagram.selection.iterator);
go.GroupSelection.prototype.call(tool.groupSelection);
graphWorker.setGroup(diagram.selection.iterator);
graphWorker.createLinks(diagram);
}
I’m getting stuck at the point of calling the GroupSelection prototype, getting the message ‘Cannot read property ‘prototype’ of undefined’, i’ve tried reaching it through a couple of other (possible) ways but haven’t succeeded.
Some help, and explanation would be helpful!
Thanks in advance