torkiljohnsen/swipe — Issue #17: Refactor layer states/properties
Author: torkiljohnsen
Created: 2012-03-06 23:16:01+00:00
State: open

States needs to belong to layers. Each layer needs to have their own set of behaviors:

Main layer:
- Scrolling is allowed
- Horizontal swiping
- Challenge: Needs to be able to also trigger leftwards swipe on the secondary layer
- Snaps into position on swipe

Secondary layers:
- Scrolling is disallowed
- Y-axis movement is allowed
- X-axis movement is disallowed
- No swiping or snapping into position

Perhaps also some sort of normalize callback for each, which resets their positions.

With this, we can loop through active layers and attach touch events to them. They'll all have the touch events, but respond differently to them.