fix(core): prevent overwriting size in node styles object (#1608)

* fix(core): prevent overwriting size in node styles object

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* fix(core): update node styles if `updateStyles` is `true`

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(core): update pkg json links

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(changeset): add

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

---------

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2024-09-06 09:50:34 +02:00
parent 79fb61c1ba
commit f4bde90302
4 changed files with 12 additions and 5 deletions
@@ -142,11 +142,11 @@ const NodeWrapper = defineComponent({
const width = node.width instanceof Function ? node.width(node) : node.width
const height = node.height instanceof Function ? node.height(node) : node.height
if (width) {
if (!styles.width && width) {
styles.width = typeof width === 'string' ? width : `${width}px`
}
if (height) {
if (!styles.height && height) {
styles.height = typeof height === 'string' ? height : `${height}px`
}