{"_id":"mouse-pos","_rev":"10-cdbe8a39d0901b3250614f70fe0075cd","name":"mouse-pos","description":"A simple and lightweight lib to get cross-browser mouse events","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"mouse-pos","version":"1.0.0","description":"A simple and lightweight lib to get cross-browser mouse events","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/greenify/mouse-pos"},"keywords":["mouse","browser","event","mousewheel","scroll","touch","events"],"author":{"name":"greenify","email":"greenify@notsharingmy.info","url":"https://github.com/greenify"},"license":"Apache 2","gitHead":"32367665f167df636ac29f73b5f645be270c0b6d","bugs":{"url":"https://github.com/greenify/mouse-pos/issues"},"homepage":"https://github.com/greenify/mouse-pos","_id":"mouse-pos@1.0.0","_shasum":"d13a4514cb2d2e4b597c0bc12d3867205b098067","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"greenify","email":"greeenify@gmail.com"},"maintainers":[{"name":"greenify","email":"greeenify@gmail.com"}],"dist":{"shasum":"d13a4514cb2d2e4b597c0bc12d3867205b098067","tarball":"https://registry.npmjs.org/mouse-pos/-/mouse-pos-1.0.0.tgz","integrity":"sha512-0T5haxqstGLnIMrCFoSeAQCpu1keMYn/XCwsrUQEvGNym1Q4Gs0UL8nt7/KODZZjyn8HHx00rMF4s1WiZ9wLpg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICXWv5e1xda+S7lHP625YTwXOPDBAYCVxh8GKhOd6141AiACPXbL+KsTrTrqUtzyQi6GhVDyHBplMSRibExfBiCztQ=="}]}},"1.0.1":{"name":"mouse-pos","version":"1.0.1","description":"A simple and lightweight lib to get cross-browser mouse events","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/greenify/mouse-pos"},"keywords":["mouse","browser","event","mousewheel","scroll","touch","events"],"author":{"name":"greenify","email":"greenify@notsharingmy.info","url":"https://github.com/greenify"},"license":"Apache 2","gitHead":"36b414ebb99479861a962210614ed24c8d5a117f","bugs":{"url":"https://github.com/greenify/mouse-pos/issues"},"homepage":"https://github.com/greenify/mouse-pos","_id":"mouse-pos@1.0.1","_shasum":"72683797c9a8eb73564f29c7104eb786910ffafa","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"greenify","email":"greeenify@gmail.com"},"maintainers":[{"name":"greenify","email":"greeenify@gmail.com"}],"dist":{"shasum":"72683797c9a8eb73564f29c7104eb786910ffafa","tarball":"https://registry.npmjs.org/mouse-pos/-/mouse-pos-1.0.1.tgz","integrity":"sha512-N9fKwmnRdrZH1YXD9ot6WDu5yXkQKVRvsiMB5QgrWLLf04jzE35KIgFlSzPi8ycMJhHu9jsuI6eESyyZWOgoYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHUz+VM5ign95BQOTY8ZaXNLuXGNdyimwieNHnTAUJHQIgfnLWYdBa+co5IxjeONkrFuLLT2Kbxtq+cI9cnn9Rb6E="}]}},"1.0.2":{"name":"mouse-pos","version":"1.0.2","description":"A simple and lightweight lib to get cross-browser mouse events","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/greenify/mouse-pos"},"keywords":["mouse","browser","event","mousewheel","scroll","touch","events"],"author":{"name":"greenify","email":"greenify@notsharingmy.info","url":"https://github.com/greenify"},"license":"Apache 2","gitHead":"2dc0e841c7cb24a330d53226914ef95750ba9c0d","bugs":{"url":"https://github.com/greenify/mouse-pos/issues"},"homepage":"https://github.com/greenify/mouse-pos","_id":"mouse-pos@1.0.2","_shasum":"c6b423634f17a13127953f07a9d33dc5e4f3c470","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"greenify","email":"greeenify@gmail.com"},"maintainers":[{"name":"greenify","email":"greeenify@gmail.com"}],"dist":{"shasum":"c6b423634f17a13127953f07a9d33dc5e4f3c470","tarball":"https://registry.npmjs.org/mouse-pos/-/mouse-pos-1.0.2.tgz","integrity":"sha512-A9qyT7X1cqTMGiVkV7FYDc78W8PVGEN691fQR6Ctjp25nTfHzPBwNTWicJtALlStpOfuT/OXqpuy6cqXQJmGRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICfTjitGLutbBtxTYSWgj8an0h8KCZvV7RgCWvyW7FFYAiBuZ+n5fuFAxqlQXAwnA2K9TBcmwf0AY3p83cKRkNm/rA=="}]}},"1.0.3":{"name":"mouse-pos","version":"1.0.3","description":"A simple and lightweight lib to get cross-browser mouse events","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/greenify/mouse-pos"},"keywords":["mouse","browser","event","mousewheel","scroll","touch","events"],"author":{"name":"greenify","email":"greenify@notsharingmy.info","url":"https://github.com/greenify"},"license":"Apache 2","gitHead":"2dc0e841c7cb24a330d53226914ef95750ba9c0d","bugs":{"url":"https://github.com/greenify/mouse-pos/issues"},"homepage":"https://github.com/greenify/mouse-pos","_id":"mouse-pos@1.0.3","_shasum":"74104ba90fe25036807f642d542e75948b2173d4","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"greenify","email":"greeenify@gmail.com"},"maintainers":[{"name":"greenify","email":"greeenify@gmail.com"}],"dist":{"shasum":"74104ba90fe25036807f642d542e75948b2173d4","tarball":"https://registry.npmjs.org/mouse-pos/-/mouse-pos-1.0.3.tgz","integrity":"sha512-mQSwJLEq2+agpU81sMwkqpeP2yd7Uo4JCOma/mia3aZo82QvA50wj7GrEj+o0QGyHwVrQ/uZPn+dTvXTE1douA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFRWQoh1Q9BqDwNdm/WR+ice06Re/SfJnC5X8VDCgquQIgGoZ31BSp96dR2CVm0ohuWWusDXzcAxnEO1ATEE4SKA0="}]}}},"readme":"mouse-pos\n==========\n\nA super simple cross-browser library to get the correct coordinates of your mouse event.\nJust pass the method the event obj and it will return the distance you need (as array).\n\n```\nnpm install mouse-pos\n```\n\nuse it like this\n\n```\nvar mouse = require(\"mouse-pos\");\nvar el = document.getElementById(\"outside\");\nel.addEventListener(\"click\", function(e){\nconsole.log(\"rel coords\", mouse.getRel(e)); // e.g. [5,5]\nconsole.log(\"abs coords\", mouse.getAbs(e)); // e.g. [205,205]\n});\n```\n\n#### rel(e) - relative to the target\n\n`[x,y]`\n\n#### abs(e) - absolute to the screen\n\n`[x,y]`\n\n#### wheelDelta(e)\n\n`float` of pixels the mouse wheel moved. Could be negative.\n\n\nEnjoy!\n","maintainers":[{"name":"greenify","email":"greeenify@gmail.com"}],"time":{"modified":"2022-06-20T10:21:21.516Z","created":"2014-09-26T20:52:03.193Z","1.0.0":"2014-09-26T20:52:03.193Z","1.0.1":"2014-09-26T20:56:09.656Z","1.0.2":"2014-09-26T21:01:07.877Z","1.0.3":"2015-02-21T02:19:54.290Z"},"homepage":"https://github.com/greenify/mouse-pos","keywords":["mouse","browser","event","mousewheel","scroll","touch","events"],"repository":{"type":"git","url":"git://github.com/greenify/mouse-pos"},"author":{"name":"greenify","email":"greenify@notsharingmy.info","url":"https://github.com/greenify"},"bugs":{"url":"https://github.com/greenify/mouse-pos/issues"},"license":"Apache 2","readmeFilename":"README.md"}