Rotate direction on nodes without a direction tag - #23
Closed
tordans wants to merge 3 commits into
Closed
Conversation
When a node's preset supports direction or camera:direction but no bearing is set yet, show Rotate in the context menu. Entering rotate mode previews north (0°) without writing a tag. The tag is only saved after the user actually rotates; dismissing rotate mode leaves the object unchanged. Co-authored-by: Tobias <[email protected]>
High: Direction rotation uses selectedNode at gesture time instead of the node captured when rotate mode started. Selection can change while rotate mode stays active (e.g. via POI list selectObject), so the wrong node may receive another feature's direction tag and bearing. Co-authored-by: Tobias <[email protected]>
Apply Opus 4.8 review feedback: capture the node when rotate mode starts and apply tag updates to that node only. End rotate mode when selectObject changes selection so a stale rotate session cannot tag the wrong feature. Co-authored-by: Tobias <[email protected]>
|
I haven't looked at this deeply, but I'm pretty sure this LLM generated code isn't the easiest/best way to approach this. There is probably a more direct solution that requires fewer new state variables, so while I won't accept this I'm open to doing something similar. |
|
FYI — superseded by upstream implementation This feature was implemented upstream in bryceco/GoMap#976 in two commits:
How this PR differs
Functionally both solve the same user story (rotate without an existing tag, default north, no save on cancel). Upstream's approach is smaller because it extends existing abstractions rather than adding a parallel rotation path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded — implemented upstream in bryceco/GoMap#976:
See comment for a comparison of approaches.
User story
As a mapper, I want to rotate the facing direction of point features (e.g. surveillance cameras, traffic signs) using the map's Rotate action — even when I have not set a
directionorcamera:directiontag yet. If I open Rotate and then dismiss it without actually turning the object, no direction tag should be saved.Solution
directionorcamera:directionfield, even when that tag is empty.Technical notes