From 6e2e3ce9fb580aaf66532e785fdc7c6167761e79 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 8 Jul 2020 14:14:36 +0530 Subject: [PATCH] Use the smooth scrolling speed for highlights drag scrolling --- src/pyj/read_book/create_annotation.pyj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyj/read_book/create_annotation.pyj b/src/pyj/read_book/create_annotation.pyj index 94bbd076ea..ff22edfe4d 100644 --- a/src/pyj/read_book/create_annotation.pyj +++ b/src/pyj/read_book/create_annotation.pyj @@ -514,7 +514,8 @@ class CreateAnnotation: self.drag_scroll_timer = None if self.state not in (DRAGGING_RIGHT, DRAGGING_LEFT): return - interval = 100 if self.in_flow_mode else 1200 + sd = get_session_data() + interval = 1000/sd.get('lines_per_sec_smooth') if self.in_flow_mode else 1200 self.drag_scroll_timer = window.setTimeout(self.do_one_drag_scroll.bind(None, backwards, distance_from_boundary), interval) now = window.performance.now() if now - self.last_drag_scroll_at > interval: