mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-25 09:34:04 +02:00
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:
+14
-14
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user