diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2020-02-03 17:57:18 -0500 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-02-03 17:57:18 -0500 |
| commit | b66532c0545fea6476c4b66c1fdee9b16ac5df44 (patch) | |
| tree | 4dc91678df06612a899d545aa9d14b06d391564b /src/client/views/collections/collectionMulticolumn/MultirowHeightLabel.tsx | |
| parent | 983f51b62f4b869bdb86fc4b708098d02f0d749d (diff) | |
| parent | ef4f0daa0fd9e1fbb8657bd046478a533c105b0f (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/collections/collectionMulticolumn/MultirowHeightLabel.tsx')
| -rw-r--r-- | src/client/views/collections/collectionMulticolumn/MultirowHeightLabel.tsx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/views/collections/collectionMulticolumn/MultirowHeightLabel.tsx b/src/client/views/collections/collectionMulticolumn/MultirowHeightLabel.tsx index 56a2e868d..899577fd5 100644 --- a/src/client/views/collections/collectionMulticolumn/MultirowHeightLabel.tsx +++ b/src/client/views/collections/collectionMulticolumn/MultirowHeightLabel.tsx @@ -4,7 +4,7 @@ import { computed } from "mobx"; import { Doc } from "../../../../new_fields/Doc"; import { NumCast, StrCast, BoolCast } from "../../../../new_fields/Types"; import { EditableView } from "../../EditableView"; -import { HeightUnit } from "./CollectionMultirowView"; +import { DimUnit } from "./CollectionMultirowView"; interface HeightLabelProps { layout: Doc; @@ -18,8 +18,8 @@ export default class HeightLabel extends React.Component<HeightLabelProps> { @computed private get contents() { const { layout, decimals } = this.props; - const getUnit = () => StrCast(layout.heightUnit); - const getMagnitude = () => String(+NumCast(layout.heightMagnitude).toFixed(decimals ?? 3)); + const getUnit = () => StrCast(layout.dimUnit); + const getMagnitude = () => String(+NumCast(layout.dimMagnitude).toFixed(decimals ?? 3)); return ( <div className={"label-wrapper"}> <EditableView @@ -27,7 +27,7 @@ export default class HeightLabel extends React.Component<HeightLabelProps> { SetValue={value => { const converted = Number(value); if (!isNaN(converted) && converted > 0) { - layout.heightMagnitude = converted; + layout.dimMagnitude = converted; return true; } return false; @@ -37,8 +37,8 @@ export default class HeightLabel extends React.Component<HeightLabelProps> { <EditableView GetValue={getUnit} SetValue={value => { - if (Object.values(HeightUnit).includes(value)) { - layout.heightUnit = value; + if (Object.values(DimUnit).includes(value)) { + layout.dimUnit = value; return true; } return false; |
