From 95ea0dbbc94d36db40e6cc4ca9c5e24d218dfa78 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 24 Jul 2018 19:14:34 -0400 Subject: [PATCH] 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. --- modules/modes/add_note.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/modes/add_note.js b/modules/modes/add_note.js index 36f3d8989..4d63b8ee0 100644 --- a/modules/modes/add_note.js +++ b/modules/modes/add_note.js @@ -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));