Skip to content

Commit

Permalink
fix size of popout for tabs with border size
Browse files Browse the repository at this point in the history
  • Loading branch information
nealus committed Jul 24, 2023
1 parent 989112f commit 9774f33
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/view/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,15 @@ export class Layout extends React.Component<ILayoutProps, ILayoutState> {
let path = borderPath + "/t" + tabCount++;
if (this.supportsPopout && child.isFloating()) {
const rect = this._getScreenRect(child);

const tabBorderWidth= child._getAttr("borderWidth");
const tabBorderHeight= child._getAttr("borderHeight");
if (tabBorderWidth !== -1 && border.getLocation().getOrientation() === Orientation.HORZ) {
rect.width = tabBorderWidth;
} else if (tabBorderHeight !== -1 && border.getLocation().getOrientation() === Orientation.VERT) {
rect.height = tabBorderHeight;
}

floatingWindows.push(
<FloatingWindow
key={child.getId()}
Expand Down Expand Up @@ -921,7 +930,7 @@ export class Layout extends React.Component<ILayoutProps, ILayoutState> {
}
// add edge indicators
if (this.props.model.getMaximizedTabset() === undefined) {
this.setState({ showEdges: true });
this.setState({ showEdges: this.props.model.isEnableEdgeDock() });
}

if (this.dragNode !== undefined && this.dragNode instanceof TabNode && this.dragNode.getTabRect() !== undefined) {
Expand Down

0 comments on commit 9774f33

Please sign in to comment.