Skip to content

feat(helper-lines): allow softer helper lines without edge snap - #859

Merged
hm21 merged 3 commits into
hm21:stablefrom
saif-ellafi:edge-snapping
Sep 7, 2026
Merged

feat(helper-lines): allow softer helper lines without edge snap#859
hm21 merged 3 commits into
hm21:stablefrom
saif-ellafi:edge-snapping

Conversation

@saif-ellafi

Copy link
Copy Markdown
Contributor

Description

Hello, after struggling with helper lines, I submit a PR to soften the pull. This PR is AI-assisted but manually tested.

After #852, text and paint layers snap on every edge (left/center/right and top/center/bottom). That is great for a few boxes, but a page of labels turns into a magnet field — you fight the same guide three times, then every neighbor.

This adds HelperLineConfigs.enableEdgeSnapping (default true, so nothing changes unless you opt out). Set it to false and every layer snaps from its center only. The guides still show; they just do not lock onto every edge.

Related Issue: Closes #

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@hm21

hm21 commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Thanks — and thanks for spelling out the motivation; the magnet-field problem on a page of labels is real. The change is clean: additive, defaults to true so existing behavior is untouched, and it goes through the helperLineConfigs getter, so it also works via the runtime helperLinesOverride. Nothing to fix.

One note for anyone reading this later: since the anchors feed both the snap logic and the guide rendering, enableEdgeSnapping: false also stops the edge guides from being drawn, not just from locking — only the center guides remain. That is the sensible behavior (a guide you cannot snap to is just noise) and matches the field's doc comment; it is only the PR description that says the guides still show.

Merged with the CHANGELOG entry added on top. Thanks again!

@hm21
hm21 merged commit bddba37 into hm21:stable Sep 7, 2026
1 check passed
@saif-ellafi

Copy link
Copy Markdown
Contributor Author

Fantastic! Yes, I was worried to lose more snapping on the edges but honestly it was like a constant battle to come across lines everywhere. I am not sure there is a better way to soften multiple collisions more intelligently without losing those extra lines, but in practical use, as is is cool, but we loose snapping from edges I suppose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants