I am using the scrollpanel in mgwt to display images and i want it that when the user scrolls the closest image snaps to the top. i see there are two methods of the scrollpanel for snapping
void setSnap(boolean snap)
void setSnapSelector(String selector)
I can’t find any documentation on setSnapSelector. Can anyone tell me what this method does? And what it is supposed to be passed?
If you want to see an example of the snap selector in action take a look at the HeaderList widget: http://code.google.com/p/mgwt/source/browse/src/main/java/com/googlecode/mgwt/ui/client/widget/HeaderList.java
If you enable snap and set a selector the scrollPanel will snap to a position after any touch. So if you have several images you want to pass img as a selector.