mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-02 10:08:39 +00:00
Tidy up JS
This commit is contained in:
parent
390edd7286
commit
28057ae057
1 changed files with 4 additions and 4 deletions
|
@ -42,10 +42,10 @@
|
||||||
const image = document.getElementById("game-image-@Model.PhotoId");
|
const image = document.getElementById("game-image-@Model.PhotoId");
|
||||||
|
|
||||||
hoverer.addEventListener('mouseenter', function () {
|
hoverer.addEventListener('mouseenter', function () {
|
||||||
canvas.className = "photo-subjects"
|
canvas.className = "photo-subjects";
|
||||||
});
|
});
|
||||||
hoverer.addEventListener('mouseleave', function () {
|
hoverer.addEventListener('mouseleave', function () {
|
||||||
canvas.className = "photo-subjects hide-subjects"
|
canvas.className = "photo-subjects hide-subjects";
|
||||||
});
|
});
|
||||||
|
|
||||||
var context = canvas.getContext('2d');
|
var context = canvas.getContext('2d');
|
||||||
|
@ -62,11 +62,11 @@
|
||||||
const hw = w / 2;
|
const hw = w / 2;
|
||||||
const hh = h / 2;
|
const hh = h / 2;
|
||||||
|
|
||||||
const colors = ["#a5599f", "#477f84", "#5fa559", "#a5595f"];
|
const colours = ["#a5599f", "#477f84", "#5fa559", "#a5595f"];
|
||||||
|
|
||||||
subjects.forEach((s, si) => {
|
subjects.forEach((s, si) => {
|
||||||
|
|
||||||
const colour = colors[si % 4]
|
const colour = colours[si % 4];
|
||||||
|
|
||||||
// Bounding box
|
// Bounding box
|
||||||
const bounds = s.bounds.split(",").map(parseFloat);
|
const bounds = s.bounds.split(",").map(parseFloat);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue