diff --git a/web/_js/draw.js b/web/_js/draw.js index ce84ed38..2a2144cb 100644 --- a/web/_js/draw.js +++ b/web/_js/draw.js @@ -113,8 +113,6 @@ function initDraw(){ if(!dragging && drawing && path.length > 0){ - console.log(123) - var coords = getCanvasCoords(e.clientX, e.clientY); render(path.concat([coords])); } @@ -230,7 +228,6 @@ function initDraw(){ jsonString = jsonString.join("\n "); jsonString = " "+jsonString; textarea.value = jsonString; - console.log("a"); var directPostUrl = "https://www.reddit.com/r/placeAtlas2/submit?selftext=true&title=New%20Submission&text="+encodeURIComponent(document.getElementById("exportString").value); if (jsonString.length > 7493) { directPostUrl = "https://www.reddit.com/r/placeAtlas2/submit?selftext=true&title=New%20Submission&text="+encodeURIComponent(" " + JSON.stringify(exportObject)); diff --git a/web/_js/infoblock.js b/web/_js/infoblock.js index e3def942..59f65ded 100644 --- a/web/_js/infoblock.js +++ b/web/_js/infoblock.js @@ -85,11 +85,13 @@ function createInfoBlock(entry) { idElement.style.fontFamily = "Dejavu Sans Mono, sans, Sans-Serif;"; element.appendChild(idElement); - let editElement = document.createElement("a"); - editElement.innerText = "Edit" - editElement.className = "objectEdit" - editElement.href = "./?mode=draw&id=" + entry.id - element.appendChild(editElement); + if (!entry.diff || entry.diff !== "delete") { + let editElement = document.createElement("a"); + editElement.innerText = "Edit" + editElement.className = "objectEdit" + editElement.href = "./?mode=draw&id=" + entry.id + element.appendChild(editElement); + } return element; } \ No newline at end of file diff --git a/web/_js/overlap.js b/web/_js/overlap.js index 8ac44857..980a78ff 100644 --- a/web/_js/overlap.js +++ b/web/_js/overlap.js @@ -23,6 +23,13 @@ function initOverlap(){ renderBackground(atlas); render(); + document.addEventListener('timeupdate', (event) => { + sortedAtlas = atlas.concat() + resetEntriesList(null, null) + renderBackground(tempAtlas); + render(); + }) + applyView(); render(); updateLines(); diff --git a/web/_js/time.js b/web/_js/time.js index 5075f116..949d30bd 100644 --- a/web/_js/time.js +++ b/web/_js/time.js @@ -123,7 +123,6 @@ document.querySelector('#endPeriodField').oninput = (event) => { }; const dispatchTimeUpdateEvent = (period = slider.value, atlas = atlas) => { - console.log('dispatched!') const timeUpdateEvent = new CustomEvent('timeupdate', { detail: { period: period, @@ -137,7 +136,6 @@ async function updateTime(currentPeriod) { period = currentPeriod let configObject = timeConfig[currentPeriod]; if (!configObject.image) { - console.log("fetching"); let fetchResult = await fetch(configObject.url); let imageBlob = await fetchResult.blob(); configObject.image = URL.createObjectURL(imageBlob);