Cleaner note icon rendering

Before: We drew 2 fontawesome comment icons, on on top of the other
After: Moved icon into iD spritesheet and gave it an actual `stroke` property that can be styled
This commit is contained in:
Bryan Housel
2018-07-16 13:17:17 -04:00
parent 33de399bac
commit 70f87632c7
7 changed files with 29 additions and 35 deletions
+14 -14
View File
@@ -82,14 +82,14 @@ export function svgNotes(projection, context, dispatch) {
.append('g')
.attr('class', function(d) { return 'note note-' + d.id + ' ' + d.status; });
notesEnter
.append('use')
.attr('class', 'note-shadow')
.attr('width', '24px')
.attr('height', '24px')
.attr('x', '-12px')
.attr('y', '-24px')
.attr('xlink:href', '#fas-comment-alt');
// notesEnter
// .append('use')
// .attr('class', 'note-shadow')
// .attr('width', '24px')
// .attr('height', '24px')
// .attr('x', '-12px')
// .attr('y', '-24px')
// .attr('xlink:href', '#iD-icon-note');
notesEnter
.append('use')
@@ -98,18 +98,18 @@ export function svgNotes(projection, context, dispatch) {
.attr('height', '20px')
.attr('x', '-10px')
.attr('y', '-22px')
.attr('xlink:href', '#fas-comment-alt');
.attr('xlink:href', '#iD-icon-note');
// add dots if there's a comment thread
notesEnter.selectAll('.thread')
.data(function(d) { return d.comments.length > 1 ? [0] : []; })
.enter()
.append('use')
.attr('class', 'note-shadow thread')
.attr('width', '18px')
.attr('height', '18px')
.attr('x', '-9px')
.attr('y', '-22px')
.attr('class', 'note-annotation thread')
.attr('width', '14px')
.attr('height', '14px')
.attr('x', '-7px')
.attr('y', '-20px')
.attr('xlink:href', '#iD-icon-more');
// update
+1 -6
View File
@@ -24,12 +24,7 @@ export function uiNoteHeader() {
iconEnter
.append('div')
.attr('class', 'preset-icon-28')
.call(svgIcon('#fas-comment-alt', 'note-shadow'));
iconEnter
.append('div')
.attr('class', 'preset-icon-24')
.call(svgIcon('#fas-comment-alt', 'note-fill'));
.call(svgIcon('#iD-icon-note', 'note-fill'));
headerEnter
.append('div')