mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-09-27 12:39:18 +02:00
Configure canvas element size on the fly
This commit is contained in:
parent
c74a31bbca
commit
6ee0b382c4
2 changed files with 8 additions and 3 deletions
|
@ -16,8 +16,14 @@
|
|||
const innerContainer = document.getElementById("innerContainer")
|
||||
const container = document.getElementById("container")
|
||||
const canvas = document.getElementById("highlightCanvas")
|
||||
const canvasImage = document.getElementById('image')
|
||||
const context = canvas.getContext("2d")
|
||||
|
||||
canvas.width = canvasSize.x
|
||||
canvas.height = canvasSize.y
|
||||
canvasImage.width = canvasSize.x
|
||||
canvasImage.height = canvasSize.y
|
||||
|
||||
let zoom = 1
|
||||
|
||||
if (window.devicePixelRatio) {
|
||||
|
|
|
@ -169,9 +169,8 @@ <h4 class="mb-3">Hang on…</h4>
|
|||
</div>
|
||||
<canvas id="linesCanvas"></canvas>
|
||||
<div id="innerContainer">
|
||||
<canvas id="highlightCanvas" width="2000" height="2000"></canvas>
|
||||
|
||||
<img id="image" width="2000" height="2000" alt="" />
|
||||
<canvas id="highlightCanvas"></canvas>
|
||||
<img id="image" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="offcanvas offcanvas-start bg-body" data-bs-scroll="true" data-bs-backdrop="false" tabindex="-1" id="offcanvasList" aria-labelledby="offcanvasListLabel">
|
||||
|
|
Loading…
Reference in a new issue