aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-01-17 15:27:39 -0500
committerSam Wilkins <samwilkins333@gmail.com>2020-01-17 15:27:39 -0500
commit9620d149a2051bc9b42a037b1c65b61deebd11fa (patch)
tree9e348c9f1dbd4fb2bb59502b59ab78bd3ccc67e2 /src
parent203ec5b3570c96f22b1d9517770e36c695677f5e (diff)
scale mc view
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionMulticolumnView.tsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionMulticolumnView.tsx b/src/client/views/collections/CollectionMulticolumnView.tsx
index 2cb91f239..955e87f13 100644
--- a/src/client/views/collections/CollectionMulticolumnView.tsx
+++ b/src/client/views/collections/CollectionMulticolumnView.tsx
@@ -248,12 +248,11 @@ class ResizeBar extends React.Component<SpacerProps> {
private onPointerMove = ({ movementX }: PointerEvent) => {
const { toLeft, toRight, columnUnitLength } = this.props;
const target = movementX > 0 ? toRight : toLeft;
- const unitLength = columnUnitLength();
- if (target && unitLength) {
+ let scale = columnUnitLength();
+ if (target && scale) {
const { widthUnit, widthMagnitude } = target;
- if (widthUnit === "*") {
- target.widthMagnitude = NumCast(widthMagnitude) - Math.abs(movementX) / unitLength;
- }
+ scale = widthUnit === "*" ? scale : 1;
+ target.widthMagnitude = NumCast(widthMagnitude) - Math.abs(movementX) / scale;
}
}