Skip to content

Commit a54993e

Browse files
committed
Deploy preview for PR 18 🛫
1 parent 8236c26 commit a54993e

12 files changed

+6971
-18
lines changed

‎pr-preview/pr-18/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

‎pr-preview/pr-18/jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default {
2+
transform: {},
3+
testEnvironment: "jsdom",
4+
};

‎pr-preview/pr-18/js/objects.js

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -128,29 +128,21 @@ export class InfoBox {
128128
}
129129

130130
isHere(mouseX, mouseY) {
131-
if (
131+
return (
132132
mouseX > this.x &&
133133
mouseX < this.x + this.width &&
134134
mouseY > this.y &&
135135
mouseY < this.y + this.height
136-
) {
137-
return true;
138-
}
139-
140-
return false;
136+
);
141137
}
142138

143139
isVisible(x, y, width, height) {
144-
if (
140+
return (
145141
x + width > this.x &&
146142
x < this.x + this.width &&
147143
y + height > this.y &&
148144
y < this.y + this.height
149-
) {
150-
return true;
151-
}
152-
153-
return false;
145+
);
154146
}
155147
}
156148

@@ -245,15 +237,11 @@ export class Link {
245237
console.log("boxHeight: ", this.boxHeight);
246238
*/
247239

248-
if (
240+
return (
249241
x + width > boxX &&
250242
x < boxX + boxWidth &&
251243
y + height > boxY &&
252244
y < boxY + boxHeight
253-
) {
254-
return true;
255-
}
256-
257-
return false;
245+
);
258246
}
259247
}

0 commit comments

Comments
 (0)