+
+ {
+ const h = Math.max(0, Math.round(v));
+ const vMargin = p.marginV ?? 4;
+ const { label } = useEditorV2Store.getState();
+ updateElement(element.id, {
+ x: h,
+ y: vMargin,
+ width: Math.max(5, label.widthPx - 2 * h),
+ height: Math.max(5, label.heightPx - 2 * vMargin),
+ rotation: 0,
+ props: { marginH: h },
+ });
+ }}
+ suffix="px H"
+ />
+ {
+ const vMargin = Math.max(0, Math.round(v));
+ const h = p.marginH ?? 4;
+ const { label } = useEditorV2Store.getState();
+ updateElement(element.id, {
+ x: h,
+ y: vMargin,
+ width: Math.max(5, label.widthPx - 2 * h),
+ height: Math.max(5, label.heightPx - 2 * vMargin),
+ rotation: 0,
+ props: { marginV: vMargin },
+ });
+ }}
+ suffix="px V"
+ />
+
+
+ {[
+ { label: "0:0", h: 0, v: 0 },
+ { label: "4:4", h: 4, v: 4 },
+ { label: "8:4", h: 8, v: 4 },
+ ].map((preset) => (
+
+ ))}
+
+
+