Skip to content

Keep marks on the plate when the frame shrinks - #21

Merged
ursasi merged 1 commit into
mainfrom
fix/marks-outside-frame
Oct 30, 2026
Merged

ursasi merged 1 commit into
mainfrom
fix/marks-outside-frame

Conversation

@ursasi

@ursasi ursasi commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Two things from the Snipaste comparison.

1. Shrinking the frame lost the annotations

drawMarks clipped every mark to the frame while drawing, so anything outside the frame disappeared the moment it was shrunk — it looked like the work had been thrown away. Marks stay on the dimmed plate now; the crop still decides what reaches the saved picture.

check result
caption at the top-left of a 600×400 frame visible
drag the bottom-right corner in to 300×250 frame shrinks, caption still drawn

2. Only captions could be moved

Clicking a rect or an arrow selected it (the wheel sizes it) but there was no way to put it somewhere else — and the selected mark only had a thin dashed outline, so it was easy to miss that it was selected at all.

  • The selected mark now gets a box with four corner dots, the same treatment as the frame.
  • Dragging the body of any mark moves it: SnipSession.moveShape translates start, end and every freehand point together.

Still to come

  • Text inside a rectangle — a label attached to a shape rather than a separate mark. Worth deciding how it is made: double-click a rect to type into it, or the text tool snapping to a shape when the click lands inside one.
  • Bar styling — the bar is one flat row; the Snipaste reference groups buttons into clusters with rounded backgrounds and colour. That is a visual pass rather than a behaviour fix, and I would rather do it as its own change.

…ragged

Marks were clipped to the frame while drawing, so shrinking the frame made
everything outside it vanish — it looked like the annotations had been thrown
away. They stay on the dimmed plate now; the crop still decides what reaches the
saved picture.

The selected mark also gets a box with corner dots, like the frame, and dragging
its body moves it: captions were the only kind that could be repositioned, which
left rects and arrows stuck where they were drawn.
@ursasi
ursasi merged commit dd806fc into main Oct 30, 2026
1 check passed
@ursasi
ursasi deleted the fix/marks-outside-frame branch October 30, 2026 10:47
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.

1 participant