fix: keep aspect ratio flow

This commit is contained in:
2026-10-04 20:52:47 +05:00
parent e73986fefd
commit 4d9cd2cfcb
7 changed files with 87 additions and 9 deletions
@@ -11,7 +11,7 @@
label: string;
value: unknown;
spec: FieldSpec;
onchange?: (value: Dimension) => void;
onchange?: (value: Dimension, axis?: "width" | "height") => void;
}
let { label, value, spec, onchange }: Props = $props();
@@ -31,7 +31,7 @@
});
function setAxis(axis: "width" | "height", n: number) {
onchange?.({ ...current, [axis]: n });
onchange?.({ ...current, [axis]: n }, axis);
}
</script>