aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/presentationview/PresElementBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/presentationview/PresElementBox.tsx')
-rw-r--r--src/client/views/presentationview/PresElementBox.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx
index b2acad86e..0e10cce47 100644
--- a/src/client/views/presentationview/PresElementBox.tsx
+++ b/src/client/views/presentationview/PresElementBox.tsx
@@ -273,9 +273,8 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
@computed
get toolbarWidth(): number {
const presBoxDocView = DocumentManager.Instance.getDocumentView(this.presBox);
- let width: number = NumCast(this.presBox._width);
- if (presBoxDocView) width = presBoxDocView.props.PanelWidth();
- return width;
+ const panelWidth = presBoxDocView ? presBoxDocView.props.PanelWidth() : 0;
+ return Math.max(NumCast(this.presBox._width), panelWidth);
}
@computed get mainItem() {