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

Enabling OSM Notes and then adding them via the 'Add Note' button fails #521

Closed
Bonkles opened this issue Aug 3, 2022 · 1 comment
Closed
Assignees
Milestone

Comments

@Bonkles
Copy link
Contributor

Bonkles commented Aug 3, 2022

Console logs the following message when the map is clicked to add the note:


error: do not call context.selectedNoteID anymore
context2.selectedNoteID @ iD.js:109610
noteSaveSection @ PixiLayerMapillaryPhotos.js:93
call_default @ iterator.js:4
noteEditor @ PixiLayerMapillaryPhotos.js:69
call_default @ iterator.js:4
sidebar.show @ iD.js:105949
enter @ full_screen.js:127
context2.enter @ iD.js:109568
_click @ keepRight_editor.js:86
emit @ index.js:181
_processClick @ duplicate_way_segments.js:383
_pointerup @ duplicate_way_segments.js:254
emit @ index.js:181
InteractionManager2.onPointerComplete @ rapid_poweruser_features_dialog.js:1242
InteractionManager2.onPointerUp @ rapid_poweruser_features_dialog.js:1302

@Bonkles Bonkles added this to the v2 Beta milestone Aug 9, 2022
@Bonkles Bonkles self-assigned this Nov 8, 2022
@Bonkles
Copy link
Contributor Author

Bonkles commented Nov 8, 2022

Fixed in 204e8501567703d68a0813669f94968fa78fc1a2.

We had two problems:

  1. BehaviorDraw 'click' events now send the entire event, not just a mouse coord to listeners, so the handler in the ModeAddNote.js needed to update to expect an event, grab its mouse coords, and invert them into a lat/lng coord to make the note.
  2. The layer handling code needed to check the context.selectedIDs method, because context.getSelectedNoteID() is deprecated and generates the above stack trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏁 Done
Development

No branches or pull requests

1 participant