Application type: mobile Titanium SDK: 3.3.0GA Platform & version: iOS 7.1 Device: iOS simulator Host Operating System: OSX 10.9.5 Titanium Studio: 3.2.3.201404181442 a simple test case:
it working first but after changing direction one more times it stops and not working specially in rtl direction
// this function will open left slider Alloy.Globals.openLeftMenu = function() { //console.log('menu '+isSliderOpen); var newWidth = Ti.Platform.displayCaps.platformWidth; if (OS_ANDROID) newWidth /= Ti.Platform.displayCaps.logicalDensityFactor; $.AppWrapper.width = newWidth; if (isSliderOpen) { closeMenu(); } else { openMenu(); } }; function openMenu() { console.log("Alloy.Globals.langProp.direction "+Alloy.Globals.langProp.direction ); if (Alloy.Globals.langProp.direction == "ltr") { $.SlideMenu.Wrapper.animate(animate_left_reset); $.AppWrapper.animate(animate_left); } else { $.SlideMenu.Wrapper.animate(animate_right_reset); $.AppWrapper.animate(animate_right); } // set slider is open isSliderOpen as true isSliderOpen = true; } function closeMenu() { console.log("Alloy.Globals.langProp.direction "+Alloy.Globals.langProp.direction ); if (Alloy.Globals.langProp.direction == "ltr") { $.AppWrapper.animate(animate_left_reset); $.SlideMenu.Wrapper.animate(animate_left_minus); } else { $.AppWrapper.animate(animate_right_reset); $.SlideMenu.Wrapper.animate(animate_right_minus); } //console.log(Ti.Platform.displayCaps.platformWidth + " : "+$.AppWrapper.width); // set slider is close isSliderOpen as false isSliderOpen = false; } var animate_left_reset = Ti.UI.createAnimation({ left : 0, duration : 200, curve : Ti.UI.ANIMATION_CURVE_EASE_IN_OUT }); var animate_left = Ti.UI.createAnimation({ left :280, duration : 200, curve : Ti.UI.ANIMATION_CURVE_EASE_IN_OUT }); var animate_left_minus = Ti.UI.createAnimation({ left :-280, duration : 200, curve : Ti.UI.ANIMATION_CURVE_EASE_IN_OUT }); var animate_right_reset = Ti.UI.createAnimation({ right : 0, duration : 200, curve : Ti.UI.ANIMATION_CURVE_EASE_IN_OUT }); var animate_right = Ti.UI.createAnimation({ right :280, duration : 200, curve : Ti.UI.ANIMATION_CURVE_EASE_IN_OUT }); var animate_right_minus = Ti.UI.createAnimation({ right :-280, duration : 200, curve : Ti.UI.ANIMATION_CURVE_EASE_IN_OUT });notes
if i remove
$.AppWrapper.width = newWidth;it working !!
but $.AppWrapper view collapesd like stressed
any ideas ?? i want apply
$.AppWrapper.width = newWidth;and i want animation working
thanks