comparison Platforms/Wasm/wasm-application.ts @ 240:ddbb339ed4cf am

orthancBaseUrl is now configurable
author am@osimis.io
date Wed, 20 Jun 2018 09:43:36 +0200
parents 126c9c0c9333
children 8ff70c04c6df
comparison
equal deleted inserted replaced
239:72b711f22a2b 240:ddbb339ed4cf
84 /************************************** */ 84 /************************************** */
85 85
86 UpdateContentThread(); 86 UpdateContentThread();
87 } 87 }
88 88
89 function InitializeWasmApplication(wasmModuleName: string) { 89 function InitializeWasmApplication(wasmModuleName: string, orthancBaseUrl: string) {
90 90
91 Stone.Framework.Configure(wasmModuleName); 91 Stone.Framework.Configure(wasmModuleName);
92 92
93 // Wait for the Orthanc Framework to be initialized (this initializes 93 // Wait for the Orthanc Framework to be initialized (this initializes
94 // the WebAssembly environment) and then, create and initialize the Wasm application 94 // the WebAssembly environment) and then, create and initialize the Wasm application
104 104
105 WasmWebService_NotifySuccess = StoneFrameworkModule.cwrap('WasmWebService_NotifySuccess', null, ['number', 'string', 'array', 'number', 'number']); 105 WasmWebService_NotifySuccess = StoneFrameworkModule.cwrap('WasmWebService_NotifySuccess', null, ['number', 'string', 'array', 'number', 'number']);
106 WasmWebService_NotifyError = StoneFrameworkModule.cwrap('WasmWebService_NotifyError', null, ['number', 'string', 'number']); 106 WasmWebService_NotifyError = StoneFrameworkModule.cwrap('WasmWebService_NotifyError', null, ['number', 'string', 'number']);
107 NotifyUpdateContent = StoneFrameworkModule.cwrap('NotifyUpdateContent', null, []); 107 NotifyUpdateContent = StoneFrameworkModule.cwrap('NotifyUpdateContent', null, []);
108 108
109 StoneFrameworkModule.ccall('WasmWebService_SetBaseUrl', null, ['string'], [orthancBaseUrl]);
110
109 // Prevent scrolling 111 // Prevent scrolling
110 document.body.addEventListener('touchmove', function (event) { 112 document.body.addEventListener('touchmove', function (event) {
111 event.preventDefault(); 113 event.preventDefault();
112 }, false); 114 }, false);
113 115