From 07928af5969efc9a97be3e29b93e0670353107d7 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 30 Mar 2016 10:38:41 +0200 Subject: [PATCH] New maps in progress... (Document the code) --- .../include/javascript/map/MapController.js | 38 +++++++++++++++++-- .../javascript/map/NetworkmapController.js | 20 ++++++++++ 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/javascript/map/MapController.js b/pandora_console/include/javascript/map/MapController.js index 94c93b63a6..425f17b12c 100644 --- a/pandora_console/include/javascript/map/MapController.js +++ b/pandora_console/include/javascript/map/MapController.js @@ -459,9 +459,6 @@ MapController.prototype.paint_toggle_button = function(wait) { toggle_minimap_button_layer.on("click", function() { - //~ d3.event.sourceEvent.stopPropagation(); - //~ d3.event.sourceEvent.preventDefault(); - self.event_toggle_minimap(); }); break; @@ -1530,6 +1527,11 @@ MapController.prototype.init_events = function(principalObject) { } } +/** +* Function get_status_selection_node +* Return node status +* This function returns the status of a node +*/ MapController.prototype.get_status_selection_node = function(id_node) { var self = this; @@ -1539,6 +1541,11 @@ MapController.prototype.get_status_selection_node = function(id_node) { return status.split(" "); } +/** +* Function multiple_selection_start +* Return void +* This function init multiple selection mode +*/ MapController.prototype.multiple_selection_start = function() { var self = this; @@ -1569,6 +1576,11 @@ MapController.prototype.multiple_selection_start = function() { } } +/** +* Function multiple_selection_dragging +* Return void +* This function init multiple selection drag +*/ MapController.prototype.multiple_selection_dragging = function(x, y, first) { var self = this; @@ -1630,6 +1642,11 @@ MapController.prototype.multiple_selection_dragging = function(x, y, first) { } } +/** +* Function multiple_selection_end +* Return void +* This function ends multiple selection mode +*/ MapController.prototype.multiple_selection_end = function() { var self = this; @@ -1643,6 +1660,11 @@ MapController.prototype.multiple_selection_end = function() { .attr("height", 0); } +/** +* Function multiple_selection_select_nodes +* Return void +* This function gets the nodes in the selection zone +*/ MapController.prototype.multiple_selection_select_nodes = function() { var self = this; @@ -1721,6 +1743,11 @@ MapController.prototype.multiple_selection_select_nodes = function() { }); } +/** +* Function remove_selection_nodes +* Return void +* This function removes the selection +*/ MapController.prototype.remove_selection_nodes = function() { var self = this; @@ -1732,6 +1759,11 @@ MapController.prototype.remove_selection_nodes = function() { }); } +/** +* Function select_node +* Return void +* This function gets the node eith selection mode +*/ MapController.prototype.select_node = function(node_id, type) { var self = this; diff --git a/pandora_console/include/javascript/map/NetworkmapController.js b/pandora_console/include/javascript/map/NetworkmapController.js index 099bb78bd8..239664489c 100644 --- a/pandora_console/include/javascript/map/NetworkmapController.js +++ b/pandora_console/include/javascript/map/NetworkmapController.js @@ -403,6 +403,11 @@ NetworkmapController.prototype.paint_arrows = function() { } +/** +* Function arrow_by_pieces +* Return void +* This function creates the arrow by pieces +*/ NetworkmapController.prototype.arrow_by_pieces = function (target, arrow_data, wait) { var self = this; @@ -1071,6 +1076,11 @@ NetworkmapController.prototype.arrow_by_pieces_AMA = function(target, arrow_data } } +/** +* Function truncate_interfaces_title +* Return void +* This function truncates the interface text title +*/ NetworkmapController.prototype.truncate_interfaces_title = function(arrow_data) { var self = this; @@ -1170,6 +1180,11 @@ NetworkmapController.prototype.truncate_interfaces_title = function(arrow_data) } } +/** +* Function re_rotate_interfaces_title +* Return void +* This function rotate the interface text title +*/ NetworkmapController.prototype.re_rotate_interfaces_title = function(arrow_data) { var self = this; @@ -1302,6 +1317,11 @@ NetworkmapController.prototype.re_rotate_interfaces_title = function(arrow_data) } } +/** +* Function update_interfaces_status +* Return void +* This function updates the interfaces status +*/ NetworkmapController.prototype.update_interfaces_status = function (arrow_data) { var self = this;