Add thread dots to note header icon, disable comments on closed nodes

This commit is contained in:
Bryan Housel
2018-07-16 16:39:40 -04:00
parent 47de7b304f
commit 694cc60893
4 changed files with 28 additions and 3 deletions
+13 -1
View File
@@ -8,7 +8,10 @@ export function uiNoteHeader() {
function noteHeader(selection) {
var header = selection.selectAll('.note-header')
.data([_note], function(d) { return d.status + d.id; });
.data(
(_note ? [_note] : []),
function(d) { return d.status + d.id; }
);
header.exit()
.remove();
@@ -26,6 +29,15 @@ export function uiNoteHeader() {
.attr('class', 'preset-icon-28')
.call(svgIcon('#iD-icon-note', 'note-fill'));
iconEnter.each(function(d) {
if (d.comments.length > 1) {
iconEnter
.append('div')
.attr('class', 'note-icon-annotation')
.call(svgIcon('#iD-icon-more', 'note-annotation'));
}
});
headerEnter
.append('div')
.attr('class', 'note-header-label')