The example Codepen shows a text input whose label changes position depending on the input's `blur` and `focus` state.
Given `TweenLite.set()` is used to initialise the position of my label element, what is the best way to get back to this position without repeating code?
In my example, this is what I am currently doing; firstly, setting the coords of the label's initial position:
const initCoords = { y: 62, x: 10 };
Then initialising the position using the coords:
const initLabelPosition = () => TweenLite.set($label, { ...initCoords });
Then, when I need to toggle back I am again inserting the `initCoords` into a `TweenLite.to()`:
const moveLabelInsideInput = () =>
TweenLite.to($label, animationDuration, {
...initCoords,
fontSize: labelFontSizes.blur,
ease
});
I think I might be missing an easier way to do this. Is there a better way I can toggle back to the initial position created by `TweenLite.set()`?