ux-datagrid-scrollBounce.min.js |
|
! ux-angularjs-datagrid v.1.4.11 (c) 2016, Obogo https://github.com/obogo/ux-angularjs-datagrid License: MIT. |
(function (exports, global) {
if (typeof define === "function" && define.amd) {
define(exports);
} else if (typeof module !== "undefined" && module.exports) {
module.exports = exports;
} else {
global.ux = exports;
}
!function(a,b){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&module.exports?module.exports=a:b.ux=a,angular.module("ux").factory("scrollBounce",function(){return["inst",function(b){function c(a){return o===!1?!1:""===o?a:o+a.charAt(0).toUpperCase()+a.substr(1)}function d(a,c){c?b.getContent().css(q,c+"ms ease-out"):b.getContent().css(q,""),b.getContent().css(p,"translate3d(0, "+-a+"px, 0)"),l=!0,clearTimeout(i),i=setTimeout(f,c||100)}function e(a,c){var e=2*Math.abs(b.values.speed);m=m||b.values.speed,j=b.values.scroll,d(2*m,e)}function f(){b.getContent().css(q,"250ms ease-in"),b.getContent().css(p,""),l=!1,m=0}function g(a,c,e,f){0>=c&&b.values.scroll<=0?(m+=.5*c,d(m)):c>=0&&b.values.scroll>=b.scrollModel.bottomOffset?(m+=.5*c,d(m)):l&&(m=0)}function h(a){m=b.values.speed}var i,j,k=a.logWrapper("scrollBounce",{},"red",b),l=!1,m=0,n=document.createElement("div").style,o=function(){for(var a,b=["t","webkitT","MozT","msT","OT"],c=0,d=b.length;d>c;c++)if(a=b[c]+"ransform",a in n)return b[c].substr(0,b[c].length-1);return!1}(),p=c("transform"),q=c("transition");b.unwatchers.push(b.scope.$on(a.datagrid.events.ON_SCROLL_TO_TOP,e)),b.unwatchers.push(b.scope.$on(a.datagrid.events.ON_SCROLL_TO_BOTTOM,e)),b.unwatchers.push(b.scope.$on(a.datagrid.events.ON_TOUCH_MOVE,g)),b.unwatchers.push(b.scope.$on(a.datagrid.events.ON_TOUCH_UP,h)),k.destroy=function(){clearTimeout(i),k=null},b.scrollBounce=k}]})}(this.ux=this.ux||{},function(){return this}());
|
¶ sourceMappingURL=ux-datagrid-scrollBounce.min.js.map |
}(this.ux = this.ux || {}, function() {return this;}()));
|