mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Update notes on status change
This commit is contained in:
@@ -71,7 +71,7 @@ export function svgNotes(projection, context, dispatch) {
|
||||
var data = (service ? service.notes(projection) : []);
|
||||
var transform = svgPointTransform(projection);
|
||||
var notes = layer.selectAll('.note')
|
||||
.data(data, function(d) { return d.id; });
|
||||
.data(data, function(d) { return d.status + d.id; });
|
||||
|
||||
// exit
|
||||
notes.exit()
|
||||
|
||||
@@ -62,7 +62,7 @@ export function uiNoteEditor(context) {
|
||||
function noteSave(selection) {
|
||||
var isSelected = (_note && _note.id === context.selectedNoteID());
|
||||
var noteSave = selection.selectAll('.note-save-section')
|
||||
.data((isSelected ? [_note] : []), function(d) { return d.id; });
|
||||
.data((isSelected ? [_note] : []), function(d) { return d.status + d.id; });
|
||||
|
||||
// exit
|
||||
noteSave.exit()
|
||||
@@ -115,7 +115,7 @@ export function uiNoteEditor(context) {
|
||||
function noteSaveButtons(selection) {
|
||||
var isSelected = (_note && _note.id === context.selectedNoteID());
|
||||
var buttonSection = selection.selectAll('.buttons')
|
||||
.data((isSelected ? [_note] : []), function(d) { return d.id; });
|
||||
.data((isSelected ? [_note] : []), function(d) { return d.status + d.id; });
|
||||
|
||||
// exit
|
||||
buttonSection.exit()
|
||||
|
||||
@@ -8,7 +8,7 @@ export function uiNoteHeader() {
|
||||
|
||||
function noteHeader(selection) {
|
||||
var header = selection.selectAll('.note-header')
|
||||
.data([_note], function(d) { return d.id; });
|
||||
.data([_note], function(d) { return d.status + d.id; });
|
||||
|
||||
header.exit()
|
||||
.remove();
|
||||
|
||||
Reference in New Issue
Block a user