This commit is contained in:
Alex Corbi 2019-09-30 10:44:43 +02:00
parent 36c5cc15a7
commit f972d8d46e
176 changed files with 62106 additions and 59068 deletions

View file

@ -1,17 +1,20 @@
/*!
* getSize v2.0.3
* getSize v2.0.2
* measure size of elements
* MIT license
*/
/* jshint browser: true, strict: true, undef: true, unused: true */
/* globals console: false */
/*jshint browser: true, strict: true, undef: true, unused: true */
/*global define: false, module: false, console: false */
( function( window, factory ) {
/* jshint strict: false */ /* globals define, module */
'use strict';
if ( typeof define == 'function' && define.amd ) {
// AMD
define( factory );
define( function() {
return factory();
});
} else if ( typeof module == 'object' && module.exports ) {
// CommonJS
module.exports = factory();
@ -86,7 +89,7 @@ function getStyle( elem ) {
if ( !style ) {
logError( 'Style returned ' + style +
'. Are you running this code in a hidden iframe on Firefox? ' +
'See https://bit.ly/getsizebug1' );
'See http://bit.ly/getsizebug1' );
}
return style;
}
@ -112,8 +115,8 @@ function setup() {
// -------------------------- box sizing -------------------------- //
/**
* Chrome & Safari measure the outer-width on style.width on border-box elems
* IE11 & Firefox<29 measures the inner-width
* WebKit measures the outer-width on style.width on border-box elems
* IE & Firefox<29 measures the inner-width
*/
var div = document.createElement('div');
div.style.width = '200px';
@ -125,11 +128,10 @@ function setup() {
var body = document.body || document.documentElement;
body.appendChild( 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 );
}
// -------------------------- getSize -------------------------- //