-
15 Nov 2012 6:17 AM #1
Unanswered: reset Scroller
Unanswered: reset Scroller
Hi,
I am having a view, where I can expand items.
Now I would like to check if the content fits in the parent container and enable or disable the scroller.
So far I can figure out if a view needs to be scrollable, by scrolling to the bottom and then to the top and checking if the maxScrollPosition changed.
But this only works once.
If I open a container and close it and then reopen it, the maxScrollPos will no longer change.
So I tried to reset the maxScrollPosition, but then the scroller sceem to be broken.
Is it possible to remove the scroller and add a new one?
Or simply reset the scroller (like put back the initialConfig)?
Or are there values like
Code:view.getScrollable().getScroller().getContainerSize() > view.getContent()
-
15 Nov 2012 6:41 PM #2
Why are you checking content to determine scrollability? Does having your content in a container configured as scrollable not an option for you?
BriceBrice Mason
Front End Developer
Modus Create
@bricemason
bricemason.com
Sencha Touch Screencasts
Vimeo - Sencha Touch Channel
Github Projects:
Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.
Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.
Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.
-
16 Nov 2012 3:57 AM #3
different devices
different devices
I have all these different screen sizes and there has to be as little scrolling as possible.
While scrolling is active navigation gets harder (at least with a thumb of my size
)
The client wants to have no scrolling if possible. But there are containers opening and closing, ... you name it.
To ensure there is no scrolling active, when not needed I need to disable it.
After spending quite some time on this I found the following solution:
Take the scroller's dom offsetHeight and see if it fits inside the containerSize.y
Its not really resetting the scroller, but it works for me.
I call the method whenever needed and can set the scrolling on the fly.


Reply With Quote