From 651b405c424a144f9cf36880e61753e672f11110 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Fri, 1 Apr 2016 11:54:31 +0200 Subject: [PATCH] Fixed somethings in the selection box. --- .../include/javascript/map/MapController.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/javascript/map/MapController.js b/pandora_console/include/javascript/map/MapController.js index 4615e58750..3b36f90ac9 100644 --- a/pandora_console/include/javascript/map/MapController.js +++ b/pandora_console/include/javascript/map/MapController.js @@ -39,7 +39,6 @@ MapController.prototype._slider = null; MapController.prototype._relation = null; MapController.prototype._start_multiple_selection = false; MapController.prototype._flag_multiple_selection = false; -MapController.prototype._stop_dragging = false; MapController.prototype._cache_files = {}; MapController.prototype._last_event = null; MapController.prototype._last_mouse_position = null; @@ -1339,16 +1338,11 @@ MapController.prototype.init_events = function(principalObject) { .on("keydown", function() { // ctrl key if (d3.event.keyCode === CONTROL_KEY) { - self._flag_multiple_selection = true; - self._stop_dragging = true; - self.multiple_selection_start(); } }) .on("keyup", function() { if (d3.event.keyCode === CONTROL_KEY) { - self._flag_multiple_selection = false; - self._stop_dragging = false; self.multiple_selection_end(); } }); @@ -1833,7 +1827,7 @@ MapController.prototype.make_arrow = function(from_id, to_id) { */ MapController.prototype.get_status_selection_node = function(id_node) { var self = this; - + var status = d3.select(self._target + " #node_" + id_node) .attr("data-select"); @@ -1853,6 +1847,8 @@ MapController.prototype.get_status_selection_node = function(id_node) { MapController.prototype.multiple_selection_start = function() { var self = this; + self._flag_multiple_selection = true; + if (!self._cache_files.hasOwnProperty("selection_box")) { var selection_box = d3 .select(self._target + " svg") @@ -1954,6 +1950,8 @@ MapController.prototype.multiple_selection_dragging = function(x, y, first) { MapController.prototype.multiple_selection_end = function() { var self = this; + self._flag_multiple_selection = false; + var selection_box = d3 .select(self._target + " #selection_box");