mcongrove / com.mcongrove.slideMenu

Please do not use: this is out-dated
28 stars 21 forks source link

example #1

Closed boardmain closed 10 years ago

boardmain commented 10 years ago

hi can you provide a simply full example? i tried to use it with a blank new app but notting appear

demogar commented 10 years ago

@boardmain I had the same issue and just discovered here that you need to define left property on open.

Hope it helps :)

stephenwoodford commented 10 years ago

For anyone else that runs into this, the corrected example would be:

function openMenu() {
    $.SlideMenu.Wrapper.left = "0dp";
    $.AppWrapper.animate({
        left: "200dp",
        duration: 250,
        curve: Ti.UI.ANIMATION_CURVE_EASE_IN_OUT
    });
}
mcongrove commented 10 years ago

Stupid GitHub, didn't even see a notification for this.

Thanks for pointing this out. The way we have the styling for the menu, by default, puts it at -200 left. You can animate it in with the slide (I've updated the README example), or you can go in and set it to 0 (as @demogar and @swoodford5 pointed out).