mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
changed note annotation icons
This commit is contained in:
+5
-15
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user