aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-25 04:47:00 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-25 04:47:00 +0800
commitab2759f43105c0f2d441790e138840706c6759f8 (patch)
tree622069d8e8592804e47ae8c993bf87d8287de691 /packages/instant/src
parent379f7c788385cfc15fea8d0bb0a2a39f0c709b8d (diff)
downloaddexon-sol-tools-ab2759f43105c0f2d441790e138840706c6759f8.tar
dexon-sol-tools-ab2759f43105c0f2d441790e138840706c6759f8.tar.gz
dexon-sol-tools-ab2759f43105c0f2d441790e138840706c6759f8.tar.bz2
dexon-sol-tools-ab2759f43105c0f2d441790e138840706c6759f8.tar.lz
dexon-sol-tools-ab2759f43105c0f2d441790e138840706c6759f8.tar.xz
dexon-sol-tools-ab2759f43105c0f2d441790e138840706c6759f8.tar.zst
dexon-sol-tools-ab2759f43105c0f2d441790e138840706c6759f8.zip
chore: update comments
Diffstat (limited to 'packages/instant/src')
-rw-r--r--packages/instant/src/components/scaling_input.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/instant/src/components/scaling_input.tsx b/packages/instant/src/components/scaling_input.tsx
index c927f9419..34cb0b5fd 100644
--- a/packages/instant/src/components/scaling_input.tsx
+++ b/packages/instant/src/components/scaling_input.tsx
@@ -101,13 +101,13 @@ export class ScalingInput extends React.Component<ScalingInputProps, ScalingInpu
): void {
const prevPhase = ScalingInput.getPhaseFromProps(prevProps);
const curPhase = ScalingInput.getPhaseFromProps(this.props);
- // if we went from anything else to end, fix to the current width as it shouldn't change as we grow
+ // if we went from fixed to scaling, save the width from the transition
if (prevPhase !== ScalingInputPhase.ScalingFontSize && curPhase === ScalingInputPhase.ScalingFontSize) {
this.setState({
inputWidthPxAtPhaseChange: snapshot.inputWidthPx,
});
}
- // if we end from end to to anything else, un-fix the width
+ // if we went from scaling to fixed, revert back to scaling using `ch`
if (prevPhase === ScalingInputPhase.ScalingFontSize && curPhase !== ScalingInputPhase.ScalingFontSize) {
this.setState({
inputWidthPxAtPhaseChange: undefined,