Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions CardFlip.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class CardFlip extends Component<Props> {
const sideATransform = {
opacity: sideAOpacity,
zIndex: side === 0 ? 1 : 0,
transform: [{ perspective: this.props.perspective }]
transform: []
};
if (rotateOrientation === "x") {
const aXRotation = rotation.x.interpolate({
Expand All @@ -226,6 +226,9 @@ class CardFlip extends Component<Props> {
});
sideATransform.transform.push({ rotateY: aYRotation });
}
if (Platform.OS === "android") {
sideATransform.transform.push({ perspective: this.props.perspective });
}
return sideATransform;
}

Expand All @@ -241,7 +244,7 @@ class CardFlip extends Component<Props> {
const sideBTransform = {
opacity: sideBOpacity,
zIndex: side === 0 ? 0 : 1,
transform: [{ perspective: -1 * this.props.perspective }]
transform: []
};
let bYRotation;
if (rotateOrientation === "x") {
Expand Down Expand Up @@ -269,6 +272,9 @@ class CardFlip extends Component<Props> {
}
sideBTransform.transform.push({ rotateY: bYRotation });
}
if (Platform.OS === "android") {
sideBTransform.transform.push({ perspective: -1 * this.props.perspective });
}
return sideBTransform;
}

Expand Down Expand Up @@ -343,4 +349,4 @@ CardFlip.propTypes = {
};

polyfill(CardFlip)
export default CardFlip
export default CardFlip