mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-09-26 03:59:05 +02:00
disable atlas on not latest image
This commit is contained in:
parent
77887164ee
commit
880399eb8c
3 changed files with 19 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
}
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue