Created
August 27, 2019 09:20
-
-
Save rowan-m/79baefa09dd751ac1ab5411806e27bc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_onMousedown(e) { | |
this._touchX = e.clientX; | |
this._touchY = e.clientY; | |
this._rotationStart(); | |
document.addEventListener('mousemove', this._onMousemove); | |
document.addEventListener('mouseup', this._onMouseup); | |
} | |
_onMousemove(e) { | |
e.preventDefault(); | |
this._touchX = e.clientX; | |
this._touchY = e.clientY; | |
this._rotationChange(); | |
} | |
_onMouseup(e) { | |
e.preventDefault(); | |
document.removeEventListener('mousemove', this._onMousemove); | |
document.removeEventListener('mouseup', this._onMouseup); | |
this._rotationEnd(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment