Commit abe71c7
committed
fix: enforce minimum constraints on snapped canvas dimensions in ResolutionMasterCanvas
- Ensure snapValue is always a positive number (≥1) via Number() coercion with
Math.max(1, ...) guard to prevent zero/invalid snap divisor.
- Compute minWidth/maxHeight from snap, manual_slider_min_w/h, and canvas_min_x/y
so a snapped resize cannot go below any configured lower bound.
- Extract snapDimension helper: rounds value to the nearest snap step and
clamps it to the given minimum before passing to setDimensions.1 parent 8059b87 commit abe71c7
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2228 | 2228 | | |
2229 | 2229 | | |
2230 | 2230 | | |
2231 | | - | |
2232 | | - | |
2233 | | - | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
2234 | 2238 | | |
2235 | 2239 | | |
2236 | 2240 | | |
| |||
0 commit comments