Some fixes in the reset zoom when the selection rectangle is running.

This commit is contained in:
mdtrooper 2016-03-28 19:42:21 +02:00
parent 2ae5eb6021
commit 18902546c0
1 changed files with 3 additions and 3 deletions

View File

@ -94,9 +94,9 @@ MapController.prototype.init_map = function() {
var viewport_transform = d3.transform(
d3.select(self._target + " .viewport").attr("transform"));
self._zoomManager
.scale(viewport_transform.scale);
self._zoomManager
.scale(viewport_transform.scale[0])
.translate(viewport_transform.translate);
}
}
@ -152,7 +152,7 @@ MapController.prototype.init_map = function() {
function slided(d) {
var slider_value = parseFloat(self._slider.property("value"))
zoom_level = Math.exp(slider_value);
var zoom_level = Math.exp(slider_value);
/*----------------------------------------------------------------*/
/*-Code to translate the map with the zoom for to hold the center-*/