diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-02-03 23:48:06 -0500 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-02-03 23:48:06 -0500 |
| commit | 6247bfe9aee9ea7f1a04b1aa154d22629a927042 (patch) | |
| tree | 89b336b6f41e66aad1965b14b3727eb609e4f811 /src/client/views/collections/collectionMulticolumn/MultirowResizer.tsx | |
| parent | e42c6b732decff0d8903c8613b9021dbd8ddf3e0 (diff) | |
| parent | 11b4645ce52df01f071a9a4a2582cae10a0140ba (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/collections/collectionMulticolumn/MultirowResizer.tsx')
| -rw-r--r-- | src/client/views/collections/collectionMulticolumn/MultirowResizer.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/client/views/collections/collectionMulticolumn/MultirowResizer.tsx b/src/client/views/collections/collectionMulticolumn/MultirowResizer.tsx index 20c6cd3df..4f58f3fa8 100644 --- a/src/client/views/collections/collectionMulticolumn/MultirowResizer.tsx +++ b/src/client/views/collections/collectionMulticolumn/MultirowResizer.tsx @@ -3,7 +3,7 @@ import { observer } from "mobx-react"; import { observable, action } from "mobx"; import { Doc } from "../../../../new_fields/Doc"; import { NumCast, StrCast } from "../../../../new_fields/Types"; -import { HeightUnit } from "./CollectionMultirowView"; +import { DimUnit } from "./CollectionMultirowView"; interface ResizerProps { height: number; @@ -46,14 +46,14 @@ export default class ResizeBar extends React.Component<ResizerProps> { const unitLength = columnUnitLength(); if (unitLength) { if (toNarrow) { - const { heightUnit, heightMagnitude } = toNarrow; - const scale = heightUnit === HeightUnit.Ratio ? unitLength : 1; - toNarrow.heightMagnitude = NumCast(heightMagnitude) - Math.abs(movementY) / scale; + const { dimUnit, dimMagnitude } = toNarrow; + const scale = dimUnit === DimUnit.Ratio ? unitLength : 1; + toNarrow.dimMagnitude = NumCast(dimMagnitude) - Math.abs(movementY) / scale; } if (this.resizeMode === ResizeMode.Pinned && toWiden) { - const { heightUnit, heightMagnitude } = toWiden; - const scale = heightUnit === HeightUnit.Ratio ? unitLength : 1; - toWiden.heightMagnitude = NumCast(heightMagnitude) + Math.abs(movementY) / scale; + const { dimUnit, dimMagnitude } = toWiden; + const scale = dimUnit === DimUnit.Ratio ? unitLength : 1; + toWiden.dimMagnitude = NumCast(dimMagnitude) + Math.abs(movementY) / scale; } } } @@ -61,17 +61,17 @@ export default class ResizeBar extends React.Component<ResizerProps> { private get isActivated() { const { toTop, toBottom } = this.props; if (toTop && toBottom) { - if (StrCast(toTop.heightUnit) === HeightUnit.Pixel && StrCast(toBottom.heightUnit) === HeightUnit.Pixel) { + if (StrCast(toTop.dimUnit) === DimUnit.Pixel && StrCast(toBottom.dimUnit) === DimUnit.Pixel) { return false; } return true; } else if (toTop) { - if (StrCast(toTop.heightUnit) === HeightUnit.Pixel) { + if (StrCast(toTop.dimUnit) === DimUnit.Pixel) { return false; } return true; } else if (toBottom) { - if (StrCast(toBottom.heightUnit) === HeightUnit.Pixel) { + if (StrCast(toBottom.dimUnit) === DimUnit.Pixel) { return false; } return true; |
