diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx index 36e9c701e..ed5766723 100644 --- a/src/components/video-editor/SettingsPanel.tsx +++ b/src/components/video-editor/SettingsPanel.tsx @@ -1778,10 +1778,10 @@ export function SettingsPanel({ width: 1, height: 1, }; - const cropTop = Math.round(crop.y * 100); - const cropLeft = Math.round(crop.x * 100); - const cropBottom = Math.round((1 - crop.y - crop.height) * 100); - const cropRight = Math.round((1 - crop.x - crop.width) * 100); + const cropTop = Math.round(crop.y * 1000) / 10; + const cropLeft = Math.round(crop.x * 1000) / 10; + const cropBottom = Math.round((1 - crop.y - crop.height) * 1000) / 10; + const cropRight = Math.round((1 - crop.x - crop.width) * 1000) / 10; const isCropped = cropTop > 0 || cropLeft > 0 || cropBottom > 0 || cropRight > 0; const setCropInset = (side: "top" | "bottom" | "left" | "right", pct: number) => { @@ -2583,9 +2583,9 @@ export function SettingsPanel({ defaultValue={0} min={0} max={50} - step={1} + step={0.1} onChange={(v) => setCropInset("top", v)} - formatValue={(v) => `${Math.round(v)}%`} + formatValue={(v) => `${(Math.round(v * 10) / 10).toFixed(1)}%`} parseInput={(text) => parseFloat(text.replace(/%$/, ""))} /> setCropInset("bottom", v)} - formatValue={(v) => `${Math.round(v)}%`} + formatValue={(v) => `${(Math.round(v * 10) / 10).toFixed(1)}%`} parseInput={(text) => parseFloat(text.replace(/%$/, ""))} /> setCropInset("left", v)} - formatValue={(v) => `${Math.round(v)}%`} + formatValue={(v) => `${(Math.round(v * 10) / 10).toFixed(1)}%`} parseInput={(text) => parseFloat(text.replace(/%$/, ""))} /> setCropInset("right", v)} - formatValue={(v) => `${Math.round(v)}%`} + formatValue={(v) => `${(Math.round(v * 10) / 10).toFixed(1)}%`} parseInput={(text) => parseFloat(text.replace(/%$/, ""))} />