mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-17 22:24:49 +02:00
Fix issues with <use>'d elements and fill under Firefox (closes #2860)
This commit is contained in:
@@ -167,6 +167,7 @@ iD.svg.Labels = function(projection, context) {
|
||||
|
||||
icons.enter()
|
||||
.append('use')
|
||||
.attr('class', 'icon areaicon')
|
||||
.attr('width', '18px')
|
||||
.attr('height', '18px');
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ iD.svg.Turns = function(projection) {
|
||||
.attr('height', '24');
|
||||
|
||||
nEnter.append('use')
|
||||
.attr('transform', 'translate(-22, -12)')
|
||||
.attr('width', '44')
|
||||
.attr('height', '24');
|
||||
|
||||
@@ -38,6 +39,7 @@ iD.svg.Turns = function(projection) {
|
||||
.attr('r', '16');
|
||||
|
||||
uEnter.append('use')
|
||||
.attr('transform', 'translate(-16, -16)')
|
||||
.attr('width', '32')
|
||||
.attr('height', '32');
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ iD.svg.Vertices = function(projection, context) {
|
||||
return icons[entity.id];
|
||||
}
|
||||
|
||||
function classCircle(klass) {
|
||||
function setClass(klass) {
|
||||
return function(entity) {
|
||||
this.setAttribute('class', 'node vertex ' + klass + ' ' + entity.id);
|
||||
};
|
||||
@@ -110,10 +110,10 @@ iD.svg.Vertices = function(projection, context) {
|
||||
.attr('class', function(d) { return 'node vertex ' + klass + ' ' + d.id; });
|
||||
|
||||
enter.append('circle')
|
||||
.each(classCircle('shadow'));
|
||||
.each(setClass('shadow'));
|
||||
|
||||
enter.append('circle')
|
||||
.each(classCircle('stroke'));
|
||||
.each(setClass('stroke'));
|
||||
|
||||
// Vertices with icons get a `use`.
|
||||
enter.filter(function(d) { return icon(d); })
|
||||
@@ -121,12 +121,13 @@ iD.svg.Vertices = function(projection, context) {
|
||||
.attr('transform', 'translate(-6, -6)')
|
||||
.attr('xlink:href', function(d) { return '#' + icon(d) + '-12'; })
|
||||
.attr('width', '12px')
|
||||
.attr('height', '12px');
|
||||
.attr('height', '12px')
|
||||
.each(setClass('icon'));
|
||||
|
||||
// Vertices with tags get a fill.
|
||||
enter.filter(function(d) { return d.hasInterestingTags(); })
|
||||
.append('circle')
|
||||
.each(classCircle('fill'));
|
||||
.each(setClass('fill'));
|
||||
|
||||
groups
|
||||
.attr('transform', iD.svg.PointTransform(projection))
|
||||
|
||||
Reference in New Issue
Block a user