Sha256: c6ab28ae603b820439b3c6be3cc4d8c0d39f3fea7f144c6cccf7256ec9ea9355

Contents?: true

Size: 1023 Bytes

Versions: 24

Compression:

Stored size: 1023 Bytes

Contents

//>>excludeStart("exclude", pragmas.exclude);
define([ "shoestring" ], function(){
//>>excludeEnd("exclude");

	/**
	 * Private function for setting/getting the offset property for height/width.
	 *
	 * **NOTE** Please use the [width](width.js.html) or [height](height.js.html) methods instead.
	 *
	 * @param {shoestring} set The set of elements.
	 * @param {string} name The string "height" or "width".
	 * @param {float|undefined} value The value to assign.
	 * @return shoestring
	 * @this window
	 */
	shoestring._dimension = function( set, name, value ){
		var offsetName;

		if( value === undefined ){
			offsetName = name.replace(/^[a-z]/, function( letter ) {
				return letter.toUpperCase();
			});

			return set[ 0 ][ "offset" + offsetName ];
		} else {
			// support integer values as pixels
			value = typeof value === "string" ? value : value + "px";

			return set.each(function(){
				this.style[ name ] = value;
			});
		}
	};

//>>excludeStart("exclude", pragmas.exclude);
});
//>>excludeEnd("exclude");

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/shoestring/src/dom/dimension.js
trusty-cms-5.0.7 node_modules/shoestring/src/dom/dimension.js
trusty-cms-5.0.6 node_modules/shoestring/src/dom/dimension.js
trusty-cms-5.0.5 node_modules/shoestring/src/dom/dimension.js
trusty-cms-5.0.4 node_modules/shoestring/src/dom/dimension.js
trusty-cms-5.0.3 node_modules/shoestring/src/dom/dimension.js
trusty-cms-5.0.2 node_modules/shoestring/src/dom/dimension.js
trusty-cms-5.0.1 node_modules/shoestring/src/dom/dimension.js
trusty-cms-4.3.5 node_modules/shoestring/src/dom/dimension.js
trusty-cms-5.0.0 node_modules/shoestring/src/dom/dimension.js
trusty-cms-4.3.4 node_modules/shoestring/src/dom/dimension.js
trusty-cms-4.3.3 node_modules/shoestring/src/dom/dimension.js
trusty-cms-4.3.2 node_modules/shoestring/src/dom/dimension.js
trusty-cms-4.3.1 node_modules/shoestring/src/dom/dimension.js
trusty-cms-4.3 node_modules/shoestring/src/dom/dimension.js
trusty-cms-4.2.3 node_modules/shoestring/src/dom/dimension.js
trusty-cms-4.2.2 node_modules/shoestring/src/dom/dimension.js
trusty-cms-4.2.1 node_modules/shoestring/src/dom/dimension.js
trusty-cms-4.2 node_modules/shoestring/src/dom/dimension.js
trusty-cms-4.1.9 node_modules/shoestring/src/dom/dimension.js