Skip to content

Commit

Permalink
Fix computing positioning of initially hidden ResizeableWindows
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Feb 7, 2025
1 parent d9a8dae commit 4416ec2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/ResizeableWindow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ class ResizeableWindow extends React.Component {
const marginLeft = this.props.mapMargins.splitTopAndBottomBar && !splitTopAndBottomBar ? this.props.mapMargins.left : 0;
const marginRight = this.props.mapMargins.splitTopAndBottomBar && !splitTopAndBottomBar ? this.props.mapMargins.right : 0;
const containerStyle = {
display: this.props.visible ? 'initial' : 'none',
left: (marginLeft + this.props.menuMargins.left) + 'px',
right: (marginRight + this.props.menuMargins.right) + 'px',
top: splitTopAndBottomBar ? 0 : this.props.topbarHeight + 'px',
Expand All @@ -250,7 +249,7 @@ class ResizeableWindow extends React.Component {
};
return (
<div className="resizeable-window-container" key="InternalWindow" ref={this.setInitialSize} style={containerStyle}>
{this.state.geometry ? this.renderInternalWindow() : null}
{this.props.visible && this.state.geometry ? this.renderInternalWindow() : null}
</div>
);
};
Expand Down

0 comments on commit 4416ec2

Please sign in to comment.