Support for Rotated elements
See original GitHub issueHi, Thank you for this library and the React Navigation binding.
Currently the library supports transition when element was scaled. Could it also support transition when element was rotated ?
Current behavior: The element jumps from a rotated position to the next position without any transition.
Expected behavior: During the transition, the element rotates to its new position, then on back button pressed, the element rotates back to its previous position.
Example:
// Main Screen
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#C14534',
},
paper: {
backgroundColor: '#EC806E',
position: 'absolute',
left: 10,
top: Dimensions.get('window').height * 0.5 - 150,
width: Dimensions.get('window').width * 0.65,
height: Dimensions.get('window').height * 0.45,
transform: [{ rotate: '-20deg' }],
shadowColor: '#000',
shadowRadius: 5,
shadowOffset: { width: 0, height: 5 },
shadowOpacity: 0.4,
},
});
export const MainScreen = (props: IMainProps) => {
return(
<TouchableOpacity activeOpacity={1} style={styles.container}
onPress={()=> props.navigation.navigate('Details')}>
<SharedElement id='paper' style={styles.paper}>
<View />
</SharedElement >
</TouchableOpacity>
);
}
// Details Screen
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#C14534',
},
paper: {
backgroundColor: '#FFFFFF',
position: 'absolute',
left: 0,
top: Dimensions.get('window').height * 0.5,
bottom: 0,
right: 0,
alignItems: 'center',
justifyContent: 'flex-start',
paddingTop: 70,
padding: 10,
},
});
export const DetailsScreen = (props: IMainProps) => {
return (
<TouchableOpacity activeOpacity={1} style={styles.container}
onPress={()=> props.navigation.goBack()}>
<SharedElement id='paper' style={styles.paper}>
<View />
</SharedElement >
</TouchableOpacity>
);
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (2 by maintainers)
Top Results From Across the Web
rotate() - CSS: Cascading Style Sheets - MDN Web Docs
The rotate() CSS function defines a transformation that rotates an element around a fixed point on the 2D plane, without deforming it.
Read more >"rotate" | Can I use... Support tables for HTML5, CSS3, etc
Method of applying filter effects using the filter property to elements, matching filters available in SVG. Filter functions include blur, ...
Read more >Element Properties - Rotating Elements - Flexitive Support
Until then, we recommend you rotate images using a third-party application such as LunaPic and then import the rotated asset into Flexitive. Did...
Read more >rotate | CSS-Tricks
The rotate property in CSS turns an element around one or more axes. Think of it like poking one or more pins into...
Read more >Rotate Elements | Revit 2021 - Autodesk Knowledge Network
Use the Rotate tool to rotate elements around an axis. In floor plan, reflected ceiling plan, elevation, and section views, elements rotate ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yup I’m seeing it. This one will be a bit tricky to implement. Will try to take it into consideration for the next update.
Here is the expected result: