refactor(exp): 在 resize 时临时关闭 hover 功能

This commit is contained in:
力皓 2021-05-20 17:14:01 +08:00
parent e442436440
commit b3b76d9ba0
2 changed files with 4 additions and 2 deletions

View File

@ -94,6 +94,7 @@ export default class DragResizeEngine {
}); });
this.dragResizing = false; this.dragResizing = false;
this.designer.detecting.enable = true;
cursor.release(); cursor.release();
this.emitter.emit('resizeEnd', e, direction, node); this.emitter.emit('resizeEnd', e, direction, node);
@ -110,6 +111,7 @@ export default class DragResizeEngine {
this.emitter.emit('resizestart', e, direction, node); this.emitter.emit('resizestart', e, direction, node);
this.dragResizing = true; this.dragResizing = true;
this.designer.detecting.enable = false;
cursor.addState('ew-resize'); cursor.addState('ew-resize');
}; };
shell.addEventListener('mousedown', mousedown); shell.addEventListener('mousedown', mousedown);

View File

@ -415,14 +415,14 @@ export class DocumentModel {
@obx.ref private _suspensed = false; @obx.ref private _suspensed = false;
/** /**
*  *
*/ */
get suspensed(): boolean { get suspensed(): boolean {
return this._suspensed || !this._opened; return this._suspensed || !this._opened;
} }
/** /**
* suspensed  * suspensed
*/ */
get actived(): boolean { get actived(): boolean {
return !this._suspensed; return !this._suspensed;