[FIX] DragDrop functionality is turned on for an object during the MouseDown event...
authorVaibhav (OpenERP) <vda@tinyerp.com>
Mon, 5 Sep 2011 08:04:34 +0000 (13:34 +0530)
committerVaibhav (OpenERP) <vda@tinyerp.com>
Mon, 5 Sep 2011 08:04:34 +0000 (13:34 +0530)
bzr revid: vda@tinyerp.com-20110905080434-u8znc0wx7tasyct2

addons/base_diagram/static/lib/js/dracula_graph.js

index f7069c5..7cf8b9c 100644 (file)
@@ -160,11 +160,13 @@ Graph.Renderer.Raphael = function(element, graph, width, height) {
      */
     this.isDrag = false;
     this.dragger = function (e) {
-        this.dx = e.clientX;
-        this.dy = e.clientY;
-        selfRef.isDrag = this;
-        this.set && this.set.animate({"fill-opacity": .1}, 200) && this.set.toFront();
-        e.preventDefault && e.preventDefault();
+       if(e.detail < 2) {
+               this.dx = e.clientX;
+               this.dy = e.clientY;
+               selfRef.isDrag = this;
+               this.set && this.set.animate({"fill-opacity": .1}, 200) && this.set.toFront();
+               e.preventDefault && e.preventDefault();
+       }
     };
     
     var d = document.getElementById(element);