Skip to content

Commit 3514c71

Browse files
committed
Fix formatting
1 parent 62385e7 commit 3514c71

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

js/canvas-utils.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ const LINE_WIDTH = 5;
2020
* @returns {number[]} - Inverted color in r, g,b order.
2121
*/
2222
function invertColor(r, g, b, a) {
23-
const rgb = [r, g, b, a]
23+
const rgb = [r, g, b, a];
2424
for (var i = 0; i < rgb.length; i++) rgb[i] = (i === 3 ? 1 : 255) - rgb[i];
25-
return rgb
25+
return rgb;
2626
}
2727

2828
/**
@@ -41,7 +41,7 @@ function getPixelRGBAColor(x, y) {
4141
return COLOR.BLACK;
4242
}
4343

44-
const pixel = canvasCtx.getImageData(x, y, GAP, GAP)
44+
const pixel = canvasCtx.getImageData(x, y, GAP, GAP);
4545
const [r, g, b, a] = invertColor(...pixel.data);
4646

4747
return `rgb(${r}, ${g}, ${b}, ${Math.abs(a)})`;

js/ui-utils.mjs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
/**
22
* Is cursor located on UI panel?
3-
*
4-
* @param {number} x - Cursor x coordinate.
5-
* @param {number} y - Cursor y coordinate.
6-
* @param {DOMRect} rect - Panel bounds.
7-
*
8-
* @returns {boolean} - Is cursor located on UI panel?
9-
*/
3+
*
4+
* @param {number} x - Cursor x coordinate.
5+
* @param {number} y - Cursor y coordinate.
6+
* @param {DOMRect} rect - Panel bounds.
7+
*
8+
* @returns {boolean} - Is cursor located on UI panel?
9+
*/
1010
export function isCursorWithinPanelBounds(x, y, rect) {
1111
return x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;
1212
}
13-

0 commit comments

Comments
 (0)