correction
authorveltr
Fri, 25 May 2012 16:45:40 +0200
changeset 69 7bb5f89ad242
parent 68 4def147b1604
child 70 43012525c832
correction
timeline/js/timeline.js
--- a/timeline/js/timeline.js	Fri May 25 16:32:31 2012 +0200
+++ b/timeline/js/timeline.js	Fri May 25 16:45:40 2012 +0200
@@ -272,26 +272,18 @@
     if (this.mouse_down) {
         this.is_dragging = true;
         this.hideTooltip();
-        if (_event.pageX > this.dragging_bounds.left
-            && _event.pageX < this.dragging_bounds.right
-            && _event.pageY > this.dragging_bounds.top
-            && _event.pageY < this.dragging_bounds.bottom
-        ) {
-            switch (this.dragging_type) {
-                case "occurrence":
-                    var _d = this.timeFromMouse(_event.pageX);
-                    this.editing_occurrence.date = _d;
-                    var _u = Math.max(0,Math.min(this.univers.length, Math.floor((_event.pageY - this.dragging_bounds.top) / this.univers_height)));
-                    this.editing_occurrence.univers = this.univers[_u];
-                    this.editing_occurrence.univers_id = this.univers[_u].id;
-                    this.throttledDrawGrid();
-                break;
-                case "timeline":
-                    this.setTime(this.time_at_start + Math.floor(( this.start_pos.x - _event.pageX ) / this.current_scale));
-                break;
-            }
-        } else {
-            this.onMouseUp(_event);
+        switch (this.dragging_type) {
+            case "occurrence":
+                var _d = this.timeFromMouse(_event.pageX);
+                this.editing_occurrence.date = _d;
+                var _u = Math.max(0,Math.min(this.univers.length, Math.floor((_event.pageY - this.dragging_bounds.top) / this.univers_height)));
+                this.editing_occurrence.univers = this.univers[_u];
+                this.editing_occurrence.univers_id = this.univers[_u].id;
+                this.throttledDrawGrid();
+            break;
+            case "timeline":
+                this.setTime(this.time_at_start + Math.floor(( this.start_pos.x - _event.pageX ) / this.current_scale));
+            break;
         }
     }
 }