diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-25 04:47:00 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-25 04:47:00 +0800 |
commit | ab2759f43105c0f2d441790e138840706c6759f8 (patch) | |
tree | 622069d8e8592804e47ae8c993bf87d8287de691 /packages/instant | |
parent | 379f7c788385cfc15fea8d0bb0a2a39f0c709b8d (diff) | |
download | dexon-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')
-rw-r--r-- | packages/instant/src/components/scaling_input.tsx | 4 |
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, |