All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gwt.material.design.client.resources.js.animation.min.js Maven / Gradle / Ivy

function showGrid(e,i){applyGridAnimation(e,i,!0)}function closeGrid(e,i){applyGridAnimation(e,i,!1)}function applyGridAnimation(e,i,t){var s=$(e),n=s.offset();s.each(function(){$(this).children().each(function(){var e=$(this).offset(),i=e.top-n.top,s=.5*e.left+i,a=parseFloat(s/900).toFixed(2);$(this).css("-webkit-transition-delay",a+"s").css("-o-transition-delay",a+"s").css("transition-delay",a+"s"),t?$(this).removeClass("closed").addClass("animated"):$(this).removeClass("animated").addClass("closed")})})}var swipeLeft=!1,swipeRight=!1;function initDismissableCollection(){$(".dismissable").each(function(){$(this).hammer({prevent_default:!1}).bind("pan",function(e){if("touch"===e.gesture.pointerType){var i=$(this),t=e.gesture.direction,s=e.gesture.deltaX,n=e.gesture.velocityX;i.velocity({translateX:s},{duration:50,queue:!1,easing:"easeOutQuad"}),4===t&&(s>i.innerWidth()/2||n<-.75)&&(swipeLeft=!0),2===t&&(s<-1*i.innerWidth()/2||n>.75)&&(swipeRight=!0)}}).bind("panend",function(e){if(Math.abs(e.gesture.deltaX)<$(this).innerWidth()/2&&(swipeRight=!1,swipeLeft=!1),"touch"===e.gesture.pointerType){var i,t=$(this);if(swipeLeft||swipeRight)i=swipeLeft?t.innerWidth():-1*t.innerWidth(),t.velocity({translateX:i},{duration:100,queue:!1,easing:"easeOutQuad",complete:function(){t.css("border","none"),t.velocity({height:0,padding:0},{duration:200,queue:!1,easing:"easeOutQuad",complete:function(){t.remove()}})}});else t.velocity({translateX:0},{duration:100,queue:!1,easing:"easeOutQuad"});swipeLeft=!1,swipeRight=!1}})})}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy