Update to improve editor performance by debounce checkEditorScrollbar event
This commit is contained in:
parent
0db4358adb
commit
db0ea715c6
1 changed files with 5 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue