changed note annotation icons

This commit is contained in:
Thomas Hervey
2018-07-21 22:49:12 -04:00
parent 38b4e462c6
commit 00bb733736
2 changed files with 10 additions and 26 deletions
+5 -15
View File
@@ -124,27 +124,17 @@ export function svgNotes(projection, context, dispatch) {
// add dots if there's a comment thread
notesEnter.selectAll('.note-annotation')
.data(function(d) { return d.comments.length > 1 ? [0] : []; })
.data(function(d) { return [d]; })
.enter()
.append('use')
.attr('class', 'note-annotation thread')
.attr('width', '14px')
.attr('height', '14px')
.attr('x', '-5px')
.attr('y', '-20px')
.attr('xlink:href', '#iD-icon-more');
// add plus if this is a new note
notesEnter.selectAll('.note-annotation')
.data(function(d) { return d.id < 0 ? [0] : []; })
.enter()
.append('use')
.attr('class', 'note-annotation thread')
.attr('width', '14px')
.attr('height', '14px')
.attr('x', '-5px')
.attr('y', '-20px')
.attr('xlink:href', '#iD-icon-plus');
.attr('y', '-21px')
.attr('xlink:href', function(d) {
return '#iD-icon-' + (d.id < 0 ? 'plus' : (d.status === 'open' ? 'close' : 'apply'));
});
// update
notes
+5 -11
View File
@@ -31,17 +31,11 @@ export function uiNoteHeader() {
.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'));
} else if (_note.isNew()) {
iconEnter
.append('div')
.attr('class', 'note-icon-annotation')
.call(svgIcon('#iD-icon-plus', 'note-annotation'));
}
var statusIcon = '#iD-icon-' + (d.id < 0 ? 'plus' : (d.status === 'open' ? 'close' : 'apply'));
iconEnter
.append('div')
.attr('class', 'note-icon-annotation')
.call(svgIcon(statusIcon, 'note-annotation'));
});
headerEnter