(f: TweenFormInputs)
| 676 | } |
| 677 | |
| 678 | function readTweenSpecFromForm(f: TweenFormInputs): GsapTweenSpec { |
| 679 | const propKey = f.prop.value.trim() || "x"; |
| 680 | const tween: GsapTweenSpec = { |
| 681 | method: (f.method.value || "to") as "to" | "from" | "fromTo", |
| 682 | duration: numOr(f.dur.value, 0.5), |
| 683 | ease: f.ease.value || "power2.out", |
| 684 | properties: { [propKey]: coerceNum(f.val.value.trim()) }, |
| 685 | }; |
| 686 | applyTweenPosition(tween, f.pos.value.trim()); |
| 687 | return tween; |
| 688 | } |
| 689 | |
| 690 | function buildAddTweenForm(form: HTMLElement) { |
| 691 | form.innerHTML = ""; |
no test coverage detected