Mercurial > hg > orthanc-stone
diff Platforms/Wasm/wasm-application-runner.ts @ 418:c23df8b3433b
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 15 Nov 2018 18:32:48 +0100 |
parents | e33659decec5 |
children | 26b90b110719 |
line wrap: on
line diff
--- a/Platforms/Wasm/wasm-application-runner.ts Thu Nov 15 17:28:15 2018 +0100 +++ b/Platforms/Wasm/wasm-application-runner.ts Thu Nov 15 18:32:48 2018 +0100 @@ -10,7 +10,6 @@ // global functions var WasmWebService_NotifyError: Function = null; var WasmWebService_NotifySuccess: Function = null; -var WasmWebService_SetBaseUri: Function = null; var WasmDoAnimation: Function = null; var SetStartupParameter: Function = null; var CreateWasmApplication: Function = null; @@ -58,8 +57,6 @@ function _InitializeWasmApplication(orthancBaseUrl: string): void { CreateWasmApplication(); - WasmWebService_SetBaseUri(orthancBaseUrl); - // parse uri and transmit the parameters to the app before initializing it let parameters = GetUriParameters(); @@ -70,9 +67,9 @@ } } - StartWasmApplication(); + StartWasmApplication(orthancBaseUrl); - // trigger a first resize of the canvas that have just been initialized + // trigger a first resize of the canvas that has just been initialized Stone.WasmViewport.ResizeAll(); DoAnimationThread(); @@ -92,11 +89,10 @@ CreateWasmApplication = StoneFrameworkModule.cwrap('CreateWasmApplication', null, ['number']); CreateCppViewport = StoneFrameworkModule.cwrap('CreateCppViewport', 'number', []); ReleaseCppViewport = StoneFrameworkModule.cwrap('ReleaseCppViewport', null, ['number']); - StartWasmApplication = StoneFrameworkModule.cwrap('StartWasmApplication', null, ['number']); + StartWasmApplication = StoneFrameworkModule.cwrap('StartWasmApplication', null, ['string']); WasmWebService_NotifySuccess = StoneFrameworkModule.cwrap('WasmWebService_NotifySuccess', null, ['number', 'string', 'array', 'number', 'number']); WasmWebService_NotifyError = StoneFrameworkModule.cwrap('WasmWebService_NotifyError', null, ['number', 'string', 'number']); - WasmWebService_SetBaseUri = StoneFrameworkModule.cwrap('WasmWebService_SetBaseUri', null, ['string']); WasmDoAnimation = StoneFrameworkModule.cwrap('WasmDoAnimation', null, []); SendMessageToStoneApplication = StoneFrameworkModule.cwrap('SendMessageToStoneApplication', 'string', ['string']);