Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create a quick method of drawing ways #8671

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

k-yle
Copy link
Collaborator

@k-yle k-yle commented Sep 2, 2021

Closes #1614

When drawing an new way/area that abuts an existing way/area, it becomes quite boring clicking on each node to join your new area to the existing one.

This PR allows you to press F while drawing a way/area to automatically keep drawing the new way along the edge of the existing way.

Example video: After drawing 3 nodes manually, I press F repeatedly to continue drawing

race.mp4

This is really helpful when mapping landuse/vegetation.

Outstanding issues: (I need help/guidance with these please)

  • Not sure if 7 is the right key for this. Just a random choice Changed to F, so the key to open the settings pane is now U.
  • I think I've registered the keybindings wrong, because it should only work while drawing a way. fixed
  • Not sure what the techincal name for this feature is. I've called it 'race mode' for now. Renamed it to 'Follow'
  • There's a bug when you pass the first/last node of a closed way fixed

Limitations:

  • It's not smart enough to work in this situation - if there are already two ways sharing the same nodes, it can't help you join a third way to those nodes

@bhousel
Copy link
Member

bhousel commented Sep 2, 2021

nice! this is #1614

@jjiglesiasg
Copy link

Worth more than a try. Thanks

@k-yle
Copy link
Collaborator Author

k-yle commented Sep 2, 2021

thanks @bhousel, ironically I 👍'd that issue and then forgot about it - happy to close this PR if #7649 is a more robust solution

@bhousel
Copy link
Member

bhousel commented Sep 2, 2021

thanks @bhousel, ironically I 👍'd that issue and then forgot about it - happy to close this PR if #7649 is a more robust solution

I think what you built is perfect, though it would be nice to use whatever key Potlatch or JOSM uses for this feature (if possible), instead of 7.

@pnorman
Copy link
Contributor

pnorman commented Sep 3, 2021

I think JOSM's default is f for "follow".

@k-yle
Copy link
Collaborator Author

k-yle commented Sep 4, 2021

I've updated it to use F. Currently F is being used to open the settings pane, so we'll need a new shortcut for settings (I've changed it to U for now).

I've been mapping landuse and vegetation from this branch over the past 2 days and it's been working quite well

@mbrzakovic mbrzakovic self-requested a review September 28, 2021 09:15
modules/behavior/draw_way.js Outdated Show resolved Hide resolved
@k-yle
Copy link
Collaborator Author

k-yle commented Sep 30, 2021

not sure why tests for iD.modeAddNote are failing, it seems to be unrelated to this PR

modules/behavior/draw_way.js Show resolved Hide resolved
modules/behavior/draw_way.js Outdated Show resolved Hide resolved
@mbrzakovic
Copy link
Collaborator

not sure why tests for iD.modeAddNote are failing, it seems to be unrelated to this PR

It is unrelated. I thought I solved this in #8635 I will take a second look into this, please ignore it for now.

data/core.yaml Outdated Show resolved Hide resolved
data/core.yaml Outdated Show resolved Hide resolved
@@ -346,6 +346,13 @@ en:
not_downloaded:
single: This feature can't be moved because parts of it have not yet been downloaded.
multiple: These features can't be moved because parts of them have not yet been downloaded.
follow:
key: F
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the one hand, it’s convenient that the F accelerator key matches the follow operation in Potlatch (miss you) and JOSM. On the other hand, we’re starting to run out of unmodified accelerator keys, especially ones that are reachable by the left hand.1 It’s forcing localizations that localize keys to play successive rounds of musical chairs. But that’s a broader issue and shouldn’t hold up this PR.

Perhaps a future enhancement could also assign the ⌘[ and ⌘] keys to this operation. It would be elegant to “zip” a way together with another way using the normal keyboard shortcuts for navigating along a way.

Footnotes

  1. If I remember correctly, some of the accelerator keys were chosen to be reachable by the left hand, assuming the right hand is operating a mouse in tandem. But I can’t remember where I saw that stated.

modules/behavior/draw_way.js Show resolved Hide resolved
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.

Follow a path
6 participants