Commit 3ad87a2f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

overview dialog is closing when link to map provided

parent 9ba8b89e
......@@ -170,14 +170,6 @@ GuiConnector.showSelectionMenu = function(x, y) {
}
};
/**
* Gets html div where overview images should be visualized.
*
*/
GuiConnector.getOverviewHtmlTag = function() {
return document.getElementById(ServerConnector.formIdentifier + ':overviewDialog');
};
/**
* Updates coordinates of the mouse in the browser.
*/
......@@ -240,10 +232,6 @@ GuiConnector.getObjectByPrimefaceId = function(id) {
return $(PrimeFaces.escapeClientId(id));
};
GuiConnector.getOverviewDialog = function() {
return _overviewDialog;
};
GuiConnector.alert = function(message) {
logger.error(message);
alert(message);
......
......@@ -119,14 +119,14 @@ OverviewDialog.prototype.showOverview = function(overviewImageId) {
// 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());
overviewDialog.hide();
$(self.getElement()).dialog("close");
} else if (link.type === "OverviewImageLink") {
logger.debug("Opening image from overview. ImageId: " + link.imageLinkId);
self.showOverview(link.imageLinkId);
} else if (link.type === "OverviewSearchLink") {
logger.debug("Sending search query. Query: " + link.query);
GuiConnector.search(link.query);
overviewDialog.hide();
$(self.getElement()).dialog("close");
} else {
logger.warn("Unknown type of link: " + link.type + ". Don't know what to do... LinkId: " + link.idObject);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment