mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-05-05 01:38:57 +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> {
|
public async select(el: HTMLElement, event?: MouseEvent): Promise<void> {
|
||||||
this.target = el;
|
this.target = el;
|
||||||
|
// 如果有滚动条会导致resize时获取到width,height不准确
|
||||||
|
if (/(auto|scroll)/.test(this.target.style.overflow)) {
|
||||||
this.target.style.overflow = 'hidden';
|
this.target.style.overflow = 'hidden';
|
||||||
|
}
|
||||||
this.mode = getMode(el);
|
this.mode = getMode(el);
|
||||||
this.destroyDragEl();
|
this.destroyDragEl();
|
||||||
this.destroyGhostEl();
|
this.destroyGhostEl();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user