dont update rect if autosize
This commit is contained in:
parent
5ac35f3fa2
commit
cac972eaff
|
|
@ -493,8 +493,19 @@ export class FolkShape extends HTMLElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.style.transform = emmittedRect.toCssString();
|
this.style.transform = emmittedRect.toCssString();
|
||||||
this.style.width = this.#attrWidth === 'auto' ? '' : `${emmittedRect.width}px`;
|
if (this.#attrWidth !== 'auto') {
|
||||||
this.style.height = this.#attrHeight === 'auto' ? '' : `${emmittedRect.height}px`;
|
this.style.width = `${emmittedRect.width}px`;
|
||||||
|
} else {
|
||||||
|
this.style.width = '';
|
||||||
|
emmittedRect.width = this.#previousRect.width;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.#attrHeight !== 'auto') {
|
||||||
|
this.style.height = `${emmittedRect.height}px`;
|
||||||
|
} else {
|
||||||
|
this.style.height = '';
|
||||||
|
emmittedRect.height = this.#previousRect.height;
|
||||||
|
}
|
||||||
|
|
||||||
this.#readonlyRect = new DOMRectTransformReadonly(emmittedRect);
|
this.#readonlyRect = new DOMRectTransformReadonly(emmittedRect);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue