{"_id":"jquery.pep.js","_rev":"9-af2d6cbd8c7c6d068ffee8ae8cb95f5a","name":"jquery.pep.js","description":"Kinetic drag for mobile & desktop","dist-tags":{"latest":"0.6.10"},"versions":{"0.6.8":{"name":"jquery.pep.js","description":"Kinetic drag for mobile & desktop","version":"0.6.8","homepage":"http://pep.briangonzalez.org","author":{"name":"Brian Gonzalez","email":"me@briangonzalez.org","url":"briangonzalez.org"},"repository":{"type":"git","url":"git+ssh://git@github.com/briangonzalez/jquery.pep.js.git"},"bugs":{"url":"https://github.com/briangonzalez/jquery.pep.js/issues"},"licenses":[{"type":"MIT","url":"pep.briangonzalez.org/blob/master/LICENSE-MIT"}],"dependencies":{"jquery":"*"},"keywords":["drag","touch","mobile","kinetic","inertia"],"devDependencies":{"grunt-shell":"~0.3.0","shelljs":"~0.1.4","jquery":"~1.8.3","grunt-contrib-jshint":"~0.6.0","grunt-contrib-qunit":"~0.4.0"},"gitHead":"e69dc395620339e413fa007c2dcb3702d9ce3609","_id":"jquery.pep.js@0.6.8","scripts":{},"_shasum":"240bee859b731c5abcb099a16315b39d1a2364ca","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"dollarshaveclub-engineering","email":"engineering.services@dollarshaveclub.com"},"dist":{"shasum":"240bee859b731c5abcb099a16315b39d1a2364ca","tarball":"https://registry.npmjs.org/jquery.pep.js/-/jquery.pep.js-0.6.8.tgz","integrity":"sha512-kLQQOmpK5MlhlF/dKkWtuFak97i8WNn9RlrfSBdJVXQiK8F74EeiB7gKq3x+xun2+/4Mm5xJRSlMOPLH5kqj8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrTfDjq7PwBBbjiAcaRmepxNLVTdiD50Zl/V+p4SrDywIhAOBrDRJHa6/xkrEdJJiZHtbbTw4PC5iO9zlIoI09RtRw"}]},"maintainers":[{"name":"dollarshaveclub-engineering","email":"engineering.services@dollarshaveclub.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/jquery.pep.js-0.6.8.tgz_1493093013840_0.5011318414472044"}},"0.6.9":{"name":"jquery.pep.js","description":"Kinetic drag for mobile & desktop","version":"0.6.9","homepage":"http://pep.briangonzalez.org","author":{"name":"Brian Gonzalez","email":"me@briangonzalez.org","url":"briangonzalez.org"},"repository":{"type":"git","url":"git+ssh://git@github.com/briangonzalez/jquery.pep.js.git"},"bugs":{"url":"https://github.com/briangonzalez/jquery.pep.js/issues"},"licenses":[{"type":"MIT","url":"pep.briangonzalez.org/blob/master/LICENSE-MIT"}],"dependencies":{"jquery":"*"},"keywords":["drag","touch","mobile","kinetic","inertia"],"devDependencies":{"grunt-shell":"~0.3.0","shelljs":"~0.1.4","jquery":"~1.8.3","grunt-contrib-jshint":"~0.6.0","grunt-contrib-qunit":"~0.4.0"},"gitHead":"bf3fb00a8f822b68dc143306158818a27fbb6039","_id":"jquery.pep.js@0.6.9","scripts":{},"_shasum":"6ef77d0430984f3b3e1f02063e13a162df429c32","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"dollarshaveclub-engineering","email":"engineering.services@dollarshaveclub.com"},"dist":{"shasum":"6ef77d0430984f3b3e1f02063e13a162df429c32","tarball":"https://registry.npmjs.org/jquery.pep.js/-/jquery.pep.js-0.6.9.tgz","integrity":"sha512-qd2pnoc0VU4egGXjZXgsSsGkbkUzaTkcFg2/n1a2AdAPrHMHCG/KLjqQskkF5wPGDTYJHAcNMJK7AHT7ptQYEw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDO6xWaQofHOpzv1Now4NJfqFg17AZqWvfwuf14lQ7osAiARD39vKAejTiFOSWFdesweY/fzDJ+vShvsNyQyRTuEHA=="}]},"maintainers":[{"name":"dollarshaveclub-engineering","email":"engineering.services@dollarshaveclub.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jquery.pep.js-0.6.9.tgz_1493093528764_0.09650767571292818"}},"0.6.10":{"name":"jquery.pep.js","description":"Kinetic drag for mobile & desktop","version":"0.6.10","homepage":"http://pep.briangonzalez.org","author":{"name":"Brian Gonzalez","email":"me@briangonzalez.org","url":"briangonzalez.org"},"repository":{"type":"git","url":"git+ssh://git@github.com/briangonzalez/jquery.pep.js.git"},"bugs":{"url":"https://github.com/briangonzalez/jquery.pep.js/issues"},"licenses":[{"type":"MIT","url":"pep.briangonzalez.org/blob/master/LICENSE-MIT"}],"dependencies":{"jquery":"*"},"keywords":["drag","touch","mobile","kinetic","inertia"],"devDependencies":{"grunt-shell":"~0.3.0","shelljs":"~0.1.4","jquery":"~1.8.3","grunt-contrib-jshint":"~0.6.0","grunt-contrib-qunit":"~0.4.0"},"gitHead":"bf3fb00a8f822b68dc143306158818a27fbb6039","_id":"jquery.pep.js@0.6.10","scripts":{},"_shasum":"e611878654a7621a59d3601aca0a932f9620bf08","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"briangonzalez","email":"me@briangonzalez.org"},"dist":{"shasum":"e611878654a7621a59d3601aca0a932f9620bf08","tarball":"https://registry.npmjs.org/jquery.pep.js/-/jquery.pep.js-0.6.10.tgz","integrity":"sha512-OenoYfHQYvWK//0z1wQ6WAkrUeM+lGlKuhev/PQFurHmY8ZwJw8nOFzP7zu2iwV2wo9EDTa8zMoQzkT45Q6//g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHjE7Q/v2XPGg9yElN6knJ+BA/PgCiVhcdumLS9dtp7AIget+vlNfahUCZfvDqLmUzWhaS0yNCO28E4wUL0GsWNfM="}]},"maintainers":[{"name":"briangonzalez","email":"me@briangonzalez.org"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/jquery.pep.js-0.6.10.tgz_1493094052606_0.536380235105753"}}},"readme":"<img src=\"http://s.cdpn.io/4629/pep-with-circles.svg\" width=600 alt='jquery.pep.js'>\n\n> Kinetic drag for mobile & desktop.\n\nDemos and more at [http://pep.briangonzalez.org](http://pep.briangonzalez.org).\n\n## Installation\n\n### NPM (recommended)\n\n```sh\nnpm install jquery.pep.js --save\n```\n\n### Bower\n\n```sh\nbower install jquery.pep\n````\n\n## Getting Started\nGetting started is simple: include jQuery, include pep, then:\n```javascript\n$('.pep').pep(); // yup, that simple.\n```\n\n## Usage\nPep has many options. Here they are in their entirety, with their defaults. Need a little help? [Just ask](http://twitter.com/brianmgonzalez).\n\n| Name                            | Default                                         | Description                                                                                                                                                                                                                                             |\n|---------------------------------|-------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| initiate                        | `function(){}`                                  | [≘ touchstart/mousedown] called when first touch / click event is triggered on the object                                                                                                                                                               |\n| start                           | `function(){}`                                  | called when dragging starts; when `dx` or `dy` are greater than `startThreshold[0]` or `startThreshold[1]`                                                                                                                                              |\n| drag                            | `function(){}`                                  | [≘ touchmove/mousemove] called continuously while the object is dragging                                                                                                                                                                                |\n| stop                            | `function(){}`                                  | [≘ touchend/mouseup] called when dragging stops                                                                                                                                                                                                         |\n| easing                          | `function(){}`                                  | called while object is easing                                                                                                                                                                                                                           |\n| rest                            | `function(){}`                                  | called after dragging stops, and object has come to rest                                                                                                                                                                                                |\n| moveTo                          | `false`                                         | custom method to override the default moveTo functionality.                                                                                                                                                                                             |\n| callIfNotStarted                | `['stop', 'rest']`                              | if object has *not* moved outside of the `startThreshold`, call either the user-provided `stop` or `rest` fxn's anyway, or call both                                                                                                                    |\n| startThreshold                  | `[0,0]`                                         | how far past should the object move in the [x,y] direction before user 'start' function is called                                                                                                                                                       |\n| grid                            | `[0,0]`                                         | define an [x,y] grid for the object to move along                                                                                                                                                                                                       |\n| revert                          | `false`                                         | revert back to initial position                                                                                                                                                                                                                         |\n| revertAfter                     | `stop`                                          | revert after given event - `'stop'` or `'ease'`                                                                                                                                                                                                         |\n| revertIf                        | `function(){ return true; }`                    | return `false` / `true` from this function to conditionally revert an object                                                                                                                                                                            |\n| droppable                       | `false`                                         | CSS selector that this element can be dropped on, false to disable                                                                                                                                                                                      |\n| droppableActiveClass            | `'pep-dpa'`                                     | class to add to active droppable parents, default to pep-dpa (droppable parent active); inspect `this.activeDropRegions` within each function for valuable info                                                                                         |\n| overlapFunction                 | `false`                                         | override pep's default overlap function; takes two args: a & b and returns true if they overlap                                                                                                                                                         |\n| cssEaseString                   | *cubic-bezier(0.190, 1.000, 0.220, 1.000)*      | get more css ease params from [ http://matthewlein.com/ceaser/ ]                                                                                                                                                                                        |\n| cssEaseDuration                 | `750`                                           | how long should it take (in ms) for the object to get from stop to rest?                                                                                                                                                                                |\n| constrainTo                     | `false`                                         | constrain object to `'window'` or `'parent'` or `[top, right, bottom, left]`; works best w/ useCSSTranslation set to false                                                                                                                              |\n| axis                            | `null`                                          | constrain object to either 'x' or 'y' axis                                                                                                                                                                                                              |\n| debug                           | `false `                                        | show debug values and events in the lower-righthand corner of page                                                                                                                                                                                      |\n| activeClass                     | `'pep-active'`                                  | class to add to the pep element while dragging                                                                                                                                                                                                          |\n| multiplier                      | `1`                                             | +/- this number to modify to 1:1 ratio of finger/mouse movement to el movement                                                                                                                                                                          |\n| velocityMultiplier              | `1.9`                                           | +/- this number to modify the springiness of the object as your release it                                                                                                                                                                              |\n| shouldPreventDefault            | `true`                                          | in some cases, we don't want to prevent the default mousedown/touchstart on our Pep object, your call                                                                                                                                                   |\n| allowDragEventPropagation       | `true`                                          | set to false to stop drag events from bubbling up through the DOM tree                                                                                                                                                                                  |\n| stopEvents                      | `''`                                            | space delimited set of events which programmatically cause the object to stop                                                                                                                                                                           |\n| hardwareAccelerate              | `true`                                          | apply the CSS3 silver bullet method to accelerate the pep object: http://indiegamr.com/ios6-html-hardware-acceleration-changes-and-how-to-fix-them/                                                                                                     |\n| useCSSTranslation               | `true`                                          | use CSS transform translations as opposed to top/left                                                                                                                                                                                                   |\n| disableSelect                   | `true`                                          | apply `user-select: none` (CSS) to the object                                                                                                                                                                                                           |\n| removeMargins                   | `true`                                          | remove margins for better object placement                                                                                                                                                                                                              |\n| shouldEase                      | `true`                                          | disable/enable easing                                                                                                                                                                                                                                   |\n| place                           | `true`                                          | bypass pep's object placement logic                                                                                                                                                                                                                     |\n| deferPlacement                  | `false`                                         | defer object placement until start event occurs                                                                                                                                                                                                         |\n| forceNonCSS3Movement            | `false`                                         | DO NOT USE: this is subject to come/go. Use at your own risk                                                                                                                                                                                            |\n| elementsWithInteraction         | `'input'`                                       | valid CSS/jQuery selector for elements within the Pep object that should allow user interaction, and thus propagate to allow movement                                                                                                                   |\n| ignoreRightClick                | `true`                                          | start event will be ignored if triggered by a right click                                                                                                                                                                                               |\n| startPos                        | `{ left: null, top: null }`                     | set the default left/top coordinate to position the object with on load                                                                                                                                                                                 |\n| useBoundingClientRect           | `false`                                         | use [getBoundingClientRect()](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect) to retrieve element dimensions instead of jQuery's .outerWidth() & .outerHeight() (useful when your element is scaled via CSS transforms) |\n\n\n\n## API\n```javascript\n// Toggle functionality of all Pep objects on the page\n$.pep.toggleAll()\n\n// Explicitly disable all Pep objects on the page\n$.pep.toggleAll(false)\n\n// Explicitly enable all Pep objects on the page\n$.pep.toggleAll(true)\n\n// Unbind Pep completely from the object\nvar $pep = $('.pep');\n$pep.pep();               // bind\n$.pep.unbind( $pep );     // unbind\n$pep.pep();               // bind\n````\n\n## Class applications\nThe following classes are applied corresponding to events that are happening on the pep object:\n\n  - `pep-active` -- applied when initiate event is triggered; removed when ease has finished\n  - `pep-start` -- applied when start event is triggered; removed when stop event occurs\n  - `pep-ease` -- applied when stop event is triggered; removed when ease has finished\n\n\n## A note on `droppable` option\nThere is a convenience object within the context of each function pep makes available (drag, rest, ease, etc.) called `activeDropRegions`, which is an array of jQuery objects that the pep object is currently \"over\".\n\n### Example:\n\n```js\n$('.pep').pep({\n  droppable:   '.drop-target',\n  drag: function(ev, obj){\n    console.log('There are ' + this.activeDropRegions.length + 'active drop regions.')\n  },\n  revert: true,\n  revertIf: function(ev, obj){\n    return !this.activeDropRegions.length;\n  }\n})\n```\n\n## Author\n| ![twitter/brianmgonzalez](http://gravatar.com/avatar/f6363fe1d9aadb1c3f07ba7867f0e854?s=70](http://twitter.com/brianmgonzalez \"Follow @brianmgonzalez on Twitter\") |\n|---|\n| [Brian Gonzalez](http://briangonzalez.org) |\n\n## Support\n\nPep includes at least partial support for most browsers, dating back to IE6.\n\n## License\n\nPep is licensed under the [MIT License](http://www.tldrlegal.com/license/mit-license)\n","maintainers":[{"email":"colinjameswood@gmail.com","name":"anaphase"},{"email":"seanjcodes+npm@gmail.com","name":"seancodes"},{"email":"me@briangonzalez.org","name":"briangonzalez"}],"time":{"modified":"2022-06-19T05:22:37.236Z","created":"2017-04-25T04:03:35.894Z","0.6.8":"2017-04-25T04:03:35.894Z","0.6.9":"2017-04-25T04:12:08.988Z","0.6.10":"2017-04-25T04:20:54.505Z"},"homepage":"http://pep.briangonzalez.org","keywords":["drag","touch","mobile","kinetic","inertia"],"repository":{"type":"git","url":"git+ssh://git@github.com/briangonzalez/jquery.pep.js.git"},"author":{"name":"Brian Gonzalez","email":"me@briangonzalez.org","url":"briangonzalez.org"},"bugs":{"url":"https://github.com/briangonzalez/jquery.pep.js/issues"},"readmeFilename":"README.md"}