Open rmberriman opened 5 years ago
Approved
The current code snippet in question is in file graphSetup.ts.
network.on('dragStart', function(callback) {
startP = callback.pointer.canvas;
});
network.on('dragEnd', function(cb) {
fromNode = cb.nodes[0];
network.moveNode(fromNode, startP.x, startP.y);
secP = cb.pointer.DOM;
}, false);
network.on('animationFinished', function() {
if (fromNode !== null && secP !== null) {
const toNode = network.getNodeAt(secP);
if (fromNode !== toNode && (nodes.get(fromNode)['shape'] === 'box') && (nodes.get(toNode)['shape'] === 'box')) {
mergeCommits(nodes.get(fromNode)['title']);
}
}
fromNode = null;
secP = null;
});
The issue is that the network.on('animationFinished', ... function never seems to be called. I will try to get this working and if I can then we can update the docs and fix it. Otherwise it may be best to fix the nodes like @SamuelZheng11 recommended in #298.
Approved!
Approved. We should fix the functionality in #323 before the wiki page is added so that users do not think they can already do this when it is currently not working properly.
Description As discussed in #298 when a user clicks and drags the nodes on the graph, they can be dragged freely but snap back to its original position with a slight offset. This was initially presumed to be a bug when it is in fact a feature that allows for merging and prevents any issues in the graph. A page on the Wiki in the User Guide should be created detailing this functionality to prevent user confusion.
Acceptance criteria
Related issues
298