⬆️ bump prettier
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
"@types/jest": "26.0.20",
|
"@types/jest": "26.0.20",
|
||||||
"@types/node": "14.14.25",
|
"@types/node": "14.14.25",
|
||||||
"jest": "26.6.3",
|
"jest": "26.6.3",
|
||||||
"prettier": "2.2.1",
|
"prettier": "2.3.1",
|
||||||
"ts-jest": "26.5.0",
|
"ts-jest": "26.5.0",
|
||||||
"typescript": "4.1.3"
|
"typescript": "4.1.3"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,17 +21,16 @@ export const drawOptions = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const getPointedCell = (canvas: HTMLCanvasElement) => ({
|
const getPointedCell =
|
||||||
pageX,
|
(canvas: HTMLCanvasElement) =>
|
||||||
pageY,
|
({ pageX, pageY }: MouseEvent) => {
|
||||||
}: MouseEvent) => {
|
const { left, top } = canvas.getBoundingClientRect();
|
||||||
const { left, top } = canvas.getBoundingClientRect();
|
|
||||||
|
|
||||||
const x = Math.floor((pageX - left) / drawOptions.sizeCell) - 1;
|
const x = Math.floor((pageX - left) / drawOptions.sizeCell) - 1;
|
||||||
const y = Math.floor((pageY - top) / drawOptions.sizeCell) - 2;
|
const y = Math.floor((pageY - top) / drawOptions.sizeCell) - 2;
|
||||||
|
|
||||||
return { x, y };
|
return { x, y };
|
||||||
};
|
};
|
||||||
|
|
||||||
export const createCanvas = ({
|
export const createCanvas = ({
|
||||||
width,
|
width,
|
||||||
|
|||||||
@@ -5047,10 +5047,10 @@ prelude-ls@~1.1.2:
|
|||||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
||||||
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
|
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
|
||||||
|
|
||||||
prettier@2.2.1:
|
prettier@2.3.1:
|
||||||
version "2.2.1"
|
version "2.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6"
|
||||||
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
|
integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==
|
||||||
|
|
||||||
pretty-error@^2.1.1:
|
pretty-error@^2.1.1:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user