diff --git a/CardFlip.js b/CardFlip.js index 70f2683..60be369 100644 --- a/CardFlip.js +++ b/CardFlip.js @@ -208,7 +208,7 @@ class CardFlip extends Component { const sideATransform = { opacity: sideAOpacity, zIndex: side === 0 ? 1 : 0, - transform: [{ perspective: this.props.perspective }] + transform: [] }; if (rotateOrientation === "x") { const aXRotation = rotation.x.interpolate({ @@ -226,6 +226,9 @@ class CardFlip extends Component { }); sideATransform.transform.push({ rotateY: aYRotation }); } + if (Platform.OS === "android") { + sideATransform.transform.push({ perspective: this.props.perspective }); + } return sideATransform; } @@ -241,7 +244,7 @@ class CardFlip extends Component { const sideBTransform = { opacity: sideBOpacity, zIndex: side === 0 ? 0 : 1, - transform: [{ perspective: -1 * this.props.perspective }] + transform: [] }; let bYRotation; if (rotateOrientation === "x") { @@ -269,6 +272,9 @@ class CardFlip extends Component { } sideBTransform.transform.push({ rotateY: bYRotation }); } + if (Platform.OS === "android") { + sideBTransform.transform.push({ perspective: -1 * this.props.perspective }); + } return sideBTransform; } @@ -343,4 +349,4 @@ CardFlip.propTypes = { }; polyfill(CardFlip) -export default CardFlip \ No newline at end of file +export default CardFlip