mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-29 16:45:13 +02:00
only drag select with left mouse button
This commit is contained in:
parent
7aea9987de
commit
b95e2cb905
@ -21,6 +21,8 @@ export default {
|
||||
const dragging = ref(false);
|
||||
|
||||
const startDrag = (event) => {
|
||||
if (event.button !== 0)
|
||||
return;
|
||||
dragging.value = true;
|
||||
rect.x1 = rect.x2 = event.clientX;
|
||||
rect.y1 = rect.y2 = event.clientY;
|
||||
@ -34,6 +36,8 @@ export default {
|
||||
}
|
||||
|
||||
const endDrag = (event) => {
|
||||
if (event.button !== 0)
|
||||
return;
|
||||
window.removeEventListener('mousemove', drag);
|
||||
window.removeEventListener('mouseup', endDrag, true);
|
||||
drag(event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user