feat: support keep block in view

This commit is contained in:
QiShaoXuan 2022-08-11 21:43:51 +08:00
parent 8183552011
commit bb0219c5ed

View File

@ -692,7 +692,7 @@ export class SelectionManager implements VirgoSelection {
this.emit(nodeId, SelectEventTypes.active, this.lastPoint); this.emit(nodeId, SelectEventTypes.active, this.lastPoint);
// TODO: Optimize the related logic after implementing the scroll bar // TODO: Optimize the related logic after implementing the scroll bar
setTimeout(() => { setTimeout(() => {
// this._editor.scrollManager.keepBlockInView(node); this._editor.scrollManager.keepBlockInView(node);
}, this._scrollDelay); }, this._scrollDelay);
} else { } else {
console.warn('Can not find node by this id'); console.warn('Can not find node by this id');