# HG changeset patch # User Sebastien Jodogne # Date 1600348788 -7200 # Node ID b8b4cb58a874236c6b628d98a6d487ce3044aa9c # Parent e731e62692a9c34ba236fd0f0eb7df9e966475fb removed unnecessary include diff -r e731e62692a9 -r b8b4cb58a874 Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp --- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Thu Sep 17 15:18:21 2020 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Thu Sep 17 15:19:48 2020 +0200 @@ -56,7 +56,6 @@ // Orthanc framework includes #include #include -#include #include #include #include diff -r e731e62692a9 -r b8b4cb58a874 OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp --- a/OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp Thu Sep 17 15:18:21 2020 +0200 +++ b/OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp Thu Sep 17 15:19:48 2020 +0200 @@ -207,7 +207,15 @@ void WebAssemblyViewport::Invalidate() { - emscripten_request_animation_frame(OnRequestAnimationFrame, reinterpret_cast(this)); + if (compositor_.get() != NULL && + controller_ /* should always be true */) + { + printf("TOTO3\n"); + UpdateSize(*compositor_); + OnRequestAnimationFrame(0, reinterpret_cast(this)); + } + + //emscripten_request_animation_frame(OnRequestAnimationFrame, reinterpret_cast(this)); } void WebAssemblyViewport::AcquireCompositor(ICompositor* compositor /* takes ownership */)