Mercurial > hg > orthanc-stone
changeset 1594:74ed691f9c64
fix initial rendering of MPR sample
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 26 Oct 2020 15:52:11 +0100 |
parents | b782f78aed42 |
children | 621e4e11783d |
files | Applications/Samples/Common/RtViewerView.cpp Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Applications/Samples/Common/RtViewerView.cpp Fri Oct 23 17:39:16 2020 +0200 +++ b/Applications/Samples/Common/RtViewerView.cpp Mon Oct 26 15:52:11 2020 +0100 @@ -249,6 +249,14 @@ void RtViewerView::PrepareViewport() { std::unique_ptr<IViewport::ILock> lock(viewport_->Lock()); + + /** + * The method "RefreshCanvasSize()" must be used before the first + * rendering, or when the layout of the HTML page changes, which + * does not trigger the "emscripten_set_resize_callback()" event + **/ + lock->RefreshCanvasSize(); + ViewportController& controller = lock->GetController(); ICompositor& compositor = lock->GetCompositor();
--- a/Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp Fri Oct 23 17:39:16 2020 +0200 +++ b/Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp Mon Oct 26 15:52:11 2020 +0100 @@ -157,7 +157,8 @@ { OrthancStone::StoneInitialize(); Orthanc::Logging::Initialize(); - Orthanc::Logging::EnableTraceLevel(true); + //Orthanc::Logging::EnableTraceLevel(true); + Orthanc::Logging::EnableInfoLevel(true); LOG(WARNING) << "Initializing native Stone";