Force redraws after moving a note or cancelling a note

similar to 95ea0dbbc, there is no history change event to force a redraw
This commit is contained in:
Bryan Housel
2018-07-24 19:34:01 -04:00
parent 95ea0dbbc9
commit f74d21557c
3 changed files with 5 additions and 2 deletions

View File

@@ -86,6 +86,9 @@ export function modeDragNote(context) {
function end(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));

View File

@@ -480,8 +480,7 @@ export function rendererMap(context) {
.call(drawLayers);
// OSM
// NOTE: when `map.notesEditable()` is removed, `redraw()` keep being called on timer
if (map.editable() || map.notesEditable()) {
if (map.editable()) {
context.loadTiles(projection);
drawVector(difference, extent);
} else {

View File

@@ -330,6 +330,7 @@ export function uiNoteEditor(context) {
osm.removeNote(d);
}
context.enter(modeBrowse(context));
dispatch.call('change');
});
buttonSection.select('.save-button') // select and propagate data