mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-27 14:16:42 +02:00
Fix issue with stale vertex icon
This commit is contained in:
+14
-17
@@ -24,7 +24,7 @@ export function uiPresetIcon() {
|
||||
else if (geom === 'vertex')
|
||||
return p.isFallback() ? '' : 'temaki-vertex';
|
||||
else if (isSmall() && geom === 'point')
|
||||
return null;
|
||||
return '';
|
||||
else
|
||||
return 'maki-marker-stroked';
|
||||
}
|
||||
@@ -150,9 +150,9 @@ export function uiPresetIcon() {
|
||||
var p = preset.apply(this, arguments);
|
||||
var geom = geometry ? geometry.apply(this, arguments) : null;
|
||||
var picon = getIcon(p, geom);
|
||||
var isMaki = picon ? /^maki-/.test(picon) : false;
|
||||
var isTemaki = picon ? /^temaki-/.test(picon) : false;
|
||||
var isFa = picon ? /^fa[srb]-/.test(picon) : false;
|
||||
var isMaki = /^maki-/.test(picon);
|
||||
var isTemaki = /^temaki-/.test(picon);
|
||||
var isFa = /^fa[srb]-/.test(picon);
|
||||
var isiDIcon = !(isMaki || isTemaki || isFa);
|
||||
var isCategory = !p.setTags;
|
||||
var drawLine = geom === 'line' && !isCategory;
|
||||
@@ -231,21 +231,18 @@ export function uiPresetIcon() {
|
||||
.call(svgIcon(''))
|
||||
.merge(icon);
|
||||
|
||||
if (picon) {
|
||||
icon
|
||||
.attr('class', 'preset-icon ' + (geom ? geom + '-geom' : ''))
|
||||
.classed('framed', isFramed)
|
||||
.classed('preset-icon-iD', isiDIcon);
|
||||
|
||||
icon
|
||||
.attr('class', 'preset-icon ' + (geom ? geom + '-geom' : ''))
|
||||
.classed('framed', isFramed)
|
||||
.classed('preset-icon-iD', isiDIcon);
|
||||
icon.selectAll('svg')
|
||||
.attr('class', function() {
|
||||
return 'icon ' + picon + ' ' + (!isiDIcon && geom !== 'line' ? '' : tagClasses);
|
||||
});
|
||||
|
||||
icon.selectAll('svg')
|
||||
.attr('class', function() {
|
||||
return 'icon ' + picon + ' ' + (!isiDIcon && geom !== 'line' ? '' : tagClasses);
|
||||
});
|
||||
|
||||
icon.selectAll('use')
|
||||
.attr('href', '#' + picon + (isMaki ? (isSmall() && geom === 'point' ? '-11' : '-15') : ''));
|
||||
}
|
||||
icon.selectAll('use')
|
||||
.attr('href', '#' + picon + (isMaki ? (isSmall() && geom === 'point' ? '-11' : '-15') : ''));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user