diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-17 01:25:02 -0500 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-17 01:25:02 -0500 |
| commit | 2706f80b352e8a4fba692a9ad0b69ea2a7e25c2d (patch) | |
| tree | a0a3f1e0cec347b31362c50460d8284755c1b71d /src/client/views/CollectionMulticolumnView.tsx | |
| parent | 05eb320bef0395fef704f583d69673bfa5abaa77 (diff) | |
opacity
Diffstat (limited to 'src/client/views/CollectionMulticolumnView.tsx')
| -rw-r--r-- | src/client/views/CollectionMulticolumnView.tsx | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/client/views/CollectionMulticolumnView.tsx b/src/client/views/CollectionMulticolumnView.tsx index 20923d8e6..0b2ca82f1 100644 --- a/src/client/views/CollectionMulticolumnView.tsx +++ b/src/client/views/CollectionMulticolumnView.tsx @@ -228,6 +228,27 @@ class ResizeBar extends React.Component<SpacerProps> { } } + private get opacity() { + const { toLeft, toRight } = this.props; + if (toLeft && toRight) { + if (StrCast(toLeft.widthUnit) === "px" && StrCast(toRight.widthUnit) === "px") { + return 0; + } + return 0.4; + } else if (toLeft) { + if (StrCast(toLeft.widthUnit) === "px") { + return 0; + } + return 0.4; + } else if (toRight) { + if (StrCast(toRight.widthUnit) === "px") { + return 0; + } + return 0.4; + } + return 0; + } + private onPointerUp = () => { window.removeEventListener("pointermove", this.onPointerMove); window.removeEventListener("pointerup", this.onPointerUp); @@ -236,8 +257,11 @@ class ResizeBar extends React.Component<SpacerProps> { render() { return ( <div - className={"spacer"} - style={{ width: this.props.width }} + className={"resizer"} + style={{ + width: this.props.width, + opacity: this.opacity + }} onPointerDown={this.registerResizing} /> ); |
