From af37e51657913a4f1cc1536f7d7ad9f991d4dc32 Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 24 Mar 2022 11:34:53 -0400 Subject: fixes for webbox scroll bars and resizer divider to show up properly --- src/client/views/nodes/WebBox.scss | 10 ++++++++-- src/client/views/nodes/WebBox.tsx | 15 ++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/WebBox.scss b/src/client/views/nodes/WebBox.scss index 7dc970496..9d8825ad1 100644 --- a/src/client/views/nodes/WebBox.scss +++ b/src/client/views/nodes/WebBox.scss @@ -5,10 +5,16 @@ height: 100%; position: relative; display: flex; - .webBox-background { + .webBox-sideResizer { + position: absolute; width: 100%; height: 100%; cursor: ew-resize; + background: yellow; + } + .webBox-background { + width: 100%; + height: 100%; background: lightGray; } @@ -193,7 +199,7 @@ } div.webBox-outerContent::-webkit-scrollbar-thumb { - display: none; + cursor: nw-resize; } } diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index e6acddf23..495f6a7ba 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -666,7 +666,7 @@ export class WebBox extends ViewBoxAnnotatableComponent) => this._searchString = e.currentTarget.value; showInfo = action((anno: Opt) => this._overlayAnnoInfo = anno); setPreviewCursor = (func?: (x: number, y: number, drag: boolean, hide: boolean) => void) => this._setPreviewCursor = func; - panelWidth = () => this.props.PanelWidth() / (this.props.scaling?.() || 1) - this.sidebarWidth(); // (this.Document.scrollHeight || Doc.NativeHeight(this.Document) || 0); + panelWidth = () => this.props.PanelWidth() / (this.props.scaling?.() || 1) - this.sidebarWidth() + WebBox.sidebarResizerWidth; // (this.Document.scrollHeight || Doc.NativeHeight(this.Document) || 0); panelHeight = () => this.props.PanelHeight() / (this.props.scaling?.() || 1); // () => this._pageSizes.length && this._pageSizes[0] ? this._pageSizes[0].width : Doc.NativeWidth(this.Document); scrollXf = () => this.props.ScreenToLocalTransform().translate(0, NumCast(this.layoutDoc._scrollTop)); anchorMenuClick = () => this._sidebarRef.current?.anchorMenuClick; @@ -711,10 +711,9 @@ export class WebBox extends ViewBoxAnnotatableComponent -
this.sidebarBtnDown(e, false)} /> +
@@ -751,6 +750,12 @@ export class WebBox extends ViewBoxAnnotatableComponent}
+
this.sidebarBtnDown(e, false)} />