diff Applications/StoneWebViewer/WebApplication/app.js @ 2013:dbafd535136e

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 02 Dec 2022 18:52:50 +0100
parents 25d269c7b753
children a7b5cb068fb8
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/app.js	Fri Dec 02 18:49:06 2022 +0100
+++ b/Applications/StoneWebViewer/WebApplication/app.js	Fri Dec 02 18:52:50 2022 +0100
@@ -411,6 +411,12 @@
       if (reschedule) {
         this.cineTimeoutId = setTimeout(this.CineCallback, 1000.0 / this.cineFramesPerSecond);
       }     
+    },
+    ClickVerticalScrollbar: function(event) {
+      var offset = event.currentTarget.getClientRects()[0];
+      var y = event.clientY - offset.top;
+      var height = event.currentTarget.offsetHeight;
+      this.currentFrame = Math.min(this.numberOfFrames - 1, Math.floor(y * this.numberOfFrames / (height - 1)));
     }
   }
 });