Remove dot in no-grid mode.

This commit is contained in:
Yaro Kasear 2025-12-09 11:31:47 -06:00
parent 292ca0798c
commit 0fb1991b5a

View file

@ -387,6 +387,7 @@ function setGrid() {
gridEl.style.backgroundImage = "";
gridEl.style.backgroundSize = "";
gridEl.style.boxShadow = "none";
dotEl.classList.add('d-none');
if (type === 'fullGrid') {
gridEl.style.backgroundImage =
@ -415,6 +416,7 @@ function setGrid() {
} else { // noGrid
gridEl.style.boxShadow = "inset 0 0 0 1px #ccc";
dotEl.classList.add('d-none');
}
}
@ -517,9 +519,11 @@ gridEl.addEventListener('pointermove', (e) => {
coordsEl.classList.remove('d-none');
dotEl.classList.remove('d-none');
dotEl.style.top = `${renderY}px`;
dotEl.style.left = `${renderX}px`;
if (getActiveType() !== 'noGrid') {
dotEl.classList.remove('d-none');
dotEl.style.top = `${renderY}px`;
dotEl.style.left = `${renderX}px`;
}
const type = getActiveType();