Fix revision viewer might not update after data init, try to use editor operation queue to enhance updateView performance
This commit is contained in:
parent
a9d7d7438f
commit
93ec43c3dc
1 changed files with 5 additions and 2 deletions
|
@ -138,7 +138,7 @@ function wrapTextWith(cm, symbol) {
|
|||
}
|
||||
|
||||
var idleTime = 300000; //5 mins
|
||||
var updateViewDebounce = 200;
|
||||
var updateViewDebounce = 100;
|
||||
var cursorMenuThrottle = 50;
|
||||
var cursorActivityDebounce = 50;
|
||||
var cursorAnimatePeriod = 100;
|
||||
|
@ -1761,6 +1761,7 @@ function initRevisionViewer() {
|
|||
});
|
||||
revisionInsertAnnotation = revisionViewer.annotateScrollbar({ className:"CodeMirror-insert-match" });
|
||||
revisionDeleteAnnotation = revisionViewer.annotateScrollbar({ className:"CodeMirror-delete-match" });
|
||||
checkRevisionViewer();
|
||||
}
|
||||
$('#revisionModalDownload').click(function () {
|
||||
if (!revision) return;
|
||||
|
@ -3248,7 +3249,9 @@ function refreshView() {
|
|||
updateViewInner();
|
||||
}
|
||||
|
||||
var updateView = _.debounce(updateViewInner, updateViewDebounce);
|
||||
var updateView = _.debounce(function () {
|
||||
editor.operation(updateViewInner);
|
||||
}, updateViewDebounce);
|
||||
|
||||
var lastResult = null;
|
||||
var postUpdateEvent = null;
|
||||
|
|
Loading…
Reference in a new issue