Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Luc Bourdot
codimd
Commits
db0ea715
Commit
db0ea715
authored
Jan 02, 2017
by
Wu Cheng-Han
Browse files
Update to improve editor performance by debounce checkEditorScrollbar event
parent
0db4358a
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/js/index.js
View file @
db0ea715
...
...
@@ -1223,7 +1223,11 @@ function checkSyncToggle() {
}
}
function
checkEditorScrollbar
()
{
var
checkEditorScrollbar
=
_
.
debounce
(
function
()
{
editor
.
operation
(
checkEditorScrollbarInner
);
},
50
);
function
checkEditorScrollbarInner
()
{
// workaround simple scroll bar knob
// will get wrong position when editor height changed
var
scrollInfo
=
editor
.
getScrollInfo
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment