{"_id":"@brecert/pan-zoom","_rev":"3-00f8d9dc57ee37726ba87fed82061634","name":"@brecert/pan-zoom","dist-tags":{"latest":"3.5.2"},"versions":{"3.5.0":{"name":"@brecert/pan-zoom","description":"Pan and zoom events for any element","version":"3.5.0","license":"MIT","pika":true,"sideEffects":false,"keywords":["pan","zoom","pinch","touch","canvas","webgl"],"homepage":"https://github.com/brecert/pan-zoom#readme","bugs":{"url":"https://github.com/brecert/pan-zoom/issues"},"repository":{"type":"git","url":"git+https://github.com/brecert/pan-zoom.git"},"dependencies":{"has-passive-events":"^1.0.0","impetus":"^0.8.3","mouse-wheel":"^1.2.0","raf":"^3.4.0","touch-pinch":"^1.0.1","touch-position":"^2.0.0"},"devDependencies":{"@pika/plugin-build-node":"^0.4.0","@pika/plugin-build-web":"^0.4.0","@pika/plugin-ts-standard-pkg":"^0.4.0","budo":"^11.6.3","eslint":"^3.8.1","regl":"^1.3.1","regl-scatter2d":"^3.0.0","typescript":"^3.5.3"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","module":"dist-web/index.js","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2017 Dmitry Ivanov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@brecert/pan-zoom@3.5.0","dist":{"shasum":"aa21281b40cd66ffbb7cf9bd4fb6e372bcac79f5","integrity":"sha512-wgdRg4/+P5EOk5LnZMCc7ItpRoIcxXmkBanBTTbSTLGqxrvEQA4bort7rCYmtQe1T14elQtS+giUM6m/Pssfww==","tarball":"https://registry.npmjs.org/@brecert/pan-zoom/-/pan-zoom-3.5.0.tgz","fileCount":12,"unpackedSize":15987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRKWuCRA9TVsSAnZWagAA52QQAJ6/ps+WrJtXr30L7MBo\nOqiCG0pXmB0FdsTjq1qGA0A685AnKH5Nu3MZCfuaVWp0CpplJgSoK+EY4Jdb\nUJpnWO8Ov4zLiNhmtb97B6mJDbOAAEQcNFULqHblqUwGZk0hAA1WQuExYMWC\nCNDzjnKlHDhouF/9ajyGD0KpfoJknTRBcMIdPIypaoNe7LVgDAzb6tOkDHXo\nTOqaXysQa8G4o9APRuQ07oyyGNIcWXeUOtsAbbNu0Q9XIxIQjlJDyq+zky9j\n59fUxdCH2gJw3BSJ3S8SGe8LoE/ZHgpDKjldkX8zmbuFUTOf08huzfJ3En6H\ni2yQmKAH9siq/Kwub6uwzZUJhZ2zXtDtdentHzEptS2dA7LY/F4Wcl08o0DK\nqCtYs1NTdCjy9nJbiRwu7CjbLVSL2Z0pL63mKCFOa8BnpTfkyP9tdnho9o4v\nq33DrI7IqwIU/xlkjya7eUYmiUKTFAIsrTNNNZ6YToYS4q3ESo3tP8jcAoYW\ne43wlL5EFScrkZLzxWzK11sw+SYyvAK+/Fb8jWo7Ke/yLGc9zHxC0On8adi2\nkKEY0L9l8X2yWSIo0DVH1BQ+o7naVX+1Ccvg5PPNx4hBxa0qBL9sfsfwUX6v\nisiGE9F4Z+gTLPSaOCfHGPjUYnr99Hpg9UAyvZN429OTeLyRxMr5J71mAOlN\n+d28\r\n=LxtN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPU8IFR9Z9Dgd9l05VTPt2HiaJbiRT1pCRLa97O5NeQQIhAOnDS56kzoNDRcnboiYHaaIfJj1qZnamREtJB/28Pcml"}]},"maintainers":[{"name":"brecert","email":"spambrecert@gmail.com"}],"_npmUser":{"name":"brecert","email":"spambrecert@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pan-zoom_3.5.0_1564779949600_0.9332142155395815"},"_hasShrinkwrap":false},"3.5.1":{"name":"@brecert/pan-zoom","description":"Pan and zoom events for any element","version":"3.5.1","license":"MIT","pika":true,"sideEffects":false,"keywords":["pan","zoom","pinch","touch","canvas","webgl"],"homepage":"https://github.com/brecert/pan-zoom#readme","bugs":{"url":"https://github.com/brecert/pan-zoom/issues"},"repository":{"type":"git","url":"git+https://github.com/brecert/pan-zoom.git"},"dependencies":{"has-passive-events":"^1.0.0","impetus":"^0.8.3","mouse-wheel":"^1.2.0","raf":"^3.4.0","touch-pinch":"^1.0.1","touch-position":"^2.0.0"},"devDependencies":{"@pika/plugin-build-node":"^0.4.0","@pika/plugin-build-web":"^0.4.0","@pika/plugin-ts-standard-pkg":"^0.4.0","budo":"^11.6.3","eslint":"^3.8.1","regl":"^1.3.1","regl-scatter2d":"^3.0.0","typescript":"^3.5.3"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","module":"dist-web/index.js","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2017 Dmitry Ivanov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@brecert/pan-zoom@3.5.1","dist":{"shasum":"0ad78abe2113489d9eccbb42194a5b3ba248c921","integrity":"sha512-ZEtVQ7/RLLN/Rnu5vgbd+voTQllS7qWsWQXtep63kwfei0MryuEDRVY6JleX4VzFUk+pXugxk+hdZh40rqKqGQ==","tarball":"https://registry.npmjs.org/@brecert/pan-zoom/-/pan-zoom-3.5.1.tgz","fileCount":12,"unpackedSize":15987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRKYOCRA9TVsSAnZWagAAw0sP/ApkkwJxuto+EulVXUm/\na5MDu4LXmOvpEK82t8Q/9Y2FfMQ4Ihge4uhzmTinWP+JXzyk0tGaLbfknr4g\n+1e0JdUixgDRgJWjbBNuFVKc68HMk1Pgym6TxihGTKxqGrEvZAZyKapIbINK\ndqLWxxWuQpwLZQOTUWQXFOU/kXXAbnqY5d+kQNtgVLK7JI2yVwT/RpX79ESl\nrIeJFeP5nLhILrAiAN00cTHenW50ptgGpGSvAeJYgIgtjkJoDbAwoCrJFMes\na30+cu/gH8pD3JnbiUim/Lh/NHEvlZnBTd0Nkxr1sSy32tle8UUbwnY9o24z\njBoxUWIAndH3kX8b2ogxfhxJzckkjUUtcacJJ5McgBbMEuDm29OY/V1jCC7B\nGCwfzXfAT7rAdpeDCxXH9X3QkwzNdEJ9fRe0JebzdMJZ8M76eOUAoMIG9Yxl\nhKQWFNPJbKphjkAzhuLfKdveSVXxdELkGhuzCedvCPn/+jkIBeTn/wUSGBi7\nh+F8BnV1xDPe9+JF1GWJlzw0Bpfc0NE0eNQlsAa1poonKyuwBAggFQ3Dp5Sc\ndrGfZ5lJ14UwhShIO7dzSzToQ00vZQtNAasT731w1oXterb1d948Fn3BHhkg\nPcZ9TSJz+/GcDsqYE3GnK2B+4UNcxLhFWFnq/cfkX4PlnBA3afsxZMZjEMaf\noQCf\r\n=YhVg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDppTaYH4zlWMo7i4v1ljCmBOBFAiWt9RuaRBoYfr1EQIhAI6vQZsrSWVxosCVWbTRdZKIogi/7Mc02BcXvYkSrlWI"}]},"maintainers":[{"name":"brecert","email":"spambrecert@gmail.com"}],"_npmUser":{"name":"brecert","email":"spambrecert@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pan-zoom_3.5.1_1564780045472_0.04751858683294263"},"_hasShrinkwrap":false},"3.5.2":{"name":"@brecert/pan-zoom","description":"Pan and zoom events for any element","version":"3.5.2","license":"MIT","pika":true,"sideEffects":false,"keywords":["pan","zoom","pinch","touch","canvas","webgl"],"homepage":"https://github.com/brecert/pan-zoom#readme","bugs":{"url":"https://github.com/brecert/pan-zoom/issues"},"repository":{"type":"git","url":"git+https://github.com/brecert/pan-zoom.git"},"dependencies":{"has-passive-events":"^1.0.0","impetus":"^0.8.3","mouse-wheel":"^1.2.0","raf":"^3.4.0","touch-pinch":"^1.0.1","touch-position":"^2.0.0"},"devDependencies":{"@pika/plugin-build-node":"^0.4.0","@pika/plugin-build-umd":"^0.5.1","@pika/plugin-build-web":"^0.4.0","@pika/plugin-bundle-web":"^0.5.1","@pika/plugin-ts-standard-pkg":"^0.4.0","budo":"^11.6.3","eslint":"^3.8.1","regl":"^1.3.1","regl-scatter2d":"^3.0.0","typescript":"^3.5.3"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","umd:main":"dist-umd/index.js","module":"dist-web/index.js","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2017 Dmitry Ivanov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@brecert/pan-zoom@3.5.2","dist":{"shasum":"eb8be1a8bdefec4cf2df5020d3a2838c441b75a5","integrity":"sha512-jJRT5mfBzXqMGIlse7P56qjze6stE7oEnncXCSQ1WK0GogIUmpvm3ogBv2WgehsZaQ93ob39XsHHCPLTdvr3Fg==","tarball":"https://registry.npmjs.org/@brecert/pan-zoom/-/pan-zoom-3.5.2.tgz","fileCount":15,"unpackedSize":31111,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRKx0CRA9TVsSAnZWagAAQoQP/RcjF5+BizMX8igCkED/\nWTMYcUV62Gn1XcCXXewdexnw+A7YI+NOp0Gy2wqFD6BvoxO5Aj6guPHYvpKv\nziUhIuShHE3SYVarztLV+11/jjvEVrIuV9zJNqtMKFHfXx+gcHTEaERgWxvX\nROzLZkRuhcz2nItdmDQZtw5MRPyupj8FokxRIY/JFHbGsJLeApCcW2EVg2XV\nJ9g3xjXgTN/GyxwE11xKZ7LLINePfT+WM1UvuV9AIsZvtX1kC7yBIwUPAVu8\n9qxlF5a8BUa7o2UPZLEtAU4KcXgwrSmu3IRnL+q74PMF4/Torp6BXCwl5U+q\nARQ95unYJYSPM+JubdqdYzCY0uiGBV9J4ne1pF4w0NncnDqHakv4D5CW0gjf\nWYICZaTKtNCh3F78bK08GhlKWcl/Vw7mtlzN+an4byS3LENemaP1Ejx3CTtN\nZkuY2IzTtlPxLBfYof0RrULnu+LrV3FTx67dXnAfHiQcUdyZYIc+kt71dmaT\n65qLR0U7EUwY20DXGy5l8LfMOC86/t/rZObhytOrMyQoqu9O430el2ma44LS\nDrBO3XBgfwLJ3i4DnasZLAvAq6LB3lbeXnAEINY4C9H31TyxlCqLkA1MGXV3\nSOQ8ylBMgBQwUyPU1tqXoeMxMc62jDiflHxUb7L6EEYWmTi9xnC4UT8u0VYA\n6DYd\r\n=EaS5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhYphvKLPUsROGQBjkiQgMpAdpWaHEPIaRzqCIRGujGwIge6RbE61+7HlhRr7fEwLulFOfmc2COSbAys1nOPArT7w="}]},"maintainers":[{"name":"brecert","email":"spambrecert@gmail.com"}],"_npmUser":{"name":"brecert","email":"spambrecert@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pan-zoom_3.5.2_1564781683484_0.004809625547089746"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-02T21:05:49.333Z","3.5.0":"2019-08-02T21:05:49.830Z","modified":"2022-04-04T20:30:17.124Z","3.5.1":"2019-08-02T21:07:25.607Z","3.5.2":"2019-08-02T21:34:43.813Z"},"maintainers":[{"name":"brecert","email":"spambrecert@gmail.com"}],"description":"Pan and zoom events for any element","homepage":"https://github.com/brecert/pan-zoom#readme","keywords":["pan","zoom","pinch","touch","canvas","webgl"],"repository":{"type":"git","url":"git+https://github.com/brecert/pan-zoom.git"},"bugs":{"url":"https://github.com/brecert/pan-zoom/issues"},"license":"MIT","readme":"# pan-zoom\n\nPanning and zooming events for any target. May come handy for webgl, canvas, svg, images or pure html manipulations. Handles mobile pinch-zoom, drag and scroll interactions, provides inertial movement.\n\nSee [demo](https://dy.github.io/plot-grid).\n\n[![npm install pan-zoom](https://nodei.co/npm/pan-zoom.png?mini=true)](https://npmjs.org/package/pan-zoom/)\n\n```js\nconst panzoom = require('pan-zoom');\n\nlet unpanzoom = panzoom(document.body, e => {\n  // e contains all the params related to the interaction\n\n  // pan deltas\n  e.dx;\n  e.dy;\n\n  // zoom delta\n  e.dz;\n\n  // coordinates of the center\n  e.x;\n  e.y;\n\n  // type of interaction: mouse, touch, keyboard\n  e.type;\n\n  // target event is applied to\n  e.target;\n\n  // initial coordinates of interaction\n  e.x0;\n  e.y0;\n});\n\n// call to remove panzoom handler from the target\nunpanzoom()\n```\n\nSee [`test.js`](https://github.com/dy/pan-zoom/blob/master/test.js) for basic use-case.\n\n\n## Credits\n\nThis package puts together high-quality tiny components, so acknowledgment to their authors:\n\n* [impetus](http://npmjs.org/package/impetus) by **[Chris Bateman @chrisbateman](https://github.com/chrisbateman)** handles inertial drag.\n* [mouse-wheel](https://github.com/mikolalysenko/mouse-wheel) by **[Mikola Lysenko @mikolalysenko](https://github.com/mikolalysenko/mouse-wheel)** covers cross-browser wheel event.</del>\n* [touch-pinch](https://www.npmjs.com/package/touch-pinch) by **[Matt DesLauriers @mattdesl](https://github.com/mattdesl)** handles mobile pinch gestures.\n* [touch-position](https://www.npmjs.com/package/touch-position) by **[Matt DesLauriers @mattdesl](https://github.com/mattdesl)** tracks mouse and touch coordinates.\n\n## License\n\n© 2017 Dmitry Yv. MIT License\n","readmeFilename":"README.md"}