Comparing version 1.4.1 to 1.4.2
{ | ||
"name": "outlayer", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "the brains and guts of a layout library", | ||
@@ -5,0 +5,0 @@ "main": "outlayer.js", |
# Changelog | ||
### v1.4.2 | ||
+ Added `parseFloat()` for percent values. Switched back to pixels for transform values. Fixed [#37](https://github.com/metafizzy/outlayer/issues/37), [isotope#948](https://github.com/metafizzy/isotope/issues/948) | ||
### v1.4.1 | ||
@@ -4,0 +8,0 @@ |
14
item.js
@@ -167,8 +167,8 @@ /** | ||
var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; | ||
var x = parseInt( xValue, 10 ); | ||
var y = parseInt( yValue, 10 ); | ||
// convert percent to pixels | ||
var layoutSize = this.layout.size; | ||
x = xValue.indexOf('%') != -1 ? ( x / 100 ) * layoutSize.width : x; | ||
y = yValue.indexOf('%') != -1 ? ( y / 100 ) * layoutSize.height : y; | ||
var x = xValue.indexOf('%') != -1 ? | ||
( parseFloat( xValue ) / 100 ) * layoutSize.width : parseInt( xValue, 10 ); | ||
var y = yValue.indexOf('%') != -1 ? | ||
( parseFloat( yValue ) / 100 ) * layoutSize.height : parseInt( yValue, 10 ); | ||
@@ -269,10 +269,8 @@ // clean up 'auto' or other non-integer values | ||
y = layoutOptions.isOriginTop ? y : -y; | ||
x = this.getXValue( x ); | ||
y = this.getYValue( y ); | ||
if ( is3d ) { | ||
return 'translate3d(' + x + ', ' + y + ', 0)'; | ||
return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; | ||
} | ||
return 'translate(' + x + ', ' + y + ')'; | ||
return 'translate(' + x + 'px, ' + y + 'px)'; | ||
}; | ||
@@ -279,0 +277,0 @@ |
/*! | ||
* Outlayer v1.4.1 | ||
* Outlayer v1.4.2 | ||
* the brains and guts of a layout library | ||
@@ -4,0 +4,0 @@ * MIT license |
{ | ||
"name": "outlayer", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "the brains and guts of a layout library", | ||
@@ -5,0 +5,0 @@ "main": "outlayer.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102977
2251