From f971c6adfaaaedfdf37f18efd01ed482397c322f Mon Sep 17 00:00:00 2001 From: anonymous Date: Mon, 13 Mar 2023 16:32:38 +0100 Subject: [PATCH] Fix https://github.com/mviewer/mviewerstudio/issues/157#issuecomment-1466096152 --- js/mviewerstudio.js | 6 +++--- lib/mv.js | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/js/mviewerstudio.js b/js/mviewerstudio.js index 7ee3c49d..6e1f210d 100644 --- a/js/mviewerstudio.js +++ b/js/mviewerstudio.js @@ -678,9 +678,9 @@ var getConfig = () => { 'coordinates="'+($('#opt-coordinates').prop('checked')=== true)+'"', 'measuretools="'+($('#opt-measuretools').prop('checked')=== true)+'"', 'mouseposition="'+($('#opt-mouseposition').prop('checked')=== true)+'"', - 'geoloc="'+($('#opt-geoloc').prop('checked')=== true)+'"', - 'studio="'+studioUrl+'"', - 'togglealllayersfromtheme="'+($('#opt-togglealllayersfromtheme').prop('checked')=== true)+'"']; + 'geoloc="' + ($('#opt-geoloc').prop('checked') === true) + '"', + 'studio="' + studiourl + '"', + 'togglealllayersfromtheme="' + ($('#opt-togglealllayersfromtheme').prop('checked') === true) + '"']; config.title = $("#opt-title").val(); diff --git a/lib/mv.js b/lib/mv.js index 8f7e1ec3..cba5f167 100755 --- a/lib/mv.js +++ b/lib/mv.js @@ -1251,7 +1251,11 @@ var mv = (function () { savedParameters.application.push(parameter); } }); +<<<<<<< HEAD ["title", "logo", "help", "style", "home", "favicon", "icon-help", "studio"].forEach(function (value, id) { +======= + ["title", "logo", "help", "style", "home", "favicon", "icon-help", "studio"].forEach(function(value,id) { +>>>>>>> f461c0f (Fix https://github.com/mviewer/mviewerstudio/issues/157#issuecomment-1466096152) if (application.attr(value)) { $("#opt-" + value).val(application.attr(value)).trigger("change"); } @@ -1260,6 +1264,16 @@ var mv = (function () { } if (value === "studio" && application.attr(value) != 'false') { $("#opt-studio").prop("checked", true); +<<<<<<< HEAD +======= + } + }); + + ["exportpng","zoomtools", "measuretools", "showhelp", "coordinates", "mouseposition", "geoloc", "initialextenttool", + "togglealllayersfromtheme"].forEach(function(value,id) { + if (application.attr(value) && application.attr(value) === "true") { + $("#opt-" + value).prop("checked", true); +>>>>>>> f461c0f (Fix https://github.com/mviewer/mviewerstudio/issues/157#issuecomment-1466096152) } });