Force a redraw after adding a note

Because notes dont exist in the history or graph, there is no history change
event to trigger a redraw, as there would be when adding points and other things.
This commit is contained in:
Bryan Housel
2018-07-24 19:14:34 -04:00
parent 69ebb97815
commit 95ea0dbbc9

View File

@@ -29,6 +29,9 @@ export function modeAddNote(context) {
var note = osmNote({ loc: loc, status: 'open', comments: [] });
osm.replaceNote(note);
// force a reraw (there is no history change that would otherwise do this)
context.pan([0,0]);
context
.selectedNoteID(note.id)
.enter(modeSelectNote(context, note.id).newFeature(true));