From 73c59c1b72670d151053b86c8374d77048b598fc Mon Sep 17 00:00:00 2001 From: abbr Date: Sat, 14 Oct 2017 14:56:18 -0700 Subject: [PATCH] #9 added widget rotation spec --- src/components/mixins/rotatable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/mixins/rotatable.js b/src/components/mixins/rotatable.js index 9d6b3b2..a8fcfb8 100644 --- a/src/components/mixins/rotatable.js +++ b/src/components/mixins/rotatable.js @@ -14,7 +14,7 @@ exports.onRotateMouseDown = function(ev, idx, _axis, _operation) { let axis = _axis || 'z' let operation = _operation || 'rotate' // only left mouse button or touchstart - if (ev.button !== 0 && ev.type !== 'touchstart') return + if (ev.buttons !== 1 && ev.type !== 'touchstart') return document.addEventListener('mousemove', this.onRotateMouseMove) document.addEventListener('touchmove', this.onRotateMouseMove) document.addEventListener('mouseup', this.onRotateMouseUp)