{"_id":"dom-mousemove-dispatcher","_rev":"4-87b603d89d53866b5b99be2af4cf96b2","name":"dom-mousemove-dispatcher","description":"Fire a mousemove on the DOM","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"dom-mousemove-dispatcher","version":"1.0.0","description":"Fire a mousemove on the DOM","main":"dist/bundle.js","jsnext:main":"dist/bundle.es.js","directories":{"test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"node ./rollit"},"author":{"name":"Quentin Engles","email":"hollowdoor99@gmail.com","url":"https://hollowdoor.github.io/"},"license":"MIT","keywords":["DOM","event","mouse"],"devDependencies":{"babel-preset-es2015-rollup":"^1.2.0","rollup-plugin-babel":"^2.6.1","rollup-plugin-commonjs":"^5.0.5","rollup-plugin-node-resolve":"^2.0.0","uglify-js":"^2.7.4"},"dependencies":{"object-keys":"^1.0.11"},"repository":{"type":"git","url":"git+https://github.com/hollowdoor/dom_mousemove_dispatcher.git"},"gitHead":"4e4b49d7c881e0551941743e9b17bdd3f8d10640","bugs":{"url":"https://github.com/hollowdoor/dom_mousemove_dispatcher/issues"},"homepage":"https://github.com/hollowdoor/dom_mousemove_dispatcher#readme","_id":"dom-mousemove-dispatcher@1.0.0","_shasum":"7012fa769d79fd246339b2a6a0874c2afb0998d1","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"hollowdoor","email":"hollowdoor99@gmail.com"},"dist":{"shasum":"7012fa769d79fd246339b2a6a0874c2afb0998d1","tarball":"https://registry.npmjs.org/dom-mousemove-dispatcher/-/dom-mousemove-dispatcher-1.0.0.tgz","integrity":"sha512-JtddqKarAcHgaZIeeSfajPwQ/l8GIoCUkFB8VkdqYBSVcIq1bDTseFL5GtJzKio+zETn7wZdBbaDnmIH2Mk/Mg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDy8G9dgImfMGmcHmX788/pb4ia4BVdAA1MKK8kTUbklgIgRfrUwo2Tuw8KDtBkiMrCAA87YJ5WA6y6DhbEuRh8NiE="}]},"maintainers":[{"name":"hollowdoor","email":"hollowdoor99@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dom-mousemove-dispatcher-1.0.0.tgz_1478741990412_0.47353636869229376"}},"1.0.1":{"name":"dom-mousemove-dispatcher","version":"1.0.1","description":"Fire a mousemove on the DOM","main":"dist/bundle.js","jsnext:main":"dist/bundle.es.js","directories":{"test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"node ./rollit"},"author":{"name":"Quentin Engles","email":"hollowdoor99@gmail.com","url":"https://hollowdoor.github.io/"},"license":"MIT","keywords":["DOM","event","mouse"],"devDependencies":{"babel-preset-es2015-rollup":"^1.2.0","rollup-plugin-babel":"^2.6.1","rollup-plugin-commonjs":"^5.0.5","rollup-plugin-node-resolve":"^2.0.0","uglify-js":"^2.7.4"},"dependencies":{},"repository":{"type":"git","url":"git+https://github.com/hollowdoor/dom_mousemove_dispatcher.git"},"gitHead":"66ccdf2c569e53949ebcd3a20a806f274e8a8def","bugs":{"url":"https://github.com/hollowdoor/dom_mousemove_dispatcher/issues"},"homepage":"https://github.com/hollowdoor/dom_mousemove_dispatcher#readme","_id":"dom-mousemove-dispatcher@1.0.1","_shasum":"a24a6ddf93b27bb3694f72087546a57fc7e9140f","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"hollowdoor","email":"hollowdoor99@gmail.com"},"dist":{"shasum":"a24a6ddf93b27bb3694f72087546a57fc7e9140f","tarball":"https://registry.npmjs.org/dom-mousemove-dispatcher/-/dom-mousemove-dispatcher-1.0.1.tgz","integrity":"sha512-NMdqqMbgW8kqOdmod2hkS+9hD/v7h4XoSvwU9qqe+wAA/O+ba0jhpbfW0Kb/fCyR0RX9jf4dwfQrl04LQX4FzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHBcFNq/RWDCTS0SlC4QfSgFalvaRcpnrKDBDiaAgBBQAiAijSz+6p0T05b5bUYqi/0mBI8X8ADPt63F3+0dtrIBEQ=="}]},"maintainers":[{"name":"hollowdoor","email":"hollowdoor99@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/dom-mousemove-dispatcher-1.0.1.tgz_1478742308862_0.9476174376904964"}}},"readme":"Install\n-------\n\n`npm install --save dom-mousemove-dispatcher`\n\nUse rollup, browserify, or some other compiler to use this library.\n\nExample\n-------\n\n```javascript\nimport mouseMoveDispatcher from 'dom-mousemove-dispatcher';\n\nconst dispatcher = mouseMoveDispatcher(window);\n\nlet div = document.querySelector('div')\n\ndiv.addEventListener('mousemove', (e)=>{\n    //This event might have been dispatched by the dispatcher.\n    console.log(\n        'mouse moving dispatched = ',e.dispatched,\n        ' event =', e,\n        ' data =', e.data\n    );\n});\n\ndiv.addEventListener('mousemove', (e)=>{\n    if(e.data === 'myEvent'){\n        //The event was dispatched from this listener.\n        //To prevent infinite recursion don't refire until the next turn in the event loop.\n        e.stopPropagation();\n        return;\n    }\n    //Re-dispatch this event.\n    dispatcher.dispatch(div, e, 'myEvent');\n});\n\n//Dispatch an event with a clientX property.\nsetTimeout(()=>dispatcher.dispatch(div, {clientX: 500}), 1000);\n\n```\n\nThe Event Object\n----------------\n\nThe event object you get from firing a mousemove with `dom-mousemove-dispatcher` has additional properties set on it. These are:\n\n-\tevent.dispatched = \"mousemove\"\n-\tevent.data = Your data\n\n### mouseMoveDispatcher(object) -> dispatcher\n\nCreate a `mousemove` dispatcher that uses `object` to set the default properties on move.\n\n`object` can be anything that can have `mousemove` set through it's `addEventListener` method (window, body, p, div, ...).\n\n### dispatcher.dispatch(element, eventProps, data|undefined) -> cancelled\n\nDispatch a `mousemove` event.\n\n`element` is the DOM element you wish to fire the mousemove on.\n\n`eventProps` are the properties you want to add to the event.\n\nThe optional `data` parameter is an arbitrary javascript value that will be set on a data property on the `mousemove` event object.\n\n### dispatcher.destroy() -> undefined\n\nCleanup the dispatcher object events, and properties.\n\nAbout\n-----\n\n`dom-mousemove-dispatcher` is a [ponyfill](https://ponyfoo.com/articles/polyfills-or-ponyfills) for `mousemove` event dispatch that is optimized for quick firing of `mousemove`.\n\nPlease report any bugs you find.\n","maintainers":[{"name":"hollowdoor","email":"hollowdoor99@gmail.com"}],"time":{"modified":"2022-06-15T21:16:05.455Z","created":"2016-11-10T01:39:52.510Z","1.0.0":"2016-11-10T01:39:52.510Z","1.0.1":"2016-11-10T01:45:09.382Z"},"homepage":"https://github.com/hollowdoor/dom_mousemove_dispatcher#readme","keywords":["DOM","event","mouse"],"repository":{"type":"git","url":"git+https://github.com/hollowdoor/dom_mousemove_dispatcher.git"},"author":{"name":"Quentin Engles","email":"hollowdoor99@gmail.com","url":"https://hollowdoor.github.io/"},"bugs":{"url":"https://github.com/hollowdoor/dom_mousemove_dispatcher/issues"},"license":"MIT","readmeFilename":"README.md"}