Gitlab is now using https://gitlab.lcsb.uni.lu as it's primary address. Please update your bookmarks. FAQ.

Commit 7e9cb567 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '1243-submap-id' into 'devel_14.0.x'

verify that submap exists

See merge request !1158
parents edeb95e8 8d030c8e
Pipeline #29119 passed with stage
in 17 minutes and 10 seconds
......@@ -6,6 +6,8 @@ minerva (14.0.13) stable; urgency=medium
* Bug fix: creating comment with too long name/email resulted in Internal
Server Error - now the proper error message is returned (#1245)
* Bug fix: user cannot put too long name in a comment dialog (#1245)
* Bug fix: when url contained invalid submap id unhandled error was raised
(#1243)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 3 Jun 2020 17:00:00 +0200
......
......@@ -54,13 +54,17 @@ function processUrlGetParams(params) {
}
var model = project.getModelById(modelId);
if (model !== null) {
if (GuiConnector.getParams["x"] !== undefined && GuiConnector.getParams["y"] !== undefined) {
var point = new Point(GuiConnector.getParams["x"], GuiConnector.getParams["y"]);
sessionData.setCenter(model, point);
}
if (GuiConnector.getParams["zoom"] !== undefined) {
sessionData.setZoomLevel(model, GuiConnector.getParams["zoom"]);
if (GuiConnector.getParams["x"] !== undefined && GuiConnector.getParams["y"] !== undefined) {
var point = new Point(GuiConnector.getParams["x"], GuiConnector.getParams["y"]);
sessionData.setCenter(model, point);
}
if (GuiConnector.getParams["zoom"] !== undefined) {
sessionData.setZoomLevel(model, GuiConnector.getParams["zoom"]);
}
} else {
logger.warn("Model with given ID does not exist: " + modelId);
}
if (GuiConnector.getParams["background"] !== undefined) {
......@@ -580,7 +584,7 @@ function create(params) {
}).then(function () {
var submapId = GuiConnector.getParams["submap"];
if (submapId !== undefined) {
if (submapId !== undefined && customMap.getSubmapById(submapId) !== null) {
return customMap.openSubmap(submapId);
}
}).then(function () {
......
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