{"name":"drag-tracker","version":"0.4.2","description":"A simple library for dragging things around. Tracks dragging with touch or mouse.","main":"dist/drag-tracker.js","module":"src/drag-tracker.js","files":["src/","dist/"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Sphinxxxx/drag-tracker.git"},"author":{"name":"Andreas Borgen"},"license":"MIT","bugs":{"url":"https://github.com/Sphinxxxx/drag-tracker/issues"},"homepage":"https://github.com/Sphinxxxx/drag-tracker#readme","devDependencies":{"babel-core":"^6.26.0","babel-preset-env":"^1.6.1","babel-register":"^6.26.0","gulp":"^4.0.0","gulp-file":"^0.4.0","gulp-header":"^2.0.1","gulp-rename":"^1.2.2","gulp-strip-comments":"^2.5.2","gulp-uglify":"^3.0.0","rollup":"^0.56.2","rollup-plugin-babel":"^3.0.3"},"gitHead":"d51c658a034e9e48dd7a60a999eb8571b945e2d7","_id":"drag-tracker@0.4.2","_shasum":"433fee58abe360a4636a2d7fcda408da6587cc07","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"sphinxxxx","email":"coding@enthuses.me"},"dist":{"shasum":"433fee58abe360a4636a2d7fcda408da6587cc07","tarball":"http://registry-npm.ywwl.com/drag-tracker/download/drag-tracker-0.4.2.tgz","fileCount":6,"unpackedSize":17667,"integrity":"sha512-oY/W3q2NfNZzLHHQOiTEEkTx/Mc1IF7nwZd8rT3SwpqKUmBDBKkTbT++YFovYeCB3bYSxUSb+eRDymZNESftEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICXL52a/+7QFzXWtECOmyHmOP2Qrx+Oq0gHPYiq9v9nJAiEA2ul26q6eq7jeUkqxSWERwDsbtHXcxYNkroYy0r/VeuU="}],"size":5138,"noattachment":false,"key":"/drag-tracker/-/drag-tracker-0.4.2.tgz"},"maintainers":[{"name":"sphinxxxx","email":"coding@enthuses.me"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/drag-tracker_0.4.2_1519438467724_0.6845905475952074"},"_hasShrinkwrap":false,"readme":"# drag-tracker\n\nA simple library for dragging things around. Tracks dragging with touch or mouse (left button).\n\n## Demo\n\nhttps://rawgit.com/Sphinxxxx/drag-tracker/master/demo/index.html  \nhttps://codepen.io/Sphinxxxx/pen/KXedQe\n\n## Usage\n\n    dragTracker({\n      container:          /* The element the user can drag within */,\n      selector:           /* CSS selector for elements inside the container that are draggable, or a single HTML element */,\n      \n      callback:           /* Your code which decides what happens during a drag operation */,\n      callbackDragStart:  /* Optional callback when a drag operation is about to start */,\n      callbackDragEnd:    /* Optional callback when a drag operation has ended */,\n      callbackClick:      /* Optional callback when a draggable element is only clicked, not dragged */,\n      propagateEvents:    /* Whether to let mouse/touch events propagate (bubble) after being handled. Usually not wanted in case multiple handlers track the same container */,\n      \n      roundCoords:  true  /* Whether callback coordinates should be integers */,\n      dragOutside:  true  /* Whether the draggable elements can be dragged outside the bounds of the container */,\n\n      /* Whether callback coordinates should be adjusted to suit the dragged element instead of the actual mouse position */\n      handleOffset: true (default)  /* Coordinates are the element's center for SVG `<circle>`s and `<ellipse>`s, and the top-left corner for all other elements */,\n                    'center'        /* Coordinates are always the element's center */\n                    'topleft'       /* Coordinates are always the element's top-left corner */\n                    false           /* No adjustment, just use the mouse position */\n    });\n\nAll options are optional. Without a `callback`, the coordinates are written to `console.log`.\n","publish_time":1519438467832,"_cnpm_publish_time":1519438467832,"dist-tags":{"latest":"1.0.0"}}