Merge pull request #477 from pycodev/master

fix plugin.behaviour.analysis panCanvas bug
This commit is contained in:
Yellowthrough 2018-09-17 22:20:00 +08:00 committed by GitHub
commit 1526e79486

View File

@ -36,6 +36,7 @@ function panCanvas(graph, button = 'left', panBlank = false) {
});
});
graph.behaviourOn('dragstart', () => {
graph.forcePreventAnimate(true);
graph.css({
cursor: '-webkit-grabbing'
});
@ -54,6 +55,7 @@ function panCanvas(graph, button = 'left', panBlank = false) {
graph.css({
cursor: '-webkit-grab'
});
graph.forcePreventAnimate(false);
});
graph.behaviourOn('canvas:mouseleave', () => {
lastPoint = undefined;