hand-detection/assets/scripts/cells-by-row.min.js

2 lines
830 B
JavaScript

!function(e){"use strict";function n(e){var n=e.create("cellsByRow");return n.prototype._resetLayout=function(){this.itemIndex=0,this.getColumnWidth(),this.getRowHeight(),this.cols=Math.floor(this.isotope.size.innerWidth/this.columnWidth),this.cols=Math.max(this.cols,1)},n.prototype._getItemLayoutPosition=function(e){e.getSize();var n=this.itemIndex%this.cols,t=Math.floor(this.itemIndex/this.cols),o=(n+.5)*this.columnWidth-e.size.outerWidth/2,s=(t+.5)*this.rowHeight-e.size.outerHeight/2;return this.itemIndex++,{x:o,y:s}},n.prototype._getContainerSize=function(){return{height:Math.ceil(this.itemIndex/this.cols)*this.rowHeight}},n}"function"==typeof define&&define.amd?define(["isotope/js/layout-mode"],n):"object"==typeof exports?module.exports=n(require("isotope-layout/js/layout-mode")):n(e.Isotope.LayoutMode)}(window);