From bc0cd7f57015da79b40e5e2d7d704666486bd39c Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 18 Apr 2016 10:45:34 +0200 Subject: [PATCH] New maps in progress... (Fixed "delete modules" and "delete modulegroups" when "show modules" and "show module groups" are enable --- .../include/javascript/map/MapController.js | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/javascript/map/MapController.js b/pandora_console/include/javascript/map/MapController.js index 00b8777692..825469b59e 100644 --- a/pandora_console/include/javascript/map/MapController.js +++ b/pandora_console/include/javascript/map/MapController.js @@ -568,6 +568,11 @@ MapController.prototype.event_toggle_minimap = function() { } } +/** +* Function get_real_size_map +* Return [width, height] +* This function returns the real map size +*/ MapController.prototype.get_real_size_map = function() { var self = this; @@ -1511,7 +1516,6 @@ MapController.prototype.events_for_nodes = function(id_node) { var node_menu = self.get_menu_nodes(); - d3.selectAll(selector) .on("mouseover", function(d) { if (!self._dragging) { @@ -1741,9 +1745,29 @@ MapController.prototype.is_delety = function(node) { case ITEM_TYPE_FICTIONAL_NODE: return_var = true; break; + case ITEM_TYPE_MODULE_NETWORKMAP: + if (filter['show_modules']) { + return_var = true; + } + else { + return_var = false; + } + break; + case ITEM_TYPE_MODULEGROUP_NETWORKMAP: + if (filter['show_modules']) { + if (filter['show_module_group']) { + return_var = true; + } + else { + return_var = false; + } + } + else { + return_var = false; + } + break; } - return return_var; } @@ -2603,7 +2627,7 @@ MapController.prototype.deleteNode = function(self, target) { arrowsToDelete.forEach(function(arrow) { d3.select("#arrow_" + arrow).remove(); }); - + d3.select(self._target + " #" + id_node).remove(); d3.select(self._target + " .minimap" + " #" + id_node).remove(); });