Do not compare to 'mousedown' on every 'mousemove'
This commit is contained in:
parent
0f48f31e08
commit
5782915983
|
|
@ -1117,9 +1117,11 @@ export default class RFB extends EventTargetMixin {
|
|||
|
||||
let bmask = RFB._convertButtonMask(ev.buttons);
|
||||
|
||||
let down = ev.type == 'mousedown';
|
||||
let down = false;
|
||||
switch (ev.type) {
|
||||
case 'mousedown':
|
||||
down = true;
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case 'mouseup':
|
||||
if (this._dragViewport) {
|
||||
this._cursor.setLocalCursor(down ? 'grabbing' : 'grab');
|
||||
|
|
|
|||
Loading…
Reference in New Issue