From 8d78dc1a703cc9f8d7efa4b310de16ae3a0b7bfe Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Fri, 26 May 2017 16:50:39 +0200
Subject: [PATCH] showModel method removed

---
 frontend-js/src/main/js/gui/OverviewDialog.js | 9 ++++++---
 frontend-js/src/main/js/map/CustomMap.js      | 7 -------
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/frontend-js/src/main/js/gui/OverviewDialog.js b/frontend-js/src/main/js/gui/OverviewDialog.js
index 785ba2a210..cf4349f304 100644
--- a/frontend-js/src/main/js/gui/OverviewDialog.js
+++ b/frontend-js/src/main/js/gui/OverviewDialog.js
@@ -116,9 +116,12 @@ OverviewDialog.prototype.showOverview = function(overviewImageId) {
       if (link.type === "OverviewModelLink") {
         logger.debug("Opening model from overview. ModelId: " + link.modelLinkId);
         logger.debug("link coordinates [" + link.idObject + "]: " + link.latLng);
-        // TODO min zoom value can be different for every map, it should be
-        // changed in the future
-        map.showModel(link.modelLinkId, link.latLng, link.zoomLevel + map.getMinZoom());
+        
+        map.openSubmap(link.modelLinkId);
+        var submap = this.getSubmapById(id);
+        submap.setCenter(link.latLng);
+        submap.setZoom(link.zoomLevel + submap.getMinZoom());
+        
         $(self.getElement()).dialog("close");
       } else if (link.type === "OverviewImageLink") {
         logger.debug("Opening image from overview. ImageId: " + link.imageLinkId);
diff --git a/frontend-js/src/main/js/map/CustomMap.js b/frontend-js/src/main/js/map/CustomMap.js
index 255f1841e0..e42076c999 100644
--- a/frontend-js/src/main/js/map/CustomMap.js
+++ b/frontend-js/src/main/js/map/CustomMap.js
@@ -525,13 +525,6 @@ CustomMap.prototype.removeSelection = function() {
   }
 };
 
-CustomMap.prototype.showModel = function(id, point, zoomLevel) {
-  this.openSubmap(id);
-  var submap = this.getSubmapById(id);
-  submap.setCenter(point);
-  submap.setZoom(zoomLevel);
-};
-
 /**
  * Returns list of layouts that are selected and visualized by javascript.
  * 
-- 
GitLab