|
|
@ -1,11 +1,11 @@ |
|
|
|
/*! |
|
|
|
/*! |
|
|
|
* Isotope PACKAGED v3.0.5 |
|
|
|
* Isotope PACKAGED v3.0.6 |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed GPLv3 for open source use |
|
|
|
* Licensed GPLv3 for open source use |
|
|
|
* or Isotope Commercial License for commercial use |
|
|
|
* or Isotope Commercial License for commercial use |
|
|
|
* |
|
|
|
* |
|
|
|
* https://isotope.metafizzy.co
|
|
|
|
* https://isotope.metafizzy.co
|
|
|
|
* Copyright 2017 Metafizzy |
|
|
|
* Copyright 2010-2018 Metafizzy |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -266,22 +266,19 @@ return EvEmitter; |
|
|
|
})); |
|
|
|
})); |
|
|
|
|
|
|
|
|
|
|
|
/*! |
|
|
|
/*! |
|
|
|
* getSize v2.0.2 |
|
|
|
* getSize v2.0.3 |
|
|
|
* measure size of elements |
|
|
|
* measure size of elements |
|
|
|
* MIT license |
|
|
|
* MIT license |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
/* jshint browser: true, strict: true, undef: true, unused: true */ |
|
|
|
/* jshint browser: true, strict: true, undef: true, unused: true */ |
|
|
|
/*global define: false, module: false, console: false */ |
|
|
|
/* globals console: false */ |
|
|
|
|
|
|
|
|
|
|
|
( function( window, factory ) { |
|
|
|
( function( window, factory ) { |
|
|
|
'use strict'; |
|
|
|
/* jshint strict: false */ /* globals define, module */ |
|
|
|
|
|
|
|
|
|
|
|
if ( typeof define == 'function' && define.amd ) { |
|
|
|
if ( typeof define == 'function' && define.amd ) { |
|
|
|
// AMD
|
|
|
|
// AMD
|
|
|
|
define( 'get-size/get-size',[],function() { |
|
|
|
define( 'get-size/get-size',factory ); |
|
|
|
return factory(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else if ( typeof module == 'object' && module.exports ) { |
|
|
|
} else if ( typeof module == 'object' && module.exports ) { |
|
|
|
// CommonJS
|
|
|
|
// CommonJS
|
|
|
|
module.exports = factory(); |
|
|
|
module.exports = factory(); |
|
|
@ -356,7 +353,7 @@ function getStyle( elem ) { |
|
|
|
if ( !style ) { |
|
|
|
if ( !style ) { |
|
|
|
logError( 'Style returned ' + style + |
|
|
|
logError( 'Style returned ' + style + |
|
|
|
'. Are you running this code in a hidden iframe on Firefox? ' + |
|
|
|
'. Are you running this code in a hidden iframe on Firefox? ' + |
|
|
|
'See http://bit.ly/getsizebug1' ); |
|
|
|
'See https://bit.ly/getsizebug1' ); |
|
|
|
} |
|
|
|
} |
|
|
|
return style; |
|
|
|
return style; |
|
|
|
} |
|
|
|
} |
|
|
@ -382,8 +379,8 @@ function setup() { |
|
|
|
// -------------------------- box sizing -------------------------- //
|
|
|
|
// -------------------------- box sizing -------------------------- //
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* WebKit measures the outer-width on style.width on border-box elems |
|
|
|
* Chrome & Safari measure the outer-width on style.width on border-box elems |
|
|
|
* IE & Firefox<29 measures the inner-width |
|
|
|
* IE11 & Firefox<29 measures the inner-width |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
var div = document.createElement('div'); |
|
|
|
var div = document.createElement('div'); |
|
|
|
div.style.width = '200px'; |
|
|
|
div.style.width = '200px'; |
|
|
@ -395,10 +392,11 @@ function setup() { |
|
|
|
var body = document.body || document.documentElement; |
|
|
|
var body = document.body || document.documentElement; |
|
|
|
body.appendChild( div ); |
|
|
|
body.appendChild( div ); |
|
|
|
var style = getStyle( div ); |
|
|
|
var style = getStyle( div ); |
|
|
|
|
|
|
|
// round value for browser zoom. desandro/masonry#928
|
|
|
|
|
|
|
|
isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200; |
|
|
|
|
|
|
|
getSize.isBoxSizeOuter = isBoxSizeOuter; |
|
|
|
|
|
|
|
|
|
|
|
getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200; |
|
|
|
|
|
|
|
body.removeChild( div ); |
|
|
|
body.removeChild( div ); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// -------------------------- getSize -------------------------- //
|
|
|
|
// -------------------------- getSize -------------------------- //
|
|
|
@ -530,7 +528,7 @@ return getSize; |
|
|
|
})); |
|
|
|
})); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Fizzy UI utils v2.0.5 |
|
|
|
* Fizzy UI utils v2.0.7 |
|
|
|
* MIT license |
|
|
|
* MIT license |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
@ -585,23 +583,27 @@ utils.modulo = function( num, div ) { |
|
|
|
|
|
|
|
|
|
|
|
// ----- makeArray ----- //
|
|
|
|
// ----- makeArray ----- //
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var arraySlice = Array.prototype.slice; |
|
|
|
|
|
|
|
|
|
|
|
// turn element or nodeList into an array
|
|
|
|
// turn element or nodeList into an array
|
|
|
|
utils.makeArray = function( obj ) { |
|
|
|
utils.makeArray = function( obj ) { |
|
|
|
var ary = []; |
|
|
|
|
|
|
|
if ( Array.isArray( obj ) ) { |
|
|
|
if ( Array.isArray( obj ) ) { |
|
|
|
// use object if already an array
|
|
|
|
// use object if already an array
|
|
|
|
ary = obj; |
|
|
|
return obj; |
|
|
|
} else if ( obj && typeof obj == 'object' && |
|
|
|
} |
|
|
|
typeof obj.length == 'number' ) { |
|
|
|
// return empty array if undefined or null. #6
|
|
|
|
|
|
|
|
if ( obj === null || obj === undefined ) { |
|
|
|
|
|
|
|
return []; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; |
|
|
|
|
|
|
|
if ( isArrayLike ) { |
|
|
|
// convert nodeList to array
|
|
|
|
// convert nodeList to array
|
|
|
|
for ( var i=0; i < obj.length; i++ ) { |
|
|
|
return arraySlice.call( obj ); |
|
|
|
ary.push( obj[i] ); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
// array of single index
|
|
|
|
// array of single index
|
|
|
|
ary.push( obj ); |
|
|
|
return [ obj ]; |
|
|
|
} |
|
|
|
|
|
|
|
return ary; |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// ----- removeFrom ----- //
|
|
|
|
// ----- removeFrom ----- //
|
|
|
@ -680,22 +682,21 @@ utils.filterFindElements = function( elems, selector ) { |
|
|
|
// ----- debounceMethod ----- //
|
|
|
|
// ----- debounceMethod ----- //
|
|
|
|
|
|
|
|
|
|
|
|
utils.debounceMethod = function( _class, methodName, threshold ) { |
|
|
|
utils.debounceMethod = function( _class, methodName, threshold ) { |
|
|
|
|
|
|
|
threshold = threshold || 100; |
|
|
|
// original method
|
|
|
|
// original method
|
|
|
|
var method = _class.prototype[ methodName ]; |
|
|
|
var method = _class.prototype[ methodName ]; |
|
|
|
var timeoutName = methodName + 'Timeout'; |
|
|
|
var timeoutName = methodName + 'Timeout'; |
|
|
|
|
|
|
|
|
|
|
|
_class.prototype[ methodName ] = function() { |
|
|
|
_class.prototype[ methodName ] = function() { |
|
|
|
var timeout = this[ timeoutName ]; |
|
|
|
var timeout = this[ timeoutName ]; |
|
|
|
if ( timeout ) { |
|
|
|
|
|
|
|
clearTimeout( timeout ); |
|
|
|
clearTimeout( timeout ); |
|
|
|
} |
|
|
|
|
|
|
|
var args = arguments; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var args = arguments; |
|
|
|
var _this = this; |
|
|
|
var _this = this; |
|
|
|
this[ timeoutName ] = setTimeout( function() { |
|
|
|
this[ timeoutName ] = setTimeout( function() { |
|
|
|
method.apply( _this, args ); |
|
|
|
method.apply( _this, args ); |
|
|
|
delete _this[ timeoutName ]; |
|
|
|
delete _this[ timeoutName ]; |
|
|
|
}, threshold || 100 ); |
|
|
|
}, threshold ); |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -903,13 +904,16 @@ proto.getPosition = function() { |
|
|
|
var isOriginTop = this.layout._getOption('originTop'); |
|
|
|
var isOriginTop = this.layout._getOption('originTop'); |
|
|
|
var xValue = style[ isOriginLeft ? 'left' : 'right' ]; |
|
|
|
var xValue = style[ isOriginLeft ? 'left' : 'right' ]; |
|
|
|
var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; |
|
|
|
var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; |
|
|
|
|
|
|
|
var x = parseFloat( xValue ); |
|
|
|
|
|
|
|
var y = parseFloat( yValue ); |
|
|
|
// convert percent to pixels
|
|
|
|
// convert percent to pixels
|
|
|
|
var layoutSize = this.layout.size; |
|
|
|
var layoutSize = this.layout.size; |
|
|
|
var x = xValue.indexOf('%') != -1 ? |
|
|
|
if ( xValue.indexOf('%') != -1 ) { |
|
|
|
( parseFloat( xValue ) / 100 ) * layoutSize.width : parseInt( xValue, 10 ); |
|
|
|
x = ( x / 100 ) * layoutSize.width; |
|
|
|
var y = yValue.indexOf('%') != -1 ? |
|
|
|
} |
|
|
|
( parseFloat( yValue ) / 100 ) * layoutSize.height : parseInt( yValue, 10 ); |
|
|
|
if ( yValue.indexOf('%') != -1 ) { |
|
|
|
|
|
|
|
y = ( y / 100 ) * layoutSize.height; |
|
|
|
|
|
|
|
} |
|
|
|
// clean up 'auto' or other non-integer values
|
|
|
|
// clean up 'auto' or other non-integer values
|
|
|
|
x = isNaN( x ) ? 0 : x; |
|
|
|
x = isNaN( x ) ? 0 : x; |
|
|
|
y = isNaN( y ) ? 0 : y; |
|
|
|
y = isNaN( y ) ? 0 : y; |
|
|
@ -972,9 +976,7 @@ proto._transitionTo = function( x, y ) { |
|
|
|
var curX = this.position.x; |
|
|
|
var curX = this.position.x; |
|
|
|
var curY = this.position.y; |
|
|
|
var curY = this.position.y; |
|
|
|
|
|
|
|
|
|
|
|
var compareX = parseInt( x, 10 ); |
|
|
|
var didNotMove = x == this.position.x && y == this.position.y; |
|
|
|
var compareY = parseInt( y, 10 ); |
|
|
|
|
|
|
|
var didNotMove = compareX === this.position.x && compareY === this.position.y; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// save end position
|
|
|
|
// save end position
|
|
|
|
this.setPosition( x, y ); |
|
|
|
this.setPosition( x, y ); |
|
|
@ -1017,8 +1019,8 @@ proto.goTo = function( x, y ) { |
|
|
|
proto.moveTo = proto._transitionTo; |
|
|
|
proto.moveTo = proto._transitionTo; |
|
|
|
|
|
|
|
|
|
|
|
proto.setPosition = function( x, y ) { |
|
|
|
proto.setPosition = function( x, y ) { |
|
|
|
this.position.x = parseInt( x, 10 ); |
|
|
|
this.position.x = parseFloat( x ); |
|
|
|
this.position.y = parseInt( y, 10 ); |
|
|
|
this.position.y = parseFloat( y ); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// ----- transition ----- //
|
|
|
|
// ----- transition ----- //
|
|
|
@ -1323,7 +1325,7 @@ return Item; |
|
|
|
})); |
|
|
|
})); |
|
|
|
|
|
|
|
|
|
|
|
/*! |
|
|
|
/*! |
|
|
|
* Outlayer v2.1.0 |
|
|
|
* Outlayer v2.1.1 |
|
|
|
* the brains and guts of a layout library |
|
|
|
* the brains and guts of a layout library |
|
|
|
* MIT license |
|
|
|
* MIT license |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -2938,13 +2940,13 @@ return Vertical; |
|
|
|
})); |
|
|
|
})); |
|
|
|
|
|
|
|
|
|
|
|
/*! |
|
|
|
/*! |
|
|
|
* Isotope v3.0.5 |
|
|
|
* Isotope v3.0.6 |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed GPLv3 for open source use |
|
|
|
* Licensed GPLv3 for open source use |
|
|
|
* or Isotope Commercial License for commercial use |
|
|
|
* or Isotope Commercial License for commercial use |
|
|
|
* |
|
|
|
* |
|
|
|
* https://isotope.metafizzy.co
|
|
|
|
* https://isotope.metafizzy.co
|
|
|
|
* Copyright 2017 Metafizzy |
|
|
|
* Copyright 2010-2018 Metafizzy |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
( function( window, factory ) { |
|
|
|
( function( window, factory ) { |
|
|
|