mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Fix isMaki, reset sizes, remove unnecessary checks
This commit is contained in:
@@ -46,10 +46,10 @@ export function svgPoints(projection, context) {
|
||||
.call(markerPath, 'stroke');
|
||||
|
||||
enter.append('use')
|
||||
.attr('transform', 'translate(-6, -20)')
|
||||
.attr('transform', 'translate(-5, -19)')
|
||||
.attr('class', 'icon')
|
||||
.attr('width', '12px')
|
||||
.attr('height', '12px');
|
||||
.attr('width', '11px')
|
||||
.attr('height', '11px');
|
||||
|
||||
groups = groups
|
||||
.merge(enter)
|
||||
@@ -63,7 +63,7 @@ export function svgPoints(projection, context) {
|
||||
groups.select('.icon')
|
||||
.attr('xlink:href', function(entity) {
|
||||
var preset = context.presets().match(entity, graph);
|
||||
return (preset && preset.icon) ? '#' + preset.icon + '-12' : '';
|
||||
return (preset && preset.icon) ? '#' + preset.icon + '-11' : '';
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -18,11 +18,7 @@ export function uiPresetIcon() {
|
||||
p = preset.apply(this, arguments),
|
||||
geom = geometry.apply(this, arguments),
|
||||
picon = p.icon || (geom === 'line' ? 'other-line' : 'marker-stroked'),
|
||||
isMaki = dataFeatureIcons.hasOwnProperty(picon + '-24');
|
||||
|
||||
if (picon === 'dentist') {
|
||||
isMaki = true; // workaround for dentist icon missing in `maki-sprite.json`
|
||||
}
|
||||
isMaki = dataFeatureIcons.indexOf(picon) !== -1;
|
||||
|
||||
function tag_classes(p) {
|
||||
var s = '';
|
||||
@@ -78,8 +74,8 @@ export function uiPresetIcon() {
|
||||
return 'icon ' + picon + tag_classes(p);
|
||||
});
|
||||
|
||||
icon.selectAll('use') // workaround: maki parking-24 broken?
|
||||
.attr('href', '#' + picon + (isMaki ? (picon === 'parking' ? '-18' : '-24') : ''));
|
||||
icon.selectAll('use')
|
||||
.attr('href', '#' + picon + (isMaki ? '-15' : ''));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user