mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(stage): 这有overflow为auto或scroll才在选中的时候设置为hidden
This commit is contained in:
parent
c60e226f35
commit
8619af91db
@ -65,7 +65,10 @@ export default class StageDragResize extends EventEmitter {
|
||||
*/
|
||||
public async select(el: HTMLElement, event?: MouseEvent): Promise<void> {
|
||||
this.target = el;
|
||||
this.target.style.overflow = 'hidden';
|
||||
// 如果有滚动条会导致resize时获取到width,height不准确
|
||||
if (/(auto|scroll)/.test(this.target.style.overflow)) {
|
||||
this.target.style.overflow = 'hidden';
|
||||
}
|
||||
this.mode = getMode(el);
|
||||
this.destroyDragEl();
|
||||
this.destroyGhostEl();
|
||||
|
Loading…
x
Reference in New Issue
Block a user