aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-10-27 11:11:40 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-10-27 11:11:40 +0530
commit680d2a85e160ec733a08b641e0f36e0e46ff4a7c (patch)
tree6c9a59f5f8a3458687188c942d527da731bb71c3
parent08bc7c218aa8ce620ac624acd2c2e35bc836e37c (diff)
parent998a0bb5b6a532341d29eb0ae2f84e5bdf49af3c (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into restored_server_monitor
-rw-r--r--src/client/views/nodes/ComparisonBox.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx
index 2af5b3182..0ba53dee6 100644
--- a/src/client/views/nodes/ComparisonBox.tsx
+++ b/src/client/views/nodes/ComparisonBox.tsx
@@ -51,9 +51,9 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps, C
private registerSliding = (e: React.PointerEvent<HTMLDivElement>, targetWidth: number) => {
setupMoveUpEvents(this, e, this.onPointerMove, emptyFunction, action(() => {
// on click, animate slider movement to the targetWidth
- this._animating = "all 1s";
+ this._animating = "all 200ms";
this.layoutDoc._clipWidth = targetWidth * 100 / this.props.PanelWidth();
- setTimeout(action(() => this._animating = ""), 1000);
+ setTimeout(action(() => this._animating = ""), 200);
}), false);
}
@@ -102,12 +102,12 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps, C
return (
<div className={`comparisonBox${this.active() || SnappingManager.GetIsDragging() ? "-interactive" : ""}` /* change className to easily disable/enable pointer events in CSS */}>
- {displayBox("after", 1, this.props.PanelWidth() - 5)}
+ {displayBox("after", 1, this.props.PanelWidth() - 3)}
<div className="clip-div" style={{ width: clipWidth, transition: this._animating, background: StrCast(this.layoutDoc._backgroundColor, "gray") }}>
- {displayBox("before", 0, 5)}
+ {displayBox("before", 0, 0)}
</div>
- <div className="slide-bar" style={{ left: `calc(${clipWidth} - 0.5px)` }}
+ <div className="slide-bar" style={{ left: `calc(${clipWidth} - 0.5px)`, cursor: NumCast(this.layoutDoc._clipWidth) < 5 ? "e-resize" : NumCast(this.layoutDoc._clipWidth) / 100 > (this.props.PanelWidth() - 5) / this.props.PanelWidth() ? "w-resize" : undefined }}
onPointerDown={e => this.registerSliding(e, this.props.PanelWidth() / 2)} /* if clicked, return slide-bar to center */ >
<div className="slide-handle" />
</div>