From ce06e959000309eb7c940cc1c590aad86fcc1855 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 17 May 2016 11:44:20 +0200 Subject: [PATCH] Resize to fill the page the viewport of new networkmap. --- pandora_console/include/class/Map.class.php | 2 +- .../include/javascript/map/MapController.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/class/Map.class.php b/pandora_console/include/class/Map.class.php index 66fb7665f6..e01def0c7d 100644 --- a/pandora_console/include/class/Map.class.php +++ b/pandora_console/include/class/Map.class.php @@ -183,7 +183,7 @@ abstract class Map { ?> - + embedded_symbols_for_firefox(); ?> diff --git a/pandora_console/include/javascript/map/MapController.js b/pandora_console/include/javascript/map/MapController.js index c9665340b4..7f41d90f1e 100644 --- a/pandora_console/include/javascript/map/MapController.js +++ b/pandora_console/include/javascript/map/MapController.js @@ -63,8 +63,24 @@ MapController.prototype._enabled_minimap = true; MapController.prototype.init_map = function() { var self = this; + width_svg = $("#map_" + self._id).width(); + if ($("#main").height()) { + height_svg = $("#main").height(); + } + else { + //Set the height in the pure view (fullscreen). + + height_svg = $(window).height() - + $("#menu_tab_frame_view").height() - + 20; // 20 of margin + } + var svg = d3.select(self._target + " svg"); + svg + .attr("width", width_svg) + .attr("height", height_svg) + self._zoomManager = d3.behavior.zoom() .scaleExtent([1/MAX_ZOOM_LEVEL, MAX_ZOOM_LEVEL]).on("zoom", zoom);