Explorar el Código

fix: firefox can now create region annotations, fixes #9638

Torkel Ödegaard hace 8 años
padre
commit
0c2aa91e61

+ 5 - 2
public/vendor/flot/jquery.flot.js

@@ -2962,8 +2962,11 @@ Licensed under the MIT license.
         }
 
         function onClick(e) {
-            triggerClickHoverEvent("plotclick", e,
-                                   function (s) { return s["clickable"] != false; });
+          if (plot.isSelecting) {
+            return;
+          }
+
+          triggerClickHoverEvent("plotclick", e, function (s) { return s["clickable"] != false; });
         }
 
         // trigger click or hover event (they send the same parameters

+ 5 - 0
public/vendor/flot/jquery.flot.selection.js

@@ -152,6 +152,10 @@ The plugin allso adds the following methods to the plot object:
                 plot.getPlaceholder().trigger("plotselecting", [ null ]);
             }
 
+            setTimeout(function() {
+              plot.isSelecting = false;
+            }, 10);
+
             return false;
         }
 
@@ -218,6 +222,7 @@ The plugin allso adds the following methods to the plot object:
 
             setSelectionPos(selection.second, pos);
             if (selectionIsSane()) {
+                plot.isSelecting = true;
                 selection.show = true;
                 plot.triggerRedrawOverlay();
             }