diff Samples/WebAssembly/BasicScene.cpp @ 631:ea8322566596

notes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 08 May 2019 18:26:52 +0200
parents 0925b27e8750
children 419e5662d7a5
line wrap: on
line diff
--- a/Samples/WebAssembly/BasicScene.cpp	Tue May 07 18:34:40 2019 +0200
+++ b/Samples/WebAssembly/BasicScene.cpp	Wed May 08 18:26:52 2019 +0200
@@ -343,10 +343,16 @@
 
 void OrthancStone::WebAssemblyViewport::SetupEvents(const std::string& canvas)
 {
-  //emscripten_set_click_callback(canvas.c_str(), this, false, OnMouseEvent);
-  emscripten_set_mousedown_callback(canvas.c_str(), this, false, OnMouseEvent);
-  emscripten_set_mousemove_callback(canvas.c_str(), this, false, OnMouseEvent);
-  emscripten_set_mouseup_callback(canvas.c_str(), this, false, OnMouseEvent);
+  if (0)
+  {
+    emscripten_set_click_callback(canvas.c_str(), this, false, OnMouseEvent);
+  }
+  else
+  {
+    emscripten_set_mousedown_callback(canvas.c_str(), this, false, OnMouseEvent);
+    emscripten_set_mousemove_callback(canvas.c_str(), this, false, OnMouseEvent);
+    emscripten_set_mouseup_callback(canvas.c_str(), this, false, OnMouseEvent);
+  }
 }