Fix display of selection ring
This commit is contained in:
parent
148c6e00ca
commit
b985cf3a33
@ -24,8 +24,7 @@ function getCapIdAtPosition(position) {
|
||||
return capPositions[position];
|
||||
}
|
||||
|
||||
const selectedCapCircle = document.querySelector("#selected-cap-circle");
|
||||
const imageCanvas = document.querySelector("#image-canvas");
|
||||
const imageCanvas = document.getElementById("image-canvas");
|
||||
|
||||
var capPositions = Array.from(
|
||||
{length: numberOfCaps},
|
||||
@ -37,6 +36,7 @@ imageCanvas.innerHTML += capPositions.map(createImage).join("");
|
||||
var selectedPosition = null;
|
||||
|
||||
const elements = imageCanvas.getElementsByTagName("img");
|
||||
const selectedCapCircle = document.getElementById("selected-cap-circle");
|
||||
|
||||
imageCanvas.addEventListener("click", function(event) {
|
||||
const xPosition = event.clientX - imageCanvas.getBoundingClientRect().left;
|
||||
|
Loading…
Reference in New Issue
Block a user