Skip to content

Translate fixed shapes - #1497

Open
bnmajor wants to merge 8 commits into
masterfrom
translate-fixed-shapes
Open

Translate fixed shapes#1497
bnmajor wants to merge 8 commits into
masterfrom
translate-fixed-shapes

Conversation

@bnmajor

@bnmajor bnmajor commented Aug 24, 2026

Copy link
Copy Markdown
Screencast.from.08-25-2026.12.41.33.PM.webm

@bnmajor
bnmajor force-pushed the translate-fixed-shapes branch from 9972d2f to aa6ec94 Compare August 25, 2026 10:59
…/flipping

Fixed-size shapes previously behaved like fixed-aspect-ratio shapes: the click/mousedown point
stayed pinned as one corner while the opposite corner tracked the mouse, flipping the shape around
the axes.

- fixed-size shapes now anchor the box at the current mouse position instead of the original
  origin, and always extend in a fixed direction so the box translates with the cursor instead of
  flipping across quadrants.
- previously always used the fixed mousedown point as one corner of the live drag-preview. It now
  uses the selection constraint's anchor corner so the preview also tracks correctly.
@bnmajor
bnmajor force-pushed the translate-fixed-shapes branch 2 times, most recently from 109ade8 to 60499f2 Compare August 25, 2026 12:15
@bnmajor
bnmajor force-pushed the translate-fixed-shapes branch from 60499f2 to 3f3bf3c Compare August 25, 2026 12:30
@bnmajor
bnmajor marked this pull request as ready for review August 25, 2026 13:02
@bnmajor
bnmajor requested a review from manthey August 25, 2026 13:03
@manthey

manthey commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

This works as requested, but somehow revealed that I had behavior opinions I didn't realize I had until using it.

For non-fixed size shapes, we either click and drag or click multiple times.

For click-and-drag this works mostly as I expect, but I sort of expected either I would drag the center rather than a corner or it would sort of follow the mouse such that if the mouse would leave the annotation it would follow.

For the click opposite corners, this is accentuated even more -- my first try was to click what I assumed was the top left and then move down and to the right. Since on the web-Mercator map we have a right-handed coordinate system, we end up creating the bottom left first.

I'm not sure if we should change the current behavior, and, if so, what it should be.

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