{"_id":"dom-plane","_rev":"5-68e133123f8899822494db324228dfc5","name":"dom-plane","description":"DOM and window coordinate helpers","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"dom-plane","version":"1.0.0","description":"DOM and window coordinate helpers","main":"dist/bundle.js","jsnext:main":"dist/bundle.es.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"node ./rollit"},"keywords":["DOM","coordinates"],"author":{"name":"Quentin Engles","email":"hollowdoor99@gmail.com"},"license":"MIT","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"},"dependencies":{"create-point-cb":"^1.0.0"},"gitHead":"78e0d2a4ebea997edce29e7b129e68124fc48b79","_id":"dom-plane@1.0.0","_shasum":"83d047ccd32ffd5e6d061aa9304d624faed7ce98","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"hollowdoor","email":"hollowdoor99@gmail.com"},"maintainers":[{"name":"hollowdoor","email":"hollowdoor99@gmail.com"}],"dist":{"shasum":"83d047ccd32ffd5e6d061aa9304d624faed7ce98","tarball":"https://registry.npmjs.org/dom-plane/-/dom-plane-1.0.0.tgz","integrity":"sha512-mVJD8G80t1COitOUPwz3sQCmRAauJDIui40U5lb9aL8wTNzCbzeDe2UhY1gOhUu2vgiWsaROwi9CWOjRE6oJaQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAC7fiyGITmY2Zka4cVzfzMyhwHtLl+Kk7QlQOTfEFuZAiAw/k2pXjQcBQk6S6bcF9sMh/N2bmO4uwcxIgPxEe5nAQ=="}]},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/dom-plane-1.0.0.tgz_1478229074738_0.3217087311204523"}},"1.0.1":{"name":"dom-plane","version":"1.0.1","description":"DOM and window coordinate helpers","main":"dist/bundle.js","jsnext:main":"dist/bundle.es.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"node ./rollit"},"keywords":["DOM","coordinates"],"author":{"name":"Quentin Engles","email":"hollowdoor99@gmail.com"},"license":"MIT","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"},"dependencies":{"create-point-cb":"^1.0.0"},"gitHead":"a456f9b234fec7f2c5af26700c4621d29ab53909","_id":"dom-plane@1.0.1","_shasum":"c193306e9230b46ae60f81402e8162f107d1b195","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"hollowdoor","email":"hollowdoor99@gmail.com"},"dist":{"shasum":"c193306e9230b46ae60f81402e8162f107d1b195","tarball":"https://registry.npmjs.org/dom-plane/-/dom-plane-1.0.1.tgz","integrity":"sha512-rmj9BXpP9pezqjj/yQqWq+q6UE3lqtSKQP/Nu4pFjq0sg+JuXRnsuTxPAepzzE/RHYJQw1D8A3yHR0wIwSPhyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+/cd1cfhwTnYSW1aI2zR/GcdfdBFb+AN+4PKlbYT8ZgIhAMVnsp97jQwXgmhrOwFstH9sOzjgzqJBuSyEkYuDDnGL"}]},"maintainers":[{"name":"hollowdoor","email":"hollowdoor99@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/dom-plane-1.0.1.tgz_1479180541890_0.1035592369735241"}},"1.0.2":{"name":"dom-plane","version":"1.0.2","description":"DOM and window coordinate helpers","main":"dist/bundle.js","jsnext:main":"dist/bundle.es.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"node ./rollit"},"keywords":["DOM","coordinates"],"author":{"name":"Quentin Engles","email":"hollowdoor99@gmail.com"},"license":"MIT","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"},"dependencies":{"create-point-cb":"^1.0.0"},"gitHead":"e1c810ca1e5308a7ceedc3d4b3404dac08ecfb88","_id":"dom-plane@1.0.2","_shasum":"f8c85e697c587f147e8fc2fac1de078c1fe4172c","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"hollowdoor","email":"hollowdoor99@gmail.com"},"dist":{"shasum":"f8c85e697c587f147e8fc2fac1de078c1fe4172c","tarball":"https://registry.npmjs.org/dom-plane/-/dom-plane-1.0.2.tgz","integrity":"sha512-/tR67G6ZGSciXoZLsD706yLxEXvX3mG/OWE8YNYj3A1yU/RAimtPXzklVTu5Y5xoeMoloA/Y+MaNjQm9apgAww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXNRjaGNQM8vf9PaM6pVRWwjnWrkeabm7R7FbhjgemrgIhAJCaGrUQRUgCJ3RAg87etcQiI2SYRaBDCDmnKyf3k49+"}]},"maintainers":[{"name":"hollowdoor","email":"hollowdoor99@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dom-plane-1.0.2.tgz_1479185115648_0.5938559465575963"}}},"readme":"Example\n-------\n\n```javascript\nimport {\n    createPointCB,\n    getClientRect,\n    pointInside\n} from 'dom-plane';\n\nconst point = {};\nconst pointCB = createPointCB(point);\n\nwindow.addEventListener('mousemove', pointCB);\nwindow.addEventListener('mousedown', (e)=>{\n    console.log('point is inside '+e.target, '=', pointInside(point, e.target))\n    console.log('current rect ', getClientRect(e.target))\n})\n```\n\nExported functions.\n\n-\tcreatePointCB(point)\n-\tgetClientRect(element)\n-\tpointInside(point, element)\n\n### createPointCB(point) -> pointCB\n\n`point` should be an object. Preferably an empty object.\n\n`createPointCB` returns a function that should be set as a listener on mouse, or touch events.\n\nEach time the event fires it on `pointCB` it will update `point`.\n\n#### point\n\n`point` will gain these properties:\n\n-\ttarget\n-\telement\n-\ttype\n-\tpageX\n-\tpageY\n-\tx\n-\ty\n\n### getClientRect(element|window) -> clientRect\n\nGet the boundingClientRect of the element, or window.\n\n### pointInside(point, element) -> Boolean\n\nCheck to see if the point is inside the element.\n","maintainers":[{"name":"hollowdoor","email":"hollowdoor99@gmail.com"}],"time":{"modified":"2022-06-15T21:18:32.171Z","created":"2016-11-04T03:11:15.305Z","1.0.0":"2016-11-04T03:11:15.305Z","1.0.1":"2016-11-15T03:29:02.395Z","1.0.2":"2016-11-15T04:45:17.597Z"},"keywords":["DOM","coordinates"],"author":{"name":"Quentin Engles","email":"hollowdoor99@gmail.com"},"license":"MIT","readmeFilename":"README.md"}