summaryrefslogtreecommitdiff
path: root/public/js/syncscroll.js
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-05-27 02:04:38 +0800
committerCheng-Han, Wu2016-05-27 02:04:38 +0800
commitd90acf88e3f73dd00e85ee9435ddc4263acfcfbb (patch)
treebde2f64b89d4fe9b051264d8e0ddc55262b0e971 /public/js/syncscroll.js
parente9b0ce8e04552f6839cd5e353343a6d984d5027e (diff)
Update and fix editor might not sync scrolling from edit mode to both mode
Diffstat (limited to '')
-rw-r--r--public/js/syncscroll.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/public/js/syncscroll.js b/public/js/syncscroll.js
index 9d0bbe02..53070fc4 100644
--- a/public/js/syncscroll.js
+++ b/public/js/syncscroll.js
@@ -120,11 +120,7 @@ var viewScrollingDebounce = 200;
var editScrolling = false;
var editScrollingDebounce = 200;
-if (editor.getOption('scrollbarStyle') === 'native') {
- ui.area.codemirrorScroll.on('scroll', _.throttle(syncScrollToView, editScrollThrottle));
-} else {
- editor.on('scroll', _.throttle(syncScrollToView, editScrollThrottle));
-}
+ui.area.codemirrorScroll.on('scroll', _.throttle(syncScrollToView, editScrollThrottle));
ui.area.view.on('scroll', _.throttle(syncScrollToEdit, viewScrollThrottle));
var scrollMap, lineHeightMap, viewTop, viewBottom;