Skip to content

Commit

Permalink
Merge pull request nolimits4web#706 from tremby/bugfix/webkitcssmatri…
Browse files Browse the repository at this point in the history
…x-none

Don't pass 'none' to WebKitCSSMatrix constructor
  • Loading branch information
nolimits4web committed Mar 31, 2014
2 parents 4f4c54c + 4d2aa3d commit a229051
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/idangerous.swiper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,9 @@ Swiper.prototype = {
if (this.support.transforms && this.params.useCSS3Transforms) {
curStyle = window.getComputedStyle(el, null);
if (window.WebKitCSSMatrix) {
transformMatrix = new WebKitCSSMatrix(curStyle.webkitTransform);
// Some old versions of Webkit choke when 'none' is passed; pass
// empty string instead in this case
transformMatrix = new WebKitCSSMatrix(curStyle.webkitTransform === 'none' ? '' : curStyle.webkitTransform);
}
else {
transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
Expand Down

0 comments on commit a229051

Please sign in to comment.