fix(svelte): only update node dimension attributes when necessary
This commit is contained in:
@@ -111,8 +111,12 @@ export function createStore({
|
||||
switch (change.type) {
|
||||
case 'dimensions': {
|
||||
const measured = { ...node.measured, ...change.dimensions };
|
||||
node.width = change.dimensions?.width ?? node.width;
|
||||
node.height = change.dimensions?.height ?? node.height;
|
||||
|
||||
if (change.setAttributes) {
|
||||
node.width = change.dimensions?.width ?? node.width;
|
||||
node.height = change.dimensions?.height ?? node.height;
|
||||
}
|
||||
|
||||
node.measured = measured;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user