This repository was archived by the owner on May 10, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 55
66 . service ( 'DeviceCapabilities' , function ( ) {
77
8+ // TODO: merge in a single function
9+
810 // detect supported CSS property
911 function detectTransformProperty ( ) {
1012 var transformProperty = 'transform' ,
8587 transformFrom = offset < ( slideIndex * - 100 ) ? 100 : 0 ;
8688 degrees = offset < ( slideIndex * - 100 ) ? maxDegrees : - maxDegrees ;
8789 style [ DeviceCapabilities . transformProperty ] = slideTransformValue + ' ' + 'rotateY(' + degrees + 'deg)' ;
88- style [ 'transform -origin'] = transformFrom + '% 50%' ;
90+ style [ DeviceCapabilities . transformProperty + ' -origin'] = transformFrom + '% 50%' ;
8991 } else if ( transitionType == 'zoom' ) {
9092 style [ DeviceCapabilities . transformProperty ] = slideTransformValue ;
9193 var scale = 1 ;
9294 if ( Math . abs ( absoluteLeft ) < 100 ) {
9395 scale = 1 + ( ( 1 - distance ) * 2 ) ;
9496 }
9597 style [ DeviceCapabilities . transformProperty ] += ' scale(' + scale + ')' ;
96- style [ 'transform -origin'] = '50% 50%' ;
98+ style [ DeviceCapabilities . transformProperty + ' -origin'] = '50% 50%' ;
9799 opacity = 0 ;
98100 if ( Math . abs ( absoluteLeft ) < 100 ) {
99101 opacity = 0.3 + distance * 0.7 ;
You can’t perform that action at this time.
0 commit comments