sencha-SlideNavigation icon indicating copy to clipboard operation
sencha-SlideNavigation copied to clipboard

disable draggable using setContainerSlideDelay(-1)

Open dishwashwebdesign opened this issue 11 years ago • 1 comments

On a certain view I would like to disable the draggable option which is initialized with the default value containerSlideDelay: 10.

I can set it to -1 using mySlideNav.setContainerSlideDelay(-1) and can retrive the value using mySlideNav.getContainerSlideDelay().

However, after setting the value to -1 the navigation view is not getting properly updated. Any chance of only re-initializing the needed component?

Thanks for any feedback.

dishwashwebdesign avatar Jun 10 '13 07:06 dishwashwebdesign

I was able to get this to work in the view's listeners. It looked like there were two factors that contributed to enabling or disabling the drag on the container. I tried to get this to work with a mask, but that's going to take some more work.

Steve

    listeners: {
        slidestart:function(x,eOpts){
            if(!x.isClosed()){                  
                this.config.containerSlideDelay=10;
                this.setSlideSelector('x-container');
            }           
        },
        slideend:function(x){
            if(x.isClosed()){   
                this.config.containerSlideDelay=-1;
                this.setSlideSelector('x-toolbar');
            }
        }                   
    }

daxiang28 avatar Oct 09 '13 02:10 daxiang28