Update notes on status change

This commit is contained in:
Bryan Housel
2018-07-13 00:15:30 -04:00
parent 775b47272d
commit 8a1079c3c6
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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()
+2 -2
View File
@@ -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()
+1 -1
View File
@@ -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();