# HG changeset patch # User Sebastien Jodogne # Date 1603723931 -3600 # Node ID 74ed691f9c647ec949211a91421d1c0a3ed5cbde # Parent b782f78aed425923abde3db094586d45265f0243 fix initial rendering of MPR sample diff -r b782f78aed42 -r 74ed691f9c64 Applications/Samples/Common/RtViewerView.cpp --- 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 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(); diff -r b782f78aed42 -r 74ed691f9c64 Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp --- 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";