mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-11-13 17:08:20 +00:00
fix: keep aspect ratio flow
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user