fix addl props nullref

This commit is contained in:
Evan Simkowitz 2024-08-16 17:59:53 -07:00
parent ae7d85630b
commit 7a1a3a2bea
No known key found for this signature in database
GPG Key ID: 5041D45BF5DCE80B

View File

@ -387,6 +387,8 @@ export class LayoutModel {
if (!node.children?.length) {
// console.log("adding node to leafs", node);
leafs.push(node);
const addlProps = additionalPropsMap[node.id];
if (addlProps) {
if (this.treeState.magnifiedNodeId === node.id) {
const boundingRect = getBoundingRect();
const transform = setTransform(
@ -398,9 +400,10 @@ export class LayoutModel {
},
true
);
additionalPropsMap[node.id].transform = transform;
addlProps.transform = transform;
}
addlProps.isLastMagnifiedNode = this.lastMagnifiedNodeId === node.id;
}
additionalPropsMap[node.id].isLastMagnifiedNode = this.lastMagnifiedNodeId === node.id;
return;
}