disable atlas on not latest image

This commit is contained in:
Alex Tsernoh 2022-04-08 00:11:29 +01:00
parent 77887164ee
commit 880399eb8c
No known key found for this signature in database
GPG key ID: 5A0BA13F0012A4BA
3 changed files with 19 additions and 1 deletions

View file

@ -92,6 +92,8 @@ async function init(){
// a must be equal to b
return 0;
});
//TEMP FOR TIME TRAVEL
atlasBackup = atlas;
//console.log(document.documentElement.clientWidth, document.documentElement.clientHeight);

View file

@ -73,13 +73,17 @@ const timeConfig = [
{
timestamp: 1649113199,
url: "/_img/place/final.png",
image: null
image: null,
showAtlas: true,
},
];
let slider = document.getElementById("timeControlsSlider");
let image = document.getElementById("image");
let timeCallback = (a) => {};
let atlasBackup = [];
// SETUP
slider.max = timeConfig.length;
slider.value = timeConfig.length;
@ -98,4 +102,11 @@ async function updateTime(index) {
configObject.image = URL.createObjectURL(imageBlob);
}
image.src = configObject.image;
// TEMP ATLAS ONLY ON LAST TIMESTAMP
if (configObject.showAtlas) {
atlas = atlasBackup
} else {
atlas = []
}
timeCallback(atlas)
}

View file

@ -155,6 +155,11 @@ function initView(){
buildObjectsList(null, null);
timeCallback = (tempAtlas) => {
renderBackground(tempAtlas);
render();
}
// parse linked atlas entry id from link hash
/*if (window.location.hash.substring(3)){
zoom = 4;