mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +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) {
|
||||
// console.log("adding node to leafs", node);
|
||||
leafs.push(node);
|
||||
if (this.treeState.magnifiedNodeId === node.id) {
|
||||
const boundingRect = getBoundingRect();
|
||||
const transform = setTransform(
|
||||
{
|
||||
top: boundingRect.height * 0.05,
|
||||
left: boundingRect.width * 0.05,
|
||||
width: boundingRect.width * 0.9,
|
||||
height: boundingRect.height * 0.9,
|
||||
},
|
||||
true
|
||||
);
|
||||
additionalPropsMap[node.id].transform = transform;
|
||||
const addlProps = additionalPropsMap[node.id];
|
||||
if (addlProps) {
|
||||
if (this.treeState.magnifiedNodeId === node.id) {
|
||||
const boundingRect = getBoundingRect();
|
||||
const transform = setTransform(
|
||||
{
|
||||
top: boundingRect.height * 0.05,
|
||||
left: boundingRect.width * 0.05,
|
||||
width: boundingRect.width * 0.9,
|
||||
height: boundingRect.height * 0.9,
|
||||
},
|
||||
true
|
||||
);
|
||||
addlProps.transform = transform;
|
||||
}
|
||||
addlProps.isLastMagnifiedNode = this.lastMagnifiedNodeId === node.id;
|
||||
}
|
||||
additionalPropsMap[node.id].isLastMagnifiedNode = this.lastMagnifiedNodeId === node.id;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user