mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-11-15 14:33:36 +01:00
Merge branch 'master' into live-love-life/2
This commit is contained in:
commit
b869ec77f8
8 changed files with 876 additions and 750 deletions
|
@ -12180,3 +12180,77 @@ zznclm
|
||||||
11ym62b
|
11ym62b
|
||||||
1202zbu
|
1202zbu
|
||||||
11z4vo3
|
11z4vo3
|
||||||
|
12242w2
|
||||||
|
1223yqd
|
||||||
|
124585e
|
||||||
|
12456c9
|
||||||
|
1244l35
|
||||||
|
1242otc
|
||||||
|
1241t5a
|
||||||
|
1241oty
|
||||||
|
1247dzz
|
||||||
|
1247d05
|
||||||
|
124785e
|
||||||
|
1248bx2
|
||||||
|
12484c5
|
||||||
|
1247wtz
|
||||||
|
1247ol7
|
||||||
|
1253355
|
||||||
|
1256bcy
|
||||||
|
1255zlx
|
||||||
|
1255xpa
|
||||||
|
12785a3
|
||||||
|
12784vv
|
||||||
|
12781rj
|
||||||
|
1288lnu
|
||||||
|
1288fxl
|
||||||
|
12892fn
|
||||||
|
128f63s
|
||||||
|
128ssa2
|
||||||
|
1290btg
|
||||||
|
128xp74
|
||||||
|
128utfz
|
||||||
|
128us0p
|
||||||
|
128uqzl
|
||||||
|
12928cm
|
||||||
|
129ud6g
|
||||||
|
129vfo0
|
||||||
|
129uxsp
|
||||||
|
129uuxe
|
||||||
|
129yvua
|
||||||
|
129yfxz
|
||||||
|
129y688
|
||||||
|
129xzbv
|
||||||
|
129zh8g
|
||||||
|
12a4axm
|
||||||
|
12a2lce
|
||||||
|
12ar8bx
|
||||||
|
12b3k3d
|
||||||
|
12b6on1
|
||||||
|
12b6dgu
|
||||||
|
12b67as
|
||||||
|
12b667u
|
||||||
|
12b65bq
|
||||||
|
12b647g
|
||||||
|
12b627l
|
||||||
|
12b60d6
|
||||||
|
12b5wdq
|
||||||
|
12b5ojd
|
||||||
|
12czvqu
|
||||||
|
12czppx
|
||||||
|
12czoh9
|
||||||
|
12c7dtl
|
||||||
|
12d0c0b
|
||||||
|
12dztsv
|
||||||
|
12dzc0r
|
||||||
|
12dz0wf
|
||||||
|
12dykxl
|
||||||
|
12e1qdg
|
||||||
|
12e1lo4
|
||||||
|
12e1jx2
|
||||||
|
12e2ghb
|
||||||
|
12e6e9h
|
||||||
|
12e6cuv
|
||||||
|
12e5yi3
|
||||||
|
12e5w5s
|
||||||
|
12e5s3y
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
with open(merge_source_file, 'r', encoding='UTF-8') as f1:
|
with open(merge_source_file, 'r', encoding='UTF-8') as f1:
|
||||||
out_json = json.loads(f1.read())
|
out_json = json.loads(f1.read())
|
||||||
|
|
||||||
format_all_entries.format_all_entries(out_json)
|
format_all_entries(out_json)
|
||||||
|
|
||||||
base_image_path = os.path.join('..', 'web', '_img', 'canvas', 'place30')
|
base_image_path = os.path.join('..', 'web', '_img', 'canvas', 'place30')
|
||||||
ScaleConfig.image1 = os.path.join(base_image_path, '159.png')
|
ScaleConfig.image1 = os.path.join(base_image_path, '159.png')
|
||||||
|
|
|
@ -29,7 +29,7 @@ const areaMap = new Map()
|
||||||
// Modified from https://stackoverflow.com/a/33670691
|
// Modified from https://stackoverflow.com/a/33670691
|
||||||
function calcPolygonArea(vertices) {
|
function calcPolygonArea(vertices) {
|
||||||
const hit = areaMap.get(vertices)
|
const hit = areaMap.get(vertices)
|
||||||
if (hit !== null) {
|
if (hit) {
|
||||||
return hit
|
return hit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -317,12 +317,12 @@ function initDraw() {
|
||||||
directPostUrl += "&text="
|
directPostUrl += "&text="
|
||||||
|
|
||||||
if (directPostJsonString.length + directPostJsonString > 7579) {
|
if (directPostJsonString.length + directPostJsonString > 7579) {
|
||||||
directPostJsonString = encodeURIComponent(" " + JSON.stringify(exportObject))
|
directPostJsonString = " " + JSON.stringify(exportObject)
|
||||||
}
|
}
|
||||||
if (exportArea.value > 40000) {
|
if (exportArea.value > 40000) {
|
||||||
exportArea.value = " " + JSON.stringify(exportObject)
|
exportArea.value = " " + JSON.stringify(exportObject)
|
||||||
}
|
}
|
||||||
directPostUrl += directPostJsonString
|
directPostUrl += encodeURIComponent(directPostJsonString)
|
||||||
|
|
||||||
if (directPostUrl.length > 7579) {
|
if (directPostUrl.length > 7579) {
|
||||||
// exportDirectPostButton.classList.add("disabled")
|
// exportDirectPostButton.classList.add("disabled")
|
||||||
|
|
|
@ -113,9 +113,9 @@ async function init() {
|
||||||
|
|
||||||
if (period) {
|
if (period) {
|
||||||
const [, targetPeriod, targetVariation] = parsePeriod(period)
|
const [, targetPeriod, targetVariation] = parsePeriod(period)
|
||||||
await updateTime(targetPeriod, targetVariation)
|
await updateTime(targetPeriod, targetVariation, true)
|
||||||
} else {
|
} else {
|
||||||
await updateTime(currentPeriod, currentVariation)
|
await updateTime(currentPeriod, currentVariation, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
//console.log(document.documentElement.clientWidth, document.documentElement.clientHeight)
|
//console.log(document.documentElement.clientWidth, document.documentElement.clientHeight)
|
||||||
|
@ -411,9 +411,6 @@ async function init() {
|
||||||
scaleZoomOrigin[0] += deltaX / zoom
|
scaleZoomOrigin[0] += deltaX / zoom
|
||||||
scaleZoomOrigin[1] += deltaY / zoom
|
scaleZoomOrigin[1] += deltaY / zoom
|
||||||
|
|
||||||
previousZoomOrigin = [zoomOrigin[0], zoomOrigin[1]]
|
|
||||||
previousScaleZoomOrigin = [scaleZoomOrigin[0], scaleZoomOrigin[1]]
|
|
||||||
|
|
||||||
updateLines()
|
updateLines()
|
||||||
applyView()
|
applyView()
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,6 +134,9 @@ async function updateBackground(newPeriod = currentPeriod, newVariation = curren
|
||||||
}
|
}
|
||||||
|
|
||||||
async function updateTime(newPeriod = currentPeriod, newVariation = currentVariation, forceLoad = false) {
|
async function updateTime(newPeriod = currentPeriod, newVariation = currentVariation, forceLoad = false) {
|
||||||
|
if (newPeriod === currentPeriod && !forceLoad) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
document.body.dataset.canvasLoading = ""
|
document.body.dataset.canvasLoading = ""
|
||||||
|
|
||||||
const oldPeriod = currentPeriod
|
const oldPeriod = currentPeriod
|
||||||
|
|
|
@ -9,9 +9,6 @@ const linesCanvas = document.getElementById("linesCanvas")
|
||||||
const linesContext = linesCanvas.getContext("2d")
|
const linesContext = linesCanvas.getContext("2d")
|
||||||
let hovered = []
|
let hovered = []
|
||||||
|
|
||||||
let previousZoomOrigin = [0, 0]
|
|
||||||
let previousScaleZoomOrigin = [0, 0]
|
|
||||||
|
|
||||||
const backgroundCanvas = document.createElement("canvas")
|
const backgroundCanvas = document.createElement("canvas")
|
||||||
backgroundCanvas.width = canvasSize.x
|
backgroundCanvas.width = canvasSize.x
|
||||||
backgroundCanvas.height = canvasSize.y
|
backgroundCanvas.height = canvasSize.y
|
||||||
|
@ -423,15 +420,12 @@ function buildObjectsList(filter = null, sort = null) {
|
||||||
element.addEventListener("click", e => {
|
element.addEventListener("click", e => {
|
||||||
toggleFixed(e)
|
toggleFixed(e)
|
||||||
if (fixed) {
|
if (fixed) {
|
||||||
previousZoomOrigin = [zoomOrigin[0], zoomOrigin[1]]
|
|
||||||
previousScaleZoomOrigin = [scaleZoomOrigin[0], scaleZoomOrigin[1]]
|
|
||||||
applyView()
|
applyView()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
element.addEventListener("mouseleave", function () {
|
element.addEventListener("mouseleave", function () {
|
||||||
if (!fixed && !dragging) {
|
if (!fixed && !dragging) {
|
||||||
setView(previousScaleZoomOrigin[0], previousScaleZoomOrigin[1])
|
|
||||||
hovered = []
|
hovered = []
|
||||||
updateLines()
|
updateLines()
|
||||||
render()
|
render()
|
||||||
|
@ -705,8 +699,6 @@ function highlightEntryFromUrl() {
|
||||||
render()
|
render()
|
||||||
hovered[0].element = infoElement
|
hovered[0].element = infoElement
|
||||||
updateLines()
|
updateLines()
|
||||||
fixed = true
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setZoomByPath(path) {
|
function setZoomByPath(path) {
|
||||||
|
|
1522
web/atlas.json
1522
web/atlas.json
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue