Prevent landing on sticky notes

This commit is contained in:
Idrees Hassan committed 2025-08-28 18:43:15 -04:00
1 parent 9e95603322
commit 8991be23b0
3 files changed
+6 -3

No files matched your search

+2 -1
View File
@@ -299,6 +299,7 @@ const species = {
[UNDERBELLY]: "#f5ea63", [UNDERBELLY]: "#f5ea63",
[WING]: "#e8e079", [WING]: "#e8e079",
[WING_EDGE]: "#191919", [WING_EDGE]: "#191919",
[THEME_HIGHLIGHT]: "#ffcc00"
}), }),
barnSwallow: new BirdType("Barn Swallow", barnSwallow: new BirdType("Barn Swallow",
"Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", { "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", {
@@ -1623,7 +1624,7 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
} }
function focusOnElement() { function focusOnElement() {
const elements = document.querySelectorAll("img, video, .birb-sticky-note"); const elements = document.querySelectorAll("img, video");
const inWindow = Array.from(elements).filter((img) => { const inWindow = Array.from(elements).filter((img) => {
const rect = img.getBoundingClientRect(); const rect = img.getBoundingClientRect();
return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight; return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight;
+2 -1
View File
@@ -619,6 +619,7 @@ const species = {
[UNDERBELLY]: "#f5ea63", [UNDERBELLY]: "#f5ea63",
[WING]: "#e8e079", [WING]: "#e8e079",
[WING_EDGE]: "#191919", [WING_EDGE]: "#191919",
[THEME_HIGHLIGHT]: "#ffcc00"
}), }),
barnSwallow: new BirdType("Barn Swallow", barnSwallow: new BirdType("Barn Swallow",
"Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", { "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", {
@@ -1943,7 +1944,7 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
} }
function focusOnElement() { function focusOnElement() {
const elements = document.querySelectorAll("img, video, .birb-sticky-note"); const elements = document.querySelectorAll("img, video");
const inWindow = Array.from(elements).filter((img) => { const inWindow = Array.from(elements).filter((img) => {
const rect = img.getBoundingClientRect(); const rect = img.getBoundingClientRect();
return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight; return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight;
+2 -1
View File
@@ -633,6 +633,7 @@ const species = {
[UNDERBELLY]: "#f5ea63", [UNDERBELLY]: "#f5ea63",
[WING]: "#e8e079", [WING]: "#e8e079",
[WING_EDGE]: "#191919", [WING_EDGE]: "#191919",
[THEME_HIGHLIGHT]: "#ffcc00"
}), }),
barnSwallow: new BirdType("Barn Swallow", barnSwallow: new BirdType("Barn Swallow",
"Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", { "Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", {
@@ -1957,7 +1958,7 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
} }
function focusOnElement() { function focusOnElement() {
const elements = document.querySelectorAll("img, video, .birb-sticky-note"); const elements = document.querySelectorAll("img, video");
const inWindow = Array.from(elements).filter((img) => { const inWindow = Array.from(elements).filter((img) => {
const rect = img.getBoundingClientRect(); const rect = img.getBoundingClientRect();
return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight; return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight;