File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,17 @@ var createMenuButton = function() {
220
220
animations . open . addEventListener ( 'complete' , function ( ) {
221
221
isAnimating = false ;
222
222
} ) ;
223
- animations . close . transform = Ti . UI . create2DMatrix ( ) . rotate ( 0 ) ;
223
+
224
+ // In Titanium, Android rotations always start at zero, regardless of last position.
225
+ // In Android Titanium apps you can pass two arguments to the rotate() function,
226
+ // the first being the starting rotation, the second being the final rotation.
227
+ // This is not a cross-platform method, so you need to make sure you are on Android
228
+ // before using 2 arguments.
229
+ if ( isAndroid ) {
230
+ animations . close . transform = Ti . UI . create2DMatrix ( ) . rotate ( 45 , 0 ) ;
231
+ } else {
232
+ animations . close . transform = Ti . UI . create2DMatrix ( ) . rotate ( 0 ) ;
233
+ }
224
234
animations . close . addEventListener ( 'complete' , function ( ) {
225
235
isAnimating = false ;
226
236
} ) ;
You can’t perform that action at this time.
0 commit comments