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

Allow to continue drawing of area #2272

Open
Mashin6 opened this issue Jun 24, 2014 · 21 comments · May be fixed by #9657
Open

Allow to continue drawing of area #2272

Mashin6 opened this issue Jun 24, 2014 · 21 comments · May be fixed by #9657
Assignees
Labels
operation An editing operation / edit menu item

Comments

@Mashin6
Copy link

Mashin6 commented Jun 24, 2014

(Sorry if there is already a thread for this, but I just couldn't find one.)

Currently there is no way how to continue drawing of a finished area. After selecting node that belongs to area, the radial menu option to continue drawing is disabled saying "No line can be continued here". This is pretty annoying when you accidentally click on a node while trying to draw a large area.

@bhousel
Copy link
Member

bhousel commented Jun 27, 2014

I'm not sure I understand this issue. After an area is completed, you can still expand the area by selecting any point or midpoint on the perimeter and dragging it to where you need it. This isn't as fast as clicking around the first time (say if you are tracing a lake or building), but the user isn't really stuck with no way to resize the area.

@bhousel
Copy link
Member

bhousel commented Jun 27, 2014

Maybe related to #435 #2059

@jfirebaugh
Copy link
Member

I think this is a request for a way to re-enter draw mode for an area -- via placing points rather than dragging midpoints.

@Mashin6
Copy link
Author

Mashin6 commented Jun 27, 2014

Exactly. The "midpoint" method is way too tedious for drawing large areas. So for now I rather delete the accidentally finished area and start drawing new from scratch.

@tyrasd
Copy link
Member

tyrasd commented Jun 28, 2014

Wouldn't an approach as in #760 solve this ("unfinished" areas) and also the case of "overly coarsely" drawn ways in an elegant manner?

@Mashin6 For the time being, you could also split the area (thus creating a multipolygon out of it), disconnect the two ways and then continue drawing one of the lines.

@BuciboLebo
Copy link

That's it. I am no longer identifying areas until they sort out this issue. I spent 10 minutes drawing a lake then accidentally closed its polygon. I could have used my time playing Solitaire like everyone else.

@maxerickson
Copy link

For reentering draw mode, how about a UI analogous to the continue line UI, where the option appears in the context menu if two adjacent points are selected?

I guess it is an obscure feature, but I think it is also something more ambitious users will want to occasionally do.

(took a look for issues after seeing https://www.reddit.com/r/openstreetmap/comments/7snh9c/i_accidentally_prematurely_completed_an_area_that/ )

@slhh
Copy link
Contributor

slhh commented Feb 18, 2018

For reentering draw mode, how about a UI analogous to the continue line UI, where the option appears in the context menu if two adjacent points are selected?

Preferably, the UI should specify where and in which direction to start redrawing, but a selection of multiple elements doesn't seem to be able to do so. At least the user needs to know the drawing direction to place the correct new vertex first.
We might restrict default drawing direction to positive way direction, and maybe offer a key to toggle direction. If we do so, the selection for the operation, does only need to contain a single vertex, and the area where it's ambiguous.

@bhousel

After an area is completed, you can still expand the area by selecting any point or midpoint on the perimeter and dragging it to where you need it. This isn't as fast as clicking around the first time (say if you are tracing a lake or building), but the user isn't really stuck with no way to resize the area.

Yes, we do only need more efficient replacement for multiple (midpoint) drags. Therefore, I came up with the idea to use a midpoint drag gesture as the UI:
Drag the midpoint of an egde, which indicates the user wants to reshape this edge. Do not drag it to the desired location of a new virtex as usual, but drag it to one of the ends of the edge. Currently this would do nothing, but could be used as an indicator to start draw mode from this end in future. The default target of the drawing would be the other end of the edge, but other nodes or edges of the area would be valid targets to finish drawing too. In the later case, the skipped original vertices would be eliminated.
The operation could be made available for areas and also lines, without any impact on the context menu.

Example:
redraw area

The video is faked for demonstration of the UI, the code doesn't exist yet, but I might do it if desired.
@bhousel Which UI do you prefer?
The drag based one seems to be

  • more flexible, due to specifying the direction too,
  • more efficient to use,
  • not visually impacting the UI,
  • but less discoverable.

@Mashin6
Copy link
Author

Mashin6 commented Feb 19, 2018

@slhh
The direction can be determined by starting from the node with the higher 'node id'. In case the area is not uploaded yet, I assume the iD stores some temporary ids. But honestly, I don't care so much from which side I start to draw, when I want to enhance that given segment.

I like the midpoint idea, but the drag gesture seems not fitting to GUI style of iD. I personally would prefer a context menu option, which would activate 'drawing mode' from one of the neighboring nodes.

@bhousel
Copy link
Member

bhousel commented Feb 19, 2018

I think I'd prefer to just use a modifier key to extend the area, this seems simpler:
see #1711 (comment)

Midpoint dragging onto an adjacent node to enter a new mode seems really complicated (and you're not guaranteed that that nearby node is even nearby or onscreen)

@bborkmiller
Copy link

bborkmiller commented Feb 19, 2018

Just another idea: Select two adjacent nodes in an area, and do something--press A? context menu?--and iD would go into area-expansion mode, with the new node being added between the two selected nodes.

This would be relatively simple, and unambiguous as to where the new node would be created.

@slhh
Copy link
Contributor

slhh commented Feb 24, 2018

@bhousel

I think I'd prefer to just use a modifier key to extend the area, this seems simpler:
see #1711 (comment)

You seem to propose the following workflow:

  • Select the area
  • Move the mouse to position which results in choosing the desired edge, in many cases this can be the intended position of the node
  • Press the Ctrl key down -> iD choses the edge, and shows preview
  • Adjust the mouse position
  • Left-click -> iD places the node
  • Release the Ctrl key

Is that correct?

I see the following issues:

  • Using any Ctrl based shortcut (like Ctrl-C) would temporarily activate that preview, which seems to be confusing.
  • A operation adding a single node only results in geometry validation issues, when adding multiple nodes is required. The operation would generate temporary edges, which do not belong to the final geometry. These needs to be excluded from the geometry check, like the closing edge in the area drawing mode, but iD does not know which edge is temporary.
  • Area reshaping would not benefit from future extensions of the area draw mode, like pretty angles or following a way.
  • Does not support redrawing multiple edges

@slhh
Copy link
Contributor

slhh commented Feb 24, 2018

@Mashin6

The direction can be determined by starting from the node with the higher 'node id'.

The user is not aware of the ids, it would appear as a random behaviour.

But honestly, I don't care so much from which side I start to draw, when I want to enhance that given segment.

At least you need to know the drawing direction, e.g. when you want to insert two nodes 1 and 2 between the existing nodes a and b, you need to know wheather drawing starts from a or b to place 1 or 2 first.
Maybe, the rendering can be changed to make the drawing direction visible.

You want to specify the direction, when you use that segment as a start to redraw multiple segments.

@slhh
Copy link
Contributor

slhh commented Feb 24, 2018

We could offer a context menu and shortcut reshape operation based on the selection a an area/line and one of its vertexes. The operation lets the user draw a line starting from selected vertex and to be finished at a vertex or edge of the selected area/line. The user would be aware of the (intended) drawing direction with regards to the area/line, but iD would not be aware of this, at least not before finishing, consequeces of which are:

  1. If the drawn line is fully encapsulated by the area, even after finishing the intended direction would not be clear. The line splits the area into two parts. The operation might assume the larger part is the intended one, or just perform a split and let the use delete the non-intended one. Such a split operation would be useful anyway, but should preferably be offered as a split operation, and not a reshape operation.
  2. An area styled preview while drawing the line is not possible, because of the uncertainty of whether the right or left of the drawn line will belong to the resulting area.
  3. A modifier to enforce pretty angles might not fully work on the starting node, because it is not clear which of the connected edges of the area/line will belong to the resulting area/line.

We can address 1. by forcing the user in this case to draw one more edge coincident with one of the original area befeore finishing.

We can address 1 and 3 if we allow the user to start one node earlier and place a coincident edge first.

@Mashin6
Copy link
Author

Mashin6 commented Feb 24, 2018

@slhh
That is right, if the line connecting the new node to the starting point would be rendered thicker then the user would know, which direction to stat drawing. And personally I think nobody would care if iD would choose the start point seemingly at random.

@bhousel
But iD currently has a context menu for continuing line drawing. Wouldn't hiding this one under shortcut be inconsistent?

@bborkmiller
I like that idea as well.

Ok, so how I would imagine it:

  1. User chooses midpoint / two adjacent nodes
  2. User invokes context menu / press A
  3. iD selects node with higher id as a starting point and renders the line connecting the starting point to new node to indicate direction of drawing.

@maxerickson
Copy link

Could also use the node closest to the pointer as the starting point. That way it is possible to to control it.

@slhh
Copy link
Contributor

slhh commented Feb 25, 2018

@maxerickson Yes, we might use the current mouse position at the time of right clicking, pressing the spacebar (to open context menu), or pressing the shortcut key.

I see the following variants of using this information:

  1. Based on selection of the area and a single vertex: The connected edge which is nearest to that position is to be redrawn, and maybe also following edges.
  2. Based on selection of the area and and two adjacent vertices: The nearest one of the selected vertexes is the start point to redraw the edge between the selected nodes, and maybe also following edges.
  3. Based on selection of the area and and two vertices which don't need to be adjacent: There are two pathes of area edges between the selected vertexes, the one which is nearest to that position is to be redrawn and redrawing starts from the selected vertex which is nearest to that position.
    In case of large areas selecting the start and end vertex might be a bit nasty due to iD's editing zoom limit. This might be outweighted by a better preview.

The operation should not only be available for closed ring areas, but also for lines and multipolygons.
Variant 3 might also be used to "redraw" a gap in a multipolygon ring by selecting two end vertixes of partial rings.

I would prefer 1 or 3.

@1ec5
Copy link
Collaborator

1ec5 commented Apr 13, 2020

As a partial solution, how about temporarily adding the “finished drawing an area” operation to the undo stack? Users are already used to undoing when they accidentally add a vertex in the wrong place while drawing a line or area. To avoid cluttering the undo stack overall, maybe we could remove the command from the undo stack as soon as anything else is added onto the stack.

This half-measure wouldn’t address the situation where the user wants to modify an area after the fact, but I think that case could be addressed by making it easier to split and merge areas: #4866 #435.

@1ec5
Copy link
Collaborator

1ec5 commented May 26, 2023

Here’s a workaround, in case anyone needs it in the meantime:

  1. Convert the area into a closed line: Switch between closed line and area #1828 (comment)
  2. Select the line and press { or } to navigate to the start node (which is also the end node).
  3. Press D to disconnect the start node from the end node.
  4. Select the end node, delete it, and press A to continue drawing from where you left off.
  5. When you’re done, manually connect back to the start node, and convert the closed line back into an area.

@1ec5
Copy link
Collaborator

1ec5 commented May 26, 2023

Another workaround:

  1. Add a new area. Click on the first two nodes of the previous, unsuccessful area.
  2. Press F repeatedly to follow the old area until you get to where you left off. Keep drawing the new area as you originally intended.
  3. Delete the old area.

Until #8750 is fixed, this workaround can get frustrating if the old area connects to other lines or areas.

@1ec5
Copy link
Collaborator

1ec5 commented May 26, 2023

Drag the midpoint of an egde, which indicates the user wants to reshape this edge. Do not drag it to the desired location of a new virtex as usual, but drag it to one of the ends of the edge. Currently this would do nothing, but could be used as an indicator to start draw mode from this end in future. The default target of the drawing would be the other end of the edge, but other nodes or edges of the area would be valid targets to finish drawing too. In the later case, the skipped original vertices would be eliminated.
The operation could be made available for areas and also lines, without any impact on the context menu.

This gesture would be undiscoverable and surprising, in my opinion. I think a context menu operation would be fine. After all, unlike Potlatch, iD also lacks a gesture for continuing to draw a line.

Right-clicking on one of the area’s edges and selecting Continue would enter draw mode for replacing that edge with an arbitrary number of vertices, until you press Enter or click twice on an existing vertex. Similarly, right-clicking on one of the area’s vertices could delete that vertex in favor of the vertices added in draw mode. The way’s direction would determine the order of progression, just like when continuing a line from the end.

Actually, this operation would be useful not only for reentering draw mode after an accidental exit, but also for extending the area in general, so the Continue operation could be renamed to something else like Extend.

@1ec5 1ec5 self-assigned this May 26, 2023
@1ec5 1ec5 linked a pull request May 26, 2023 that will close this issue
@tyrasd tyrasd self-assigned this May 26, 2023
@1ec5 1ec5 removed their assignment May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
operation An editing operation / edit menu item
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants