{"_id":"@codewell/get-canvas-mouse-position","_rev":"1-2b136e99d5a35d33e96c5c388b54af6f","name":"@codewell/get-canvas-mouse-position","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@codewell/get-canvas-mouse-position","version":"1.0.0","description":"Get the position of a mouse on a canvas triggered by an event","main":"src/index.js","directories":{"test":"tests"},"scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/codewell/get-canvas-mouse-position.git"},"keywords":[],"author":"","license":"MIT","bugs":{"url":"https://github.com/codewell/get-canvas-mouse-position/issues"},"homepage":"https://github.com/codewell/get-canvas-mouse-position#readme","devDependencies":{"jest":"^24.9.0"},"gitHead":"e8e94a002694f68ec30e43c6f13a70a7dbf963be","_id":"@codewell/get-canvas-mouse-position@1.0.0","_nodeVersion":"10.15.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-nK1WIk9F2EqdJ4R0Rj9LJCAHOXAzc3MIM2t31OSoq3ncI9oXu98LClEjFJ7j8rNleXmmq+JoXIQctHZ+fK1XKA==","shasum":"f9acee02430b014d393dd064e445ffdec0cf5077","tarball":"https://registry.npmjs.org/@codewell/get-canvas-mouse-position/-/get-canvas-mouse-position-1.0.0.tgz","fileCount":4,"unpackedSize":2665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdy9RlCRA9TVsSAnZWagAAQQUP/3NO+0UIJ8QsSc7q+BaX\nONjXLUt7qrdPfXEKjvASLRp79NW5bKRzONThmOHJf4Quox3I1NgcH86r67MS\ns7U+dQc9d6BNoMMum0oh9TrQTIUB6O8F4LqPrjZFbmoUzjKe288XCAwva5Vk\nSzpmVH7NWmfhWx64OHy8EEuq0octyae3GEI0lDzDjC1WOOrBSNlwv1UgKUdI\nTkaxpsr6t1p3ON2JgnL+9160icBx/UD952QhBluoB+I89bpdNszPrQPhmTVQ\ndn5utEUGDGnxfPKXxb+RGKVHiTAE03ni5tq5m7FVDwcQzTY17T4F+hY6Nzt6\nEB2ohMdZMQHKcnqLwiBxcDmf4J60g5HkNSnrili8DeHNa06HiyoDiQDuCsAK\n0RC2XogOk3xw1KMS1BJ+z1dK97CziZZuLGEfFUmqLeidMSQLMAAIfvPls1d7\ndWLI3LD7eLIDgQ5xEGtUvlfpDCzbkQzB9v1bWQ15dJ/hNEJUt+evaOyKRwMD\nUvLnU2Dbkpt9vnY60Sk1ly2jDVXGWCAAE6DodxOX+ryUs+JNcpV7t2LTd6iA\ndynGn29xQhfV3R+5bzVD9pNK5FmWmCEEcuupt8briP6yAFTWRBr0GjUGOmKJ\nku5zUCMawyTpv3nzFcOH0a99E2Xx4N3QVf1igplodb+dMOig2hPSvp+pSvyD\n+hoL\r\n=ChoD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBi+9w83ZXwmTNwqaYr6hD/fUi7Xi66uEFFm8tYz1fiyAiAm7RBQBFe9C9iejQSNG0+5CYObItbaSnRRsogIGtxBPg=="}]},"maintainers":[{"name":"fippli","email":"filip.johansson@protonmail.com"}],"_npmUser":{"name":"fippli","email":"filip.johansson@protonmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-canvas-mouse-position_1.0.0_1573639269466_0.7867607751740198"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-13T10:01:09.261Z","1.0.0":"2019-11-13T10:01:09.592Z","modified":"2022-04-05T00:07:40.311Z"},"maintainers":[{"name":"fippli","email":"filip.johansson@protonmail.com"}],"description":"Get the position of a mouse on a canvas triggered by an event","homepage":"https://github.com/codewell/get-canvas-mouse-position#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/codewell/get-canvas-mouse-position.git"},"bugs":{"url":"https://github.com/codewell/get-canvas-mouse-position/issues"},"license":"MIT","readme":"# @codewell/get-canvas-mouse-position\nGet the position of a mouse on a canvas triggered by an event.\n\n## Installation\n```\nnpm install @codewell/get-canvas-mouse-position\n```\n\n\n## Basic usage\n```JavaScript\nimport getCanvasMousePosition from '@codewell/get-canvas-mouse-position':\n\n\nconst handleClick = (event) => {\n  const mousePosition = getCanvasMousePosition(event);\n  const {x, y} = mousePosition; // The coordinate that was clicked on the canvas\n}\n\nreturn (\n  <canvas onClick={handleClick} />\n)\n\n```\n","readmeFilename":"README.md"}