Create a footer for shepherding purposes

This commit is contained in:
Dustin Brett 2025-02-18 15:42:36 -08:00
parent 8092c0f3e5
commit 1ce2ecd737
2 changed files with 9 additions and 4 deletions

View File

@ -36,9 +36,10 @@ window.Sheep = class eSheep {
document.body.clientWidth; // window width
this.screenH =
window.innerHeight ||
(window.innerHeight ||
document.documentElement.clientHeight ||
document.body.clientHeight; // window height
document.body.clientHeight) // window height
- (this.userOptions.footerMargin || 0);
}
Start(animation) {
@ -154,9 +155,10 @@ window.Sheep = class eSheep {
document.body.clientWidth;
this.screenH =
window.innerHeight ||
(window.innerHeight ||
document.documentElement.clientHeight ||
document.body.clientHeight;
document.body.clientHeight)
- (this.userOptions.footerMargin || 0);
if (this.imageY + this.imageH > this.screenH) {
this.imageY = this.screenH - this.imageH;

View File

@ -1,8 +1,10 @@
import { TASKBAR_HEIGHT } from "utils/constants";
import { loadFiles } from "utils/functions";
type SheepOptions = {
allowPopup: string;
collisionsWith: string[];
footerMargin: number;
spawnContainer: HTMLElement;
};
@ -47,6 +49,7 @@ export const spawnSheep = (): Promise<void> =>
const sheep = new window.Sheep({
allowPopup: "no",
collisionsWith: ["nav", "section"],
footerMargin: TASKBAR_HEIGHT,
spawnContainer: document.querySelector("main") as HTMLElement,
});