Go to file
Jean-Philippe Andre 4cf069ede9 Flip: Fix confusion with hitsize and direction
Elm Flip has some confusing API (and documentation as well) regarding
flip directions and hitsize. Basically, it works just as expected
when everything is set to 1 (all hitsizes are 100% and all directions
are enabled), like in the elm example file :)

BUT, it's not actually possible to restrict the hitsize for one
direction.

Example: You want to flip to left only.
Set direction enabled LEFT.
Then, you must set the hitsize for... RIGHT because that's where the
finger interaction will start from (right to left!). BUT since
RIGHT interaction is not enabled, the histize parameter on RIGHT
will have NO effect on the flip.

Here's what this commit fixes:
- Clear up a bit of the confusion between direction and hit area,
through documentation
- Separate hit area position and direction (bugfix)
- Allow for negative hitsize values to DISABLE a specific area
(define previously undefined behaviour)

So, it will be possible for example:
- Enable left/right interactions
- Only on the top 10% of the widget

NOTE: This breaks behaviour! API/ABI are not quite broken but
undefined behaviour just got defined and fixed.
2013-12-11 15:02:20 +09:00
legacy/elementary Flip: Fix confusion with hitsize and direction 2013-12-11 15:02:20 +09:00