This repository was archived by the owner on May 10, 2018. It is now read-only.
File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
. service ( 'DeviceCapabilities' , function ( ) {
7
7
8
+ // TODO: merge in a single function
9
+
8
10
// detect supported CSS property
9
11
function detectTransformProperty ( ) {
10
12
var transformProperty = 'transform' ,
85
87
transformFrom = offset < ( slideIndex * - 100 ) ? 100 : 0 ;
86
88
degrees = offset < ( slideIndex * - 100 ) ? maxDegrees : - maxDegrees ;
87
89
style [ DeviceCapabilities . transformProperty ] = slideTransformValue + ' ' + 'rotateY(' + degrees + 'deg)' ;
88
- style [ 'transform -origin'] = transformFrom + '% 50%' ;
90
+ style [ DeviceCapabilities . transformProperty + ' -origin'] = transformFrom + '% 50%' ;
89
91
} else if ( transitionType == 'zoom' ) {
90
92
style [ DeviceCapabilities . transformProperty ] = slideTransformValue ;
91
93
var scale = 1 ;
92
94
if ( Math . abs ( absoluteLeft ) < 100 ) {
93
95
scale = 1 + ( ( 1 - distance ) * 2 ) ;
94
96
}
95
97
style [ DeviceCapabilities . transformProperty ] += ' scale(' + scale + ')' ;
96
- style [ 'transform -origin'] = '50% 50%' ;
98
+ style [ DeviceCapabilities . transformProperty + ' -origin'] = '50% 50%' ;
97
99
opacity = 0 ;
98
100
if ( Math . abs ( absoluteLeft ) < 100 ) {
99
101
opacity = 0.3 + distance * 0.7 ;
You can’t perform that action at this time.
0 commit comments