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

Commit 0578ae4

Browse files
committed
fix(hexagon): fix #232
1 parent 452c3cc commit 0578ae4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: src/directives/rn-carousel.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
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',
@@ -85,15 +87,15 @@
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;

0 commit comments

Comments
 (0)