6
0
Эх сурвалжийг харах

Merge branch '97-extreme-clicking-drag' into 'master'

Resolve "extreme clicking drag"

Closes #97

See merge request troebs/pycs!111
Eric Tröbs 3 жил өмнө
parent
commit
dccef8f6c8

+ 11 - 2
webui/src/components/media/annotation-overlay.vue

@@ -42,7 +42,8 @@ export default {
       callback: false,
       start: false,
       fixed: false,
-      current: false
+      current: false,
+      mousedown: false
     }
   },
   computed: {
@@ -117,6 +118,8 @@ export default {
       }
     },
     press: function (event) {
+      this.mousedown = true;
+
       if (this.interaction === 'draw-box') {
         this.start = this.getEventCoordinates(event);
       }
@@ -159,8 +162,12 @@ export default {
       }
     },
     track: function (event) {
-      if (this.interaction === 'extreme-clicking')
+      if (this.interaction === 'extreme-clicking') {
+        if (this.mousedown)
+          this.press(event);
+
         return;
+      }
 
       if (this.start) {
         const coordinates = this.getEventCoordinates(event);
@@ -168,6 +175,8 @@ export default {
       }
     },
     release: function () {
+      this.mousedown = false;
+
       if (this.interaction === 'extreme-clicking')
         return;