mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-19 09:33:32 +00:00
All sources have id now, so compare by id
Fixes an issue where a source might not compare strictly equal e.g.: 1. custom imagery gets blacklisted and replaced with a `rendererBackgroundSource.None()` 2. which doesn't strictly === the `rendererBackgroundSource.None()` on the background pane switcher 3. so the radio button would not appear checked
This commit is contained in:
@@ -165,9 +165,8 @@ export function rendererBackground(context) {
|
||||
|
||||
|
||||
background.showsLayer = function(d) {
|
||||
return d === baseLayer.source() ||
|
||||
(d.id === 'custom' && baseLayer.source().id === 'custom') ||
|
||||
overlayLayers.some(function(l) { return l.source() === d; });
|
||||
return d.id === baseLayer.source().id ||
|
||||
overlayLayers.some(function(layer) { return d.id === layer.source().id; });
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user