mirror of
https://github.com/penpot/penpot.git
synced 2026-09-19 10:26:14 +00:00
* ✨ Improve path operations and edition * 🐛 Fix floating-point equality issues in path editing Replace exact equality checks with tolerance-based comparisons in path editing functions to handle floating-point rounding differences after transforms, rotations, or curve fitting. Changes: - distribute-content: Round coordinates to 0.1 precision before grouping to ensure coincident nodes move together - separate-node: Use gpt/close? instead of exact equality to find nodes with floating-point imprecision - collision-step: Use mth/close? for tolerance-based comparison to detect paste collisions correctly - resolve-edit-fills: Add cycle detection to prevent infinite loops with corrupted parent chains Made collision-step, available-offset-step, and resolve-edit-fills public for better testability. Added comprehensive tests for all fixes covering both exact and floating-point coordinate scenarios. AI-assisted-by: qwen3.7-plus * 🐛 Fix path editor code review findings Fix issues identified during code review of path editor enhancements: - Fix unused binding lint warning in distribute-content that blocked CI - Fix collision-step floor comparison to use round instead of floor, correctly detecting collisions when coordinates drift slightly below integer boundaries - Fix resolve-edit-fills to recurse through empty parent groups when searching for inherited fills in nested group hierarchies - Fix expand-coincident-node-indices to use fuzzy comparison (gpt/close?) instead of exact equality, handling floating-point divergence after transforms or rotations - Remove unreachable dead code in path-point* on-pointer-down handler - Add tests for collision-step boundary cases, nested group fill inheritance, and coincident node alignment/flipping AI-assisted-by: mimo-v2.5-pro --------- Co-authored-by: Andrey Antukh <niwi@niwi.nz>
4 lines
665 B
XML
4 lines
665 B
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M7.893,10.058L10.493,12.658L10.493,12.659M1.62,7.229L5.758,3.091C7.035,1.813 8.897,1.314 10.642,1.782C12.387,2.249 13.75,3.612 14.218,5.357C14.686,7.102 14.187,8.963 12.91,10.241L10.493,12.658L8.772,14.38C8.466,14.686 7.97,14.686 7.664,14.38L6.171,12.887C5.865,12.581 5.865,12.086 6.171,11.78L7.893,10.058L10.091,7.86C10.629,7.322 10.629,6.449 10.091,5.91C9.552,5.372 8.679,5.372 8.14,5.91L5.942,8.108L4.221,9.829C3.915,10.135 3.419,10.135 3.113,9.829L1.62,8.337C1.314,8.031 1.314,7.535 1.62,7.229M5.942,8.108L5.942,8.108L3.342,5.508"/>
|
|
</svg>
|