Skip to content
This repository was archived by the owner on May 10, 2018. It is now read-only.

Commit 452c3cc

Browse files
author
Julien Bouquillon
committed
Merge pull request #248 from sanbornhnewyyz/master
Fix Safari transform detection. fix #247 #232
2 parents a254444 + 91fe66d commit 452c3cc

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

dist/angular-carousel.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Angular Carousel - Mobile friendly touch carousel for AngularJS
3-
* @version v0.3.5 - 2014-10-21
3+
* @version v0.3.5 - 2014-11-06
44
* @link http://revolunet.github.com/angular-carousel
55
* @author Julien Bouquillon <[email protected]>
66
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -107,8 +107,10 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
107107

108108
// detect supported CSS property
109109
function detectTransformProperty() {
110-
var transformProperty = 'transform';
110+
var transformProperty = 'transform',
111+
safariPropertyHack = 'webkitTransform';
111112
if (typeof document.body.style[transformProperty] !== 'undefined') {
113+
112114
['webkit', 'moz', 'o', 'ms'].every(function (prefix) {
113115
var e = '-' + prefix + '-transform';
114116
if (typeof document.body.style[e] !== 'undefined') {
@@ -117,6 +119,8 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
117119
}
118120
return true;
119121
});
122+
} else if (typeof document.body.style[safariPropertyHack] !== 'undefined') {
123+
transformProperty = '-webkit-transform';
120124
} else {
121125
transformProperty = undefined;
122126
}

0 commit comments

Comments
 (0)