diff --git a/README.md b/README.md
index 93ae364..6553c9a 100644
--- a/README.md
+++ b/README.md
@@ -24,9 +24,9 @@ Install with [Bower](http://bower.io): `bower install draggabilly`
Link directly to Draggabilly files on [npmcdn.com](https://npmcdn.com).
``` html
-
+
-
+
```
## Usage
diff --git a/bower.json b/bower.json
index 4b74afe..510bc06 100644
--- a/bower.json
+++ b/bower.json
@@ -1,10 +1,10 @@
{
"name": "draggabilly",
"main": "draggabilly.js",
- "version": "2.0.0",
+ "version": "2.0.1",
"description": "make that shiz draggable",
"dependencies": {
- "get-size": "~2.0.1",
+ "get-size": "~2.0.2",
"unidragger": "~2.0.0"
},
"devDependencies": {
diff --git a/dist/draggabilly.pkgd.js b/dist/draggabilly.pkgd.js
index 28c46ec..c3258d8 100644
--- a/dist/draggabilly.pkgd.js
+++ b/dist/draggabilly.pkgd.js
@@ -1,5 +1,5 @@
/*!
- * Draggabilly PACKAGED v2.0.0
+ * Draggabilly PACKAGED v2.0.1
* Make that shiz draggable
* http://draggabilly.desandro.com
* MIT license
@@ -151,7 +151,7 @@ return jQueryBridget;
}));
/*!
- * getSize v2.0.1
+ * getSize v2.0.2
* measure size of elements
* MIT license
*/
@@ -164,7 +164,9 @@ return jQueryBridget;
if ( typeof define == 'function' && define.amd ) {
// AMD
- define( factory() );
+ define( 'get-size/get-size',[],function() {
+ return factory();
+ });
} else if ( typeof module == 'object' && module.exports ) {
// CommonJS
module.exports = factory();
@@ -358,8 +360,6 @@ return getSize;
});
-define("get-size/get-size", function(){});
-
/*!
* EventEmitter v4.2.11 - git.io/ee
* Unlicense - http://unlicense.org/
@@ -1426,7 +1426,7 @@ return Unidragger;
}));
/*!
- * Draggabilly v2.0.0
+ * Draggabilly v2.0.1
* Make that shiz draggable
* http://draggabilly.desandro.com
* MIT license
diff --git a/dist/draggabilly.pkgd.min.js b/dist/draggabilly.pkgd.min.js
index e5f5f05..1651206 100644
--- a/dist/draggabilly.pkgd.min.js
+++ b/dist/draggabilly.pkgd.min.js
@@ -1,8 +1,8 @@
/*!
- * Draggabilly PACKAGED v2.0.0
+ * Draggabilly PACKAGED v2.0.1
* Make that shiz draggable
* http://draggabilly.desandro.com
* MIT license
*/
-!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(n){e(t,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){function n(n,r,a){function h(t,e,i){var o,r="$()."+n+'("'+e+'")';return t.each(function(t,h){var d=a.data(h,n);if(!d)return void s(n+" not initialized. Cannot call methods, i.e. "+r);var u=d[e];if(!u||"_"==e.charAt(0))return void s(r+" is not a valid method");var c=u.apply(d,i);o=void 0===o?c:o}),void 0!==o?o:t}function d(t,e){t.each(function(t,i){var o=a.data(i,n);o?(o.option(e),o._init()):(o=new r(i,e),a.data(i,n,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[n]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return d(this,t),this},i(a))}function i(t){!t||t&&t.bridget||(t.bridget=n)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return i(e||t.jQuery),n}),function(t,e){"function"==typeof define&&define.amd?define(e()):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){function t(t){var e=parseFloat(t),n=-1==t.indexOf("%")&&!isNaN(e);return n&&e}function e(){}function n(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;d>e;e++){var n=h[e];t[n]=0}return t}function i(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!u){u=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(e);var o=i(e);r.isBoxSizeOuter=s=200==t(o.width),n.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=i(e);if("none"==r.display)return n();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var u=a.isBorderBox="border-box"==r.boxSizing,c=0;d>c;c++){var f=h[c],p=r[f],l=parseFloat(p);a[f]=isNaN(l)?0:l}var g=a.paddingLeft+a.paddingRight,v=a.paddingTop+a.paddingBottom,m=a.marginLeft+a.marginRight,y=a.marginTop+a.marginBottom,E=a.borderLeftWidth+a.borderRightWidth,b=a.borderTopWidth+a.borderBottomWidth,P=u&&s,_=t(r.width);_!==!1&&(a.width=_+(P?0:g+E));var x=t(r.height);return x!==!1&&(a.height=x+(P?0:v+b)),a.innerWidth=a.width-(g+E),a.innerHeight=a.height-(v+b),a.outerWidth=a.width+m,a.outerHeight=a.height+y,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],d=h.length,u=!1;return r}),define("get-size/get-size",function(){}),function(){function t(){}function e(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function n(t){return function(){return this[t].apply(this,arguments)}}var i=t.prototype,o=this,r=o.EventEmitter;i.getListeners=function(t){var e,n,i=this._getEvents();if(t instanceof RegExp){e={};for(n in i)i.hasOwnProperty(n)&&t.test(n)&&(e[n]=i[n])}else e=i[t]||(i[t]=[]);return e},i.flattenListeners=function(t){var e,n=[];for(e=0;e3||Math.abs(t.y)>3},o.pointerUp=function(t,e){this.emitEvent("pointerUp",[t,e]),this._dragPointerUp(t,e)},o._dragPointerUp=function(t,e){this.isDragging?this._dragEnd(t,e):this._staticClick(t,e)},o._dragStart=function(t,n){this.isDragging=!0,this.dragStartPoint=e.getPointerPoint(n),this.isPreventingClicks=!0,this.dragStart(t,n)},o.dragStart=function(t,e){this.emitEvent("dragStart",[t,e])},o._dragMove=function(t,e,n){this.isDragging&&this.dragMove(t,e,n)},o.dragMove=function(t,e,n){t.preventDefault(),this.emitEvent("dragMove",[t,e,n])},o._dragEnd=function(t,e){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(t,e)},o.dragEnd=function(t,e){this.emitEvent("dragEnd",[t,e])},o.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},o._staticClick=function(t,e){if(!this.isIgnoringMouseUp||"mouseup"!=t.type){var n=t.target.nodeName;("INPUT"==n||"TEXTAREA"==n)&&t.target.focus(),this.staticClick(t,e),"mouseup"!=t.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400))}},o.staticClick=function(t,e){this.emitEvent("staticClick",[t,e])},i.getPointerPoint=e.getPointerPoint,i}),function(t,e){"function"==typeof define&&define.amd?define(["get-size/get-size","unidragger/unidragger"],function(n,i){return e(t,n,i)}):"object"==typeof exports?module.exports=e(t,require("get-size"),require("unidragger")):t.Draggabilly=e(t,t.getSize,t.Unidragger)}(window,function(t,e,n){function i(){}function o(t,e){for(var n in e)t[n]=e[n];return t}function r(t){return t instanceof HTMLElement}function s(t,e){this.element="string"==typeof t?h.querySelector(t):t,f&&(this.$element=f(this.element)),this.options=o({},this.constructor.defaults),this.option(e),this._create()}function a(t,e,n){return n=n||"round",e?Math[n](t/e)*e:t}var h=t.document,d=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame,u=0;d||(d=function(t){var e=(new Date).getTime(),n=Math.max(0,16-(e-u)),i=setTimeout(function(){t(e+n)},n);return u=e+n,i});var c=function(){var t=h.documentElement.style;return"string"==typeof t.transform?"transform":"WebkitTransform"}(),f=t.jQuery,p=s.prototype=Object.create(n.prototype);return s.defaults={},p.option=function(t){o(this.options,t)},p._create=function(){this.position={},this._getPosition(),this.startPoint={x:0,y:0},this.dragPoint={x:0,y:0},this.startPosition=o({},this.position);var t=getComputedStyle(this.element);"relative"!=t.position&&"absolute"!=t.position&&(this.element.style.position="relative"),this.enable(),this.setHandles()},p.setHandles=function(){this.handles=this.options.handle?this.element.querySelectorAll(this.options.handle):[this.element],this.bindHandles()},p.dispatchEvent=function(e,n,i){var o=[n].concat(i);this.emitEvent(e,o);var r=t.jQuery;if(r&&this.$element)if(n){var s=r.Event(n);s.type=e,this.$element.trigger(s,i)}else this.$element.trigger(e,i)},p._getPosition=function(){var t=getComputedStyle(this.element),e=parseInt(t.left,10),n=parseInt(t.top,10);this.position.x=isNaN(e)?0:e,this.position.y=isNaN(n)?0:n,this._addTransformPosition(t)},p._addTransformPosition=function(t){var e=t[c];if(0===e.indexOf("matrix")){var n=e.split(","),i=0===e.indexOf("matrix3d")?12:4,o=parseInt(n[i],10),r=parseInt(n[i+1],10);this.position.x+=o,this.position.y+=r}},p.pointerDown=function(t,e){this._dragPointerDown(t,e);var n=h.activeElement;n&&n.blur&&n!=h.body&&n.blur(),this._bindPostStartEvents(t),this.element.classList.add("is-pointer-down"),this.dispatchEvent("pointerDown",t,[e])},p.pointerMove=function(t,e){var n=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,n]),this._dragMove(t,e,n)},p.dragStart=function(t,e){this.isEnabled&&(this._getPosition(),this.measureContainment(),this.startPosition.x=this.position.x,this.startPosition.y=this.position.y,this.setLeftTop(),this.dragPoint.x=0,this.dragPoint.y=0,this.element.classList.add("is-dragging"),this.dispatchEvent("dragStart",t,[e]),this.animate())},p.measureContainment=function(){var t=this.options.containment;if(t){var n=r(t)?t:"string"==typeof t?h.querySelector(t):this.element.parentNode,i=e(this.element),o=e(n),s=this.element.getBoundingClientRect(),a=n.getBoundingClientRect(),d=o.borderLeftWidth+o.borderRightWidth,u=o.borderTopWidth+o.borderBottomWidth,c=this.relativeStartPosition={x:s.left-(a.left+o.borderLeftWidth),y:s.top-(a.top+o.borderTopWidth)};this.containSize={width:o.width-d-c.x-i.width,height:o.height-u-c.y-i.height}}},p.dragMove=function(t,e,n){if(this.isEnabled){var i=n.x,o=n.y,r=this.options.grid,s=r&&r[0],h=r&&r[1];i=a(i,s),o=a(o,h),i=this.containDrag("x",i,s),o=this.containDrag("y",o,h),i="y"==this.options.axis?0:i,o="x"==this.options.axis?0:o,this.position.x=this.startPosition.x+i,this.position.y=this.startPosition.y+o,this.dragPoint.x=i,this.dragPoint.y=o,this.dispatchEvent("dragMove",t,[e,n])}},p.containDrag=function(t,e,n){if(!this.options.containment)return e;var i="x"==t?"width":"height",o=this.relativeStartPosition[t],r=a(-o,n,"ceil"),s=this.containSize[i];return s=a(s,n,"floor"),Math.min(s,Math.max(r,e))},p.pointerUp=function(t,e){this.element.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},p.dragEnd=function(t,e){this.isEnabled&&(c&&(this.element.style[c]="",this.setLeftTop()),this.element.classList.remove("is-dragging"),this.dispatchEvent("dragEnd",t,[e]))},p.animate=function(){if(this.isDragging){this.positionDrag();var t=this;d(function(){t.animate()})}},p.setLeftTop=function(){this.element.style.left=this.position.x+"px",this.element.style.top=this.position.y+"px"},p.positionDrag=function(){this.element.style[c]="translate3d( "+this.dragPoint.x+"px, "+this.dragPoint.y+"px, 0)"},p.staticClick=function(t,e){this.dispatchEvent("staticClick",t,[e])},p.enable=function(){this.isEnabled=!0},p.disable=function(){this.isEnabled=!1,this.isDragging&&this.dragEnd()},p.destroy=function(){this.disable(),this.element.style[c]="",this.element.style.left="",this.element.style.top="",this.element.style.position="",this.unbindHandles(),this.$element&&this.$element.removeData("draggabilly")},p._init=i,f&&f.bridget&&f.bridget("draggabilly",s),s});
\ No newline at end of file
+!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(n){e(t,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){function n(n,r,a){function h(t,e,i){var o,r="$()."+n+'("'+e+'")';return t.each(function(t,h){var d=a.data(h,n);if(!d)return void s(n+" not initialized. Cannot call methods, i.e. "+r);var u=d[e];if(!u||"_"==e.charAt(0))return void s(r+" is not a valid method");var c=u.apply(d,i);o=void 0===o?c:o}),void 0!==o?o:t}function d(t,e){t.each(function(t,i){var o=a.data(i,n);o?(o.option(e),o._init()):(o=new r(i,e),a.data(i,n,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[n]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return d(this,t),this},i(a))}function i(t){!t||t&&t.bridget||(t.bridget=n)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return i(e||t.jQuery),n}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){function t(t){var e=parseFloat(t),n=-1==t.indexOf("%")&&!isNaN(e);return n&&e}function e(){}function n(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;d>e;e++){var n=h[e];t[n]=0}return t}function i(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!u){u=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(e);var o=i(e);r.isBoxSizeOuter=s=200==t(o.width),n.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=i(e);if("none"==r.display)return n();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var u=a.isBorderBox="border-box"==r.boxSizing,c=0;d>c;c++){var f=h[c],p=r[f],l=parseFloat(p);a[f]=isNaN(l)?0:l}var g=a.paddingLeft+a.paddingRight,v=a.paddingTop+a.paddingBottom,m=a.marginLeft+a.marginRight,y=a.marginTop+a.marginBottom,E=a.borderLeftWidth+a.borderRightWidth,b=a.borderTopWidth+a.borderBottomWidth,P=u&&s,_=t(r.width);_!==!1&&(a.width=_+(P?0:g+E));var x=t(r.height);return x!==!1&&(a.height=x+(P?0:v+b)),a.innerWidth=a.width-(g+E),a.innerHeight=a.height-(v+b),a.outerWidth=a.width+m,a.outerHeight=a.height+y,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],d=h.length,u=!1;return r}),function(){function t(){}function e(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function n(t){return function(){return this[t].apply(this,arguments)}}var i=t.prototype,o=this,r=o.EventEmitter;i.getListeners=function(t){var e,n,i=this._getEvents();if(t instanceof RegExp){e={};for(n in i)i.hasOwnProperty(n)&&t.test(n)&&(e[n]=i[n])}else e=i[t]||(i[t]=[]);return e},i.flattenListeners=function(t){var e,n=[];for(e=0;e3||Math.abs(t.y)>3},o.pointerUp=function(t,e){this.emitEvent("pointerUp",[t,e]),this._dragPointerUp(t,e)},o._dragPointerUp=function(t,e){this.isDragging?this._dragEnd(t,e):this._staticClick(t,e)},o._dragStart=function(t,n){this.isDragging=!0,this.dragStartPoint=e.getPointerPoint(n),this.isPreventingClicks=!0,this.dragStart(t,n)},o.dragStart=function(t,e){this.emitEvent("dragStart",[t,e])},o._dragMove=function(t,e,n){this.isDragging&&this.dragMove(t,e,n)},o.dragMove=function(t,e,n){t.preventDefault(),this.emitEvent("dragMove",[t,e,n])},o._dragEnd=function(t,e){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(t,e)},o.dragEnd=function(t,e){this.emitEvent("dragEnd",[t,e])},o.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},o._staticClick=function(t,e){if(!this.isIgnoringMouseUp||"mouseup"!=t.type){var n=t.target.nodeName;("INPUT"==n||"TEXTAREA"==n)&&t.target.focus(),this.staticClick(t,e),"mouseup"!=t.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400))}},o.staticClick=function(t,e){this.emitEvent("staticClick",[t,e])},i.getPointerPoint=e.getPointerPoint,i}),function(t,e){"function"==typeof define&&define.amd?define(["get-size/get-size","unidragger/unidragger"],function(n,i){return e(t,n,i)}):"object"==typeof exports?module.exports=e(t,require("get-size"),require("unidragger")):t.Draggabilly=e(t,t.getSize,t.Unidragger)}(window,function(t,e,n){function i(){}function o(t,e){for(var n in e)t[n]=e[n];return t}function r(t){return t instanceof HTMLElement}function s(t,e){this.element="string"==typeof t?h.querySelector(t):t,f&&(this.$element=f(this.element)),this.options=o({},this.constructor.defaults),this.option(e),this._create()}function a(t,e,n){return n=n||"round",e?Math[n](t/e)*e:t}var h=t.document,d=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame,u=0;d||(d=function(t){var e=(new Date).getTime(),n=Math.max(0,16-(e-u)),i=setTimeout(function(){t(e+n)},n);return u=e+n,i});var c=function(){var t=h.documentElement.style;return"string"==typeof t.transform?"transform":"WebkitTransform"}(),f=t.jQuery,p=s.prototype=Object.create(n.prototype);return s.defaults={},p.option=function(t){o(this.options,t)},p._create=function(){this.position={},this._getPosition(),this.startPoint={x:0,y:0},this.dragPoint={x:0,y:0},this.startPosition=o({},this.position);var t=getComputedStyle(this.element);"relative"!=t.position&&"absolute"!=t.position&&(this.element.style.position="relative"),this.enable(),this.setHandles()},p.setHandles=function(){this.handles=this.options.handle?this.element.querySelectorAll(this.options.handle):[this.element],this.bindHandles()},p.dispatchEvent=function(e,n,i){var o=[n].concat(i);this.emitEvent(e,o);var r=t.jQuery;if(r&&this.$element)if(n){var s=r.Event(n);s.type=e,this.$element.trigger(s,i)}else this.$element.trigger(e,i)},p._getPosition=function(){var t=getComputedStyle(this.element),e=parseInt(t.left,10),n=parseInt(t.top,10);this.position.x=isNaN(e)?0:e,this.position.y=isNaN(n)?0:n,this._addTransformPosition(t)},p._addTransformPosition=function(t){var e=t[c];if(0===e.indexOf("matrix")){var n=e.split(","),i=0===e.indexOf("matrix3d")?12:4,o=parseInt(n[i],10),r=parseInt(n[i+1],10);this.position.x+=o,this.position.y+=r}},p.pointerDown=function(t,e){this._dragPointerDown(t,e);var n=h.activeElement;n&&n.blur&&n!=h.body&&n.blur(),this._bindPostStartEvents(t),this.element.classList.add("is-pointer-down"),this.dispatchEvent("pointerDown",t,[e])},p.pointerMove=function(t,e){var n=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,n]),this._dragMove(t,e,n)},p.dragStart=function(t,e){this.isEnabled&&(this._getPosition(),this.measureContainment(),this.startPosition.x=this.position.x,this.startPosition.y=this.position.y,this.setLeftTop(),this.dragPoint.x=0,this.dragPoint.y=0,this.element.classList.add("is-dragging"),this.dispatchEvent("dragStart",t,[e]),this.animate())},p.measureContainment=function(){var t=this.options.containment;if(t){var n=r(t)?t:"string"==typeof t?h.querySelector(t):this.element.parentNode,i=e(this.element),o=e(n),s=this.element.getBoundingClientRect(),a=n.getBoundingClientRect(),d=o.borderLeftWidth+o.borderRightWidth,u=o.borderTopWidth+o.borderBottomWidth,c=this.relativeStartPosition={x:s.left-(a.left+o.borderLeftWidth),y:s.top-(a.top+o.borderTopWidth)};this.containSize={width:o.width-d-c.x-i.width,height:o.height-u-c.y-i.height}}},p.dragMove=function(t,e,n){if(this.isEnabled){var i=n.x,o=n.y,r=this.options.grid,s=r&&r[0],h=r&&r[1];i=a(i,s),o=a(o,h),i=this.containDrag("x",i,s),o=this.containDrag("y",o,h),i="y"==this.options.axis?0:i,o="x"==this.options.axis?0:o,this.position.x=this.startPosition.x+i,this.position.y=this.startPosition.y+o,this.dragPoint.x=i,this.dragPoint.y=o,this.dispatchEvent("dragMove",t,[e,n])}},p.containDrag=function(t,e,n){if(!this.options.containment)return e;var i="x"==t?"width":"height",o=this.relativeStartPosition[t],r=a(-o,n,"ceil"),s=this.containSize[i];return s=a(s,n,"floor"),Math.min(s,Math.max(r,e))},p.pointerUp=function(t,e){this.element.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},p.dragEnd=function(t,e){this.isEnabled&&(c&&(this.element.style[c]="",this.setLeftTop()),this.element.classList.remove("is-dragging"),this.dispatchEvent("dragEnd",t,[e]))},p.animate=function(){if(this.isDragging){this.positionDrag();var t=this;d(function(){t.animate()})}},p.setLeftTop=function(){this.element.style.left=this.position.x+"px",this.element.style.top=this.position.y+"px"},p.positionDrag=function(){this.element.style[c]="translate3d( "+this.dragPoint.x+"px, "+this.dragPoint.y+"px, 0)"},p.staticClick=function(t,e){this.dispatchEvent("staticClick",t,[e])},p.enable=function(){this.isEnabled=!0},p.disable=function(){this.isEnabled=!1,this.isDragging&&this.dragEnd()},p.destroy=function(){this.disable(),this.element.style[c]="",this.element.style.left="",this.element.style.top="",this.element.style.position="",this.unbindHandles(),this.$element&&this.$element.removeData("draggabilly")},p._init=i,f&&f.bridget&&f.bridget("draggabilly",s),s});
\ No newline at end of file
diff --git a/draggabilly.js b/draggabilly.js
index 9071291..17e1632 100644
--- a/draggabilly.js
+++ b/draggabilly.js
@@ -1,5 +1,5 @@
/*!
- * Draggabilly v2.0.0
+ * Draggabilly v2.0.1
* Make that shiz draggable
* http://draggabilly.desandro.com
* MIT license
diff --git a/package.json b/package.json
index 16147ab..13350b6 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,10 @@
{
"name": "draggabilly",
- "version": "2.0.0",
+ "version": "2.0.1",
"description": "make that shiz draggable",
"main": "draggabilly.js",
"dependencies": {
- "get-size": "~2.0.1",
+ "get-size": "~2.0.2",
"unidragger": "~2.0.0"
},
"devDependencies": {