configure what mouse buttons can be used for drag&drop

This commit is contained in:
Anton Lavrenov
2019-02-14 10:33:58 -05:00
parent dcff79eb63
commit 1dea3696a2
8 changed files with 60 additions and 26 deletions

View File

@@ -112,11 +112,34 @@ suite('DragAndDrop', function() {
assert(circle.isDragging() === false, 'no dragging with right click');
Konva.dragButtons = [0, 2];
stage.simulateMouseUp({
x: 291,
y: 112,
button: 2
});
// simulate buttons change
stage.simulateMouseDown({
x: 291,
y: 112,
button: 2
});
stage.simulateMouseMove({
x: 311,
y: 112,
button: 2
});
assert(circle.isDragging() === true, 'no dragging with right click');
stage.simulateMouseUp({
x: 291,
y: 112,
button: 2
});
Konva.dragButtons = [0];
});
// ======================================================