mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-17 20:51:55 +01:00
fix last-magnified node logic
This commit is contained in:
parent
bc7938802f
commit
d73bcb82ea
@ -400,6 +400,7 @@ export class LayoutModel {
|
||||
);
|
||||
additionalPropsMap[node.id].transform = transform;
|
||||
}
|
||||
additionalPropsMap[node.id].isLastMagnifiedNode = this.lastMagnifiedNodeId === node.id;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -464,7 +465,6 @@ export class LayoutModel {
|
||||
...additionalProps,
|
||||
pixelToSizeRatio,
|
||||
resizeHandles,
|
||||
isLastMagnifiedNode: this.lastMagnifiedNodeId === node.id,
|
||||
};
|
||||
}
|
||||
|
||||
@ -572,7 +572,10 @@ export class LayoutModel {
|
||||
};
|
||||
|
||||
// If the node is already magnified, then it is being un-magnified and should be set as the last-magnified node to ensure it has a higher z-index as it transitions back to its original position.
|
||||
if (this.treeState.magnifiedNodeId === node.id) this.lastMagnifiedNodeId = node.id;
|
||||
if (this.treeState.magnifiedNodeId === node.id) {
|
||||
console.log("new last-magnified-node", node.id);
|
||||
this.lastMagnifiedNodeId = node.id;
|
||||
}
|
||||
|
||||
this.treeReducer(action);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user