diff Applications/StoneWebViewer/WebApplication/app.js @ 1697:c2802561d7f9

"PrintEnabled" configuration option
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 27 Nov 2020 09:47:46 +0100
parents 572652803929
children 8805a6a01655
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/app.js	Fri Nov 27 09:34:02 2020 +0100
+++ b/Applications/StoneWebViewer/WebApplication/app.js	Fri Nov 27 09:47:46 2020 +0100
@@ -31,8 +31,6 @@
 // Registry of the PDF series for which the instance metadata is still waiting
 var pendingSeriesPdf_ = {};
 
-var globalConfiguration_ = {};
-
 
 function getParameterFromUrl(key) {
   var url = window.location.search.substring(1);
@@ -266,6 +264,7 @@
       showInfo: true,
       showReferenceLines: true,
       synchronizedBrowsing: false,
+      globalConfiguration: {},
 
       modalWarning: false,
       modalNotDiagnostic: false,
@@ -838,8 +837,9 @@
 
   axios.get(CONFIGURATION_SOURCE)
     .then(function(response) {
-      globalConfiguration_ = ParseJsonWithComments(response.data);
-      
+      app.globalConfiguration = ParseJsonWithComments(response.data);
+      console.log(app.globalConfiguration);
+
       // Option 1: Loading script using plain HTML
       
       /*
@@ -882,7 +882,7 @@
 
 window.addEventListener('message', function(e) {
   if ('type' in e.data) {
-    var expectedOrigin = globalConfiguration_['ExpectedMessageOrigin'];
+    var expectedOrigin = app.globalConfiguration['ExpectedMessageOrigin'];
     
     if (expectedOrigin === undefined) {
       alert('Dynamic actions are disabled in the Stone Web viewer, ' +