diff Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp @ 1897:144f8f82c15a

added ctrl key in RtViewerWasm
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Jan 2022 17:28:47 +0100
parents 7053b8a0aaec
children 1cfd602de69d
line wrap: on
line diff
--- a/Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp	Wed Jan 26 17:19:37 2022 +0100
+++ b/Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp	Wed Jan 26 17:28:47 2022 +0100
@@ -80,9 +80,18 @@
 
     int delta = 0;
     if (wheelEvent->deltaY < 0)
+    {
       delta = -1;
-    if (wheelEvent->deltaY > 0)
+    }
+    else if (wheelEvent->deltaY > 0)
+    {
       delta = 1;
+    }
+
+    if (wheelEvent->mouse.ctrlKey)
+    {
+      delta *= 10;
+    }
 
     that->Scroll(delta);