+ property bool isPortrait: rotation == -90
+
+ Behavior on width {
+ PropertyAnimation { duration: 100 }
+ }
+
+ Behavior on height {
+ PropertyAnimation { duration: 100 }
+ }
+
+ Behavior on rotation {
+ PropertyAnimation { duration: 100 }
+ }
+
+ function calculateRotation(orientation) {
+ switch (orientation) {
+ case CameraOrientation.InvertedLandscape:
+ case CameraOrientation.Landscape:
+ return 0
+ case CameraOrientation.InvertedPortrait:
+ case CameraOrientation.Portrait:
+ return -90
+ default:
+ return 0
+ }
+ }