mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-30 23:01:30 +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].transform = transform;
|
||||||
}
|
}
|
||||||
|
additionalPropsMap[node.id].isLastMagnifiedNode = this.lastMagnifiedNodeId === node.id;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,7 +465,6 @@ export class LayoutModel {
|
|||||||
...additionalProps,
|
...additionalProps,
|
||||||
pixelToSizeRatio,
|
pixelToSizeRatio,
|
||||||
resizeHandles,
|
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 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);
|
this.treeReducer(action);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user