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

Easy to create single node ways in iD #2303

Closed
SomeoneElseOSM opened this issue Jul 25, 2014 · 12 comments
Closed

Easy to create single node ways in iD #2303

SomeoneElseOSM opened this issue Jul 25, 2014 · 12 comments

Comments

@SomeoneElseOSM
Copy link

I did this by accident in https://www.openstreetmap.org/changeset/24343839

What I did was:

Click Line

Click an existing node

Move the map down a bit

Click the map to draw an "end" node

Decide that that wasn't quite the right place

Press delete

Try and click where the end node should have gone - but I'm not drawing a line any more!

So click line, draw the thing in the right place, tag it etc. - but the original aborted attempt is added as single-node way https://www.openstreetmap.org/way/294294495

Browser is Chrome Version 36.0.1985.125 m on Windows 7.

@pnorman
Copy link
Contributor

pnorman commented Nov 21, 2015

Another case

http://www.openstreetmap.org/changeset/35473803

This one is with iD 1.8.0, and had one tagless way and one single-node way, as well as a bunch of Haiti mapping. The errors were in Washington, DC near the default start location.

@jfirebaugh
Copy link
Member

I can't reproduce creating single node ways using the steps given.

  1. Click Line - OK
  2. Click an existing node - OK
  3. Move the map down a bit - Shouldn't make any difference, but OK
  4. Click the map to draw an "end" node - Ambiguous. A single click would not create an "end" node, it would continue drawing the line. Did you mean "click the map to add a vertex" or "double click to finish the line"?
  5. Press delete
    • If you meant "click the map to add a vertex" in the previous step, pressing delete now ends the draw operation and creates a two-vertex line. No bug.
    • If you meant "double click to finish the line" in the previous step, pressing delete now deletes the created two-vertex line. No bug.

It sounds like you may have been expecting the behavior requested in #2057, but that's not implemented in iD yet, and in any case is independent of any potential single-node-way creation bug.

@SomeoneElseOSM
Copy link
Author

I've managed to reproduce a single-node way again doing this - see http://api06.dev.openstreetmap.org/way/4299893242 .

To clarify:

Firstly the initial node must (now) have a tag on it, hence the fake place of worship in the test change I just made.

When I said "end node" I just meant "vertex" - single click, not double.

Moving the map down a bit isn't needed to cause the problem.

(and for the avoidance of doubt) When I mean "press delete" I mean "delete" not "backspace".

@jfirebaugh
Copy link
Member

OK, so:

  1. Starting condition: have a tagged vertex visible.
  2. Click the "Line" button
  3. Click the tagged vertex to begin drawing a line.
  4. Single-click empty space on the map, creating a second vertex and continuing the draw operation.
  5. ?

Could you clarify step 5 and any further steps? Is this the "delete" key on the keyboard or a button on screen? What happens after that?

@SomeoneElseOSM
Copy link
Author

5 is "press the delete key on the keyboard"

Then:

Click the "line" button with the mouse
Click The tagged vertex again
Click a bit of empty space
Press return
Click Save
Notice there are two "untagged line" warnings
Enter a changeset comment
Click Save

That gives me
http://api06.dev.openstreetmap.org/changeset/71066

which contains
http://api06.dev.openstreetmap.org/way/4299895284

@jfirebaugh
Copy link
Member

I can't replicate using those steps. I got two two-node ways, as expected.

http://api06.dev.openstreetmap.org/changeset/71069

@SomeoneElseOSM
Copy link
Author

Same again for me if I use your initial node:

http://api06.dev.openstreetmap.org/way/4299895290

What browser / OS are you using?

@matthijsmelissen
Copy link

I can reproduce this issue. Minimal example:

  • Open a new iD window, and verify that the Save button is grayed out.
  • Starting condition: have a tagged vertex visible.
  • Click the "Line" button
  • Click the tagged vertex to begin drawing a line.
  • Single-click empty space on the map, creating a second vertex and continuing the draw operation.
  • Press delete on the keyboard. This visually removes the line.
  • The save button is now active, the counter next to the button states '1', and when clicking the Save button, iD tries to upload an untagged line.

Expected behaviour: I'd expect these actions not to cause any changes.

@jfirebaugh
Copy link
Member

@math1985 What browser are you using? I'm on Chrome 47.0.2526.111, and pressing delete does not visually remove the line at that point. Instead, it ends the draw operation and produces a two-node line.

@matthijsmelissen
Copy link

Reproduced in Firefox 43.0 and Chrome 47.0.2526.106.

pressing delete does not visually remove the line at that point

That feels like a user experience bug in itself - I wouldn't expect 'Delete' to mean 'end operation'.

What happens in your environment when you draw a two-node line starting from nowhere and press Delete after the second note? In my case, the line is removed and the counter is not increased (as I would expect). Does this produce a two-node line in your environment? What if you do the same starting from an untagged node or starting from a vertex of an untagged area?

@tyrasd
Copy link
Member

tyrasd commented Jan 26, 2016

I can reproduce the issue as well: iD-issue-2303.ogv.zip – I'm on chrome 47 on Ubuntu.

@tyrasd
Copy link
Member

tyrasd commented Jan 26, 2016

From what I can see, this line is where the data gets corrupted after a uses cancels drawing by pressing the delete key: https://github.com/openstreetmap/iD/blob/master/js/id/behavior/draw_way.js#L181 edit: the following commit seems to be the actual breaking point: 8a215ca

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

No branches or pull requests

5 participants