mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Fix background tile issues caused by the cache not properly updating upon load/error with D3 v6
This commit is contained in:
@@ -121,7 +121,7 @@ export function rendererTileLayer(context) {
|
||||
});
|
||||
}
|
||||
|
||||
function load(d) {
|
||||
function load(d3_event, d) {
|
||||
_cache[d[3]] = true;
|
||||
d3_select(this)
|
||||
.on('error', null)
|
||||
@@ -130,7 +130,7 @@ export function rendererTileLayer(context) {
|
||||
render(selection);
|
||||
}
|
||||
|
||||
function error(d) {
|
||||
function error(d3_event, d) {
|
||||
_cache[d[3]] = false;
|
||||
d3_select(this)
|
||||
.on('error', null)
|
||||
|
||||
@@ -431,7 +431,9 @@ export default {
|
||||
.attr('crossorigin', 'anonymous')
|
||||
.attr('href', context.asset(viewercss))
|
||||
.on('load.serviceMapillary', loaded)
|
||||
.on('error.serviceMapillary', reject);
|
||||
.on('error.serviceMapillary', function() {
|
||||
reject();
|
||||
});
|
||||
|
||||
// load mapillary-viewerjs
|
||||
head.selectAll('#ideditor-mapillary-viewerjs')
|
||||
@@ -442,7 +444,9 @@ export default {
|
||||
.attr('crossorigin', 'anonymous')
|
||||
.attr('src', context.asset(viewerjs))
|
||||
.on('load.serviceMapillary', loaded)
|
||||
.on('error.serviceMapillary', reject);
|
||||
.on('error.serviceMapillary', function() {
|
||||
reject();
|
||||
});
|
||||
})
|
||||
.catch(function() {
|
||||
_loadViewerPromise = null;
|
||||
|
||||
@@ -585,7 +585,9 @@ export default {
|
||||
.attr('crossorigin', 'anonymous')
|
||||
.attr('href', context.asset(pannellumViewerCSS))
|
||||
.on('load.serviceStreetside', loaded)
|
||||
.on('error.serviceStreetside', reject);
|
||||
.on('error.serviceStreetside', function() {
|
||||
reject();
|
||||
});
|
||||
|
||||
// load streetside pannellum viewer js
|
||||
head.selectAll('#ideditor-streetside-viewerjs')
|
||||
@@ -596,7 +598,9 @@ export default {
|
||||
.attr('crossorigin', 'anonymous')
|
||||
.attr('src', context.asset(pannellumViewerJS))
|
||||
.on('load.serviceStreetside', loaded)
|
||||
.on('error.serviceStreetside', reject);
|
||||
.on('error.serviceStreetside', function() {
|
||||
reject();
|
||||
});
|
||||
})
|
||||
.catch(function() {
|
||||
_loadViewerPromise = null;
|
||||
|
||||
Reference in New Issue
Block a user