Resize to fill the page the viewport of new networkmap.
This commit is contained in:
parent
5d53de11a7
commit
ce06e95900
|
@ -183,7 +183,7 @@ abstract class Map {
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" pointer-events="all" width="<?php echo $width;?>" height="<?php echo $height;?>">
|
<svg id="svg_map_<?php echo $this->id;?>" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" pointer-events="all" width="<?php echo $width;?>" height="<?php echo $height;?>">
|
||||||
<?php
|
<?php
|
||||||
$this->embedded_symbols_for_firefox();
|
$this->embedded_symbols_for_firefox();
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -63,8 +63,24 @@ MapController.prototype._enabled_minimap = true;
|
||||||
MapController.prototype.init_map = function() {
|
MapController.prototype.init_map = function() {
|
||||||
var self = this;
|
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");
|
var svg = d3.select(self._target + " svg");
|
||||||
|
|
||||||
|
svg
|
||||||
|
.attr("width", width_svg)
|
||||||
|
.attr("height", height_svg)
|
||||||
|
|
||||||
self._zoomManager =
|
self._zoomManager =
|
||||||
d3.behavior.zoom()
|
d3.behavior.zoom()
|
||||||
.scaleExtent([1/MAX_ZOOM_LEVEL, MAX_ZOOM_LEVEL]).on("zoom", zoom);
|
.scaleExtent([1/MAX_ZOOM_LEVEL, MAX_ZOOM_LEVEL]).on("zoom", zoom);
|
||||||
|
|
Loading…
Reference in New Issue