mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-03 18:47:56 +01:00
fix addl props nullref
This commit is contained in:
parent
ae7d85630b
commit
7a1a3a2bea
@ -387,20 +387,23 @@ export class LayoutModel {
|
|||||||
if (!node.children?.length) {
|
if (!node.children?.length) {
|
||||||
// console.log("adding node to leafs", node);
|
// console.log("adding node to leafs", node);
|
||||||
leafs.push(node);
|
leafs.push(node);
|
||||||
if (this.treeState.magnifiedNodeId === node.id) {
|
const addlProps = additionalPropsMap[node.id];
|
||||||
const boundingRect = getBoundingRect();
|
if (addlProps) {
|
||||||
const transform = setTransform(
|
if (this.treeState.magnifiedNodeId === node.id) {
|
||||||
{
|
const boundingRect = getBoundingRect();
|
||||||
top: boundingRect.height * 0.05,
|
const transform = setTransform(
|
||||||
left: boundingRect.width * 0.05,
|
{
|
||||||
width: boundingRect.width * 0.9,
|
top: boundingRect.height * 0.05,
|
||||||
height: boundingRect.height * 0.9,
|
left: boundingRect.width * 0.05,
|
||||||
},
|
width: boundingRect.width * 0.9,
|
||||||
true
|
height: boundingRect.height * 0.9,
|
||||||
);
|
},
|
||||||
additionalPropsMap[node.id].transform = transform;
|
true
|
||||||
|
);
|
||||||
|
addlProps.transform = transform;
|
||||||
|
}
|
||||||
|
addlProps.isLastMagnifiedNode = this.lastMagnifiedNodeId === node.id;
|
||||||
}
|
}
|
||||||
additionalPropsMap[node.id].isLastMagnifiedNode = this.lastMagnifiedNodeId === node.id;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user