mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-11-15 22:43:13 +01:00
Add support for overlap, remove debug logs
This commit is contained in:
parent
2d20e0931d
commit
1070a5aa65
4 changed files with 14 additions and 10 deletions
|
@ -113,8 +113,6 @@ function initDraw(){
|
||||||
|
|
||||||
if(!dragging && drawing && path.length > 0){
|
if(!dragging && drawing && path.length > 0){
|
||||||
|
|
||||||
console.log(123)
|
|
||||||
|
|
||||||
var coords = getCanvasCoords(e.clientX, e.clientY);
|
var coords = getCanvasCoords(e.clientX, e.clientY);
|
||||||
render(path.concat([coords]));
|
render(path.concat([coords]));
|
||||||
}
|
}
|
||||||
|
@ -230,7 +228,6 @@ function initDraw(){
|
||||||
jsonString = jsonString.join("\n ");
|
jsonString = jsonString.join("\n ");
|
||||||
jsonString = " "+jsonString;
|
jsonString = " "+jsonString;
|
||||||
textarea.value = 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);
|
var directPostUrl = "https://www.reddit.com/r/placeAtlas2/submit?selftext=true&title=New%20Submission&text="+encodeURIComponent(document.getElementById("exportString").value);
|
||||||
if (jsonString.length > 7493) {
|
if (jsonString.length > 7493) {
|
||||||
directPostUrl = "https://www.reddit.com/r/placeAtlas2/submit?selftext=true&title=New%20Submission&text="+encodeURIComponent(" " + JSON.stringify(exportObject));
|
directPostUrl = "https://www.reddit.com/r/placeAtlas2/submit?selftext=true&title=New%20Submission&text="+encodeURIComponent(" " + JSON.stringify(exportObject));
|
||||||
|
|
|
@ -85,11 +85,13 @@ function createInfoBlock(entry) {
|
||||||
idElement.style.fontFamily = "Dejavu Sans Mono, sans, Sans-Serif;";
|
idElement.style.fontFamily = "Dejavu Sans Mono, sans, Sans-Serif;";
|
||||||
element.appendChild(idElement);
|
element.appendChild(idElement);
|
||||||
|
|
||||||
|
if (!entry.diff || entry.diff !== "delete") {
|
||||||
let editElement = document.createElement("a");
|
let editElement = document.createElement("a");
|
||||||
editElement.innerText = "Edit"
|
editElement.innerText = "Edit"
|
||||||
editElement.className = "objectEdit"
|
editElement.className = "objectEdit"
|
||||||
editElement.href = "./?mode=draw&id=" + entry.id
|
editElement.href = "./?mode=draw&id=" + entry.id
|
||||||
element.appendChild(editElement);
|
element.appendChild(editElement);
|
||||||
|
}
|
||||||
|
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
|
@ -23,6 +23,13 @@ function initOverlap(){
|
||||||
renderBackground(atlas);
|
renderBackground(atlas);
|
||||||
render();
|
render();
|
||||||
|
|
||||||
|
document.addEventListener('timeupdate', (event) => {
|
||||||
|
sortedAtlas = atlas.concat()
|
||||||
|
resetEntriesList(null, null)
|
||||||
|
renderBackground(tempAtlas);
|
||||||
|
render();
|
||||||
|
})
|
||||||
|
|
||||||
applyView();
|
applyView();
|
||||||
render();
|
render();
|
||||||
updateLines();
|
updateLines();
|
||||||
|
|
|
@ -123,7 +123,6 @@ document.querySelector('#endPeriodField').oninput = (event) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const dispatchTimeUpdateEvent = (period = slider.value, atlas = atlas) => {
|
const dispatchTimeUpdateEvent = (period = slider.value, atlas = atlas) => {
|
||||||
console.log('dispatched!')
|
|
||||||
const timeUpdateEvent = new CustomEvent('timeupdate', {
|
const timeUpdateEvent = new CustomEvent('timeupdate', {
|
||||||
detail: {
|
detail: {
|
||||||
period: period,
|
period: period,
|
||||||
|
@ -137,7 +136,6 @@ async function updateTime(currentPeriod) {
|
||||||
period = currentPeriod
|
period = currentPeriod
|
||||||
let configObject = timeConfig[currentPeriod];
|
let configObject = timeConfig[currentPeriod];
|
||||||
if (!configObject.image) {
|
if (!configObject.image) {
|
||||||
console.log("fetching");
|
|
||||||
let fetchResult = await fetch(configObject.url);
|
let fetchResult = await fetch(configObject.url);
|
||||||
let imageBlob = await fetchResult.blob();
|
let imageBlob = await fetchResult.blob();
|
||||||
configObject.image = URL.createObjectURL(imageBlob);
|
configObject.image = URL.createObjectURL(imageBlob);
|
||||||
|
|
Loading…
Reference in a new issue