mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 07:46:58 +02:00
fix zoom resetting wrongly when switching background mid-transition
see https://github.com/openstreetmap/iD/issues/10700#issuecomment-2832010049
This commit is contained in:
@@ -554,15 +554,13 @@ export default {
|
||||
|
||||
|
||||
updateUrlImage: function(imageKey) {
|
||||
if (!window.mocha) {
|
||||
var hash = utilStringQs(window.location.hash);
|
||||
if (imageKey) {
|
||||
hash.photo = 'kartaview/' + imageKey;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.location.replace('#' + utilQsString(hash, true));
|
||||
const hash = utilStringQs(window.location.hash);
|
||||
if (imageKey) {
|
||||
hash.photo = 'kartaview/' + imageKey;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.history.replaceState(null, '', '#' + utilQsString(hash, true));
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -308,15 +308,13 @@ export default {
|
||||
},
|
||||
|
||||
updateUrlImage: function(imageKey) {
|
||||
if (!window.mocha) {
|
||||
var hash = utilStringQs(window.location.hash);
|
||||
if (imageKey) {
|
||||
hash.photo = 'mapilio/' + imageKey;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.location.replace('#' + utilQsString(hash, true));
|
||||
const hash = utilStringQs(window.location.hash);
|
||||
if (imageKey) {
|
||||
hash.photo = 'mapilio/' + imageKey;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.history.replaceState(null, '', '#' + utilQsString(hash, true));
|
||||
},
|
||||
|
||||
initViewer: function () {
|
||||
|
||||
@@ -524,15 +524,13 @@ export default {
|
||||
|
||||
// Update the URL with current image id
|
||||
updateUrlImage: function(imageId) {
|
||||
if (!window.mocha) {
|
||||
const hash = utilStringQs(window.location.hash);
|
||||
if (imageId) {
|
||||
hash.photo = 'mapillary/' + imageId;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.location.replace('#' + utilQsString(hash, true));
|
||||
const hash = utilStringQs(window.location.hash);
|
||||
if (imageId) {
|
||||
hash.photo = 'mapillary/' + imageId;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.history.replaceState(null, '', '#' + utilQsString(hash, true));
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -419,15 +419,13 @@ export default {
|
||||
* @param {*} imageKey
|
||||
*/
|
||||
updateUrlImage: function(imageKey) {
|
||||
if (!window.mocha) {
|
||||
var hash = utilStringQs(window.location.hash);
|
||||
if (imageKey) {
|
||||
hash.photo = 'panoramax/' + imageKey;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.location.replace('#' + utilQsString(hash, true));
|
||||
const hash = utilStringQs(window.location.hash);
|
||||
if (imageKey) {
|
||||
hash.photo = 'panoramax/' + imageKey;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.history.replaceState(null, '', '#' + utilQsString(hash, true));
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -905,15 +905,13 @@ export default {
|
||||
|
||||
|
||||
updateUrlImage: function(imageKey) {
|
||||
if (!window.mocha) {
|
||||
var hash = utilStringQs(window.location.hash);
|
||||
if (imageKey) {
|
||||
hash.photo = 'streetside/' + imageKey;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.location.replace('#' + utilQsString(hash, true));
|
||||
const hash = utilStringQs(window.location.hash);
|
||||
if (imageKey) {
|
||||
hash.photo = 'streetside/' + imageKey;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.history.replaceState(null, '', '#' + utilQsString(hash, true));
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -584,15 +584,13 @@ export default {
|
||||
},
|
||||
|
||||
updateUrlImage: function (key) {
|
||||
if (!window.mocha) {
|
||||
const hash = utilStringQs(window.location.hash);
|
||||
if (key) {
|
||||
hash.photo = 'vegbilder/' + key;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.location.replace('#' + utilQsString(hash, true));
|
||||
const hash = utilStringQs(window.location.hash);
|
||||
if (key) {
|
||||
hash.photo = 'vegbilder/' + key;
|
||||
} else {
|
||||
delete hash.photo;
|
||||
}
|
||||
window.history.replaceState(null, '', '#' + utilQsString(hash, true));
|
||||
},
|
||||
|
||||
validHere: function(extent) {
|
||||
|
||||
Reference in New Issue
Block a user