From ef1d7e22bc212f1110911423e44522571e07699d Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Tue, 9 Feb 2016 16:33:36 +0100 Subject: [PATCH] New maps in progress... (pop-up window to nodes) --- .../include/javascript/map/MapController.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/javascript/map/MapController.js b/pandora_console/include/javascript/map/MapController.js index f2425c41df..8f0ac1555f 100644 --- a/pandora_console/include/javascript/map/MapController.js +++ b/pandora_console/include/javascript/map/MapController.js @@ -15,7 +15,7 @@ // Constructor var MapController = function(target) { this._target = target; - + this._id = $(target).data('id'); } @@ -57,7 +57,7 @@ MapController.prototype.click_event = function(event) { switch (event.which) { case 1: if ($(event.currentTarget).attr("class") == "node") { - self.popup_map(); + self.popup_map(self, event); } break; case 2: @@ -69,6 +69,16 @@ MapController.prototype.click_event = function(event) { } } -MapController.prototype.popup_map = function() { - //POP-UP +MapController.prototype.popup_map = function(self, event) { + //console.log($(self._target + " svg")); + //console.log(event); + var xPos = event.pageX; + var YPos = event.pageY; + $(self._target + " svg").after($("
").attr("id", "dialog_popup")); + $("#dialog_popup").dialog({ + modal: false, + title: "Ventana Modarrrrl!!", + resizable: false, + position: [xPos,YPos] + }); }