[Sugar-devel] gestures + event controller patch series
Simon Schampijer
simon at schampijer.de
Mon Sep 10 07:39:46 EDT 2012
On 09/05/2012 02:04 PM, Carlos Garnacho wrote:
> Hey,
>
> I'm sending an updated patch set. There was a missing header in the
> previous set, and now there's code to show UI feedback on long press
>
> Carlos
Hi Carlos,
all in all a very nice work, I have a few comments on the API:
==Long press==
The property names could be a bit more descriptive. How about
"timeuntiltriggered" or "durationuntiltriggered" instead of "timeout"
and "allowableMovement" instead of "threshold" (shorter descriptive
ideas welcome :).
For the signal name, I prefer 'ended' instead of 'finished', works
better with 'started'. Began/Ended is another option.
Sidenote: The visual feedback for the press-hold is currently a black
rectangle on the XO.
==Swipe==
Maybe there are better options for the signal name than
"swipe-finished", how about "swipe-recognized' or if we consider the
signal name for LongPress how about just 'ended'?
Maybe we can enhance the API to know the location where a swipe begun.
Could be an argument to the 'ended' callback maybe.
Should we allow to only listen for a specific swipe direction as a property?
Not highest priority: I am not sure how hard it is to extend this, but
maybe we can allow to define swipes for multiple touch points (at least
two)? Could be another property.
==Rotate==
We should note that the angle is in radians.
==Zoom==
Maybe the delta argument in the annotation for zoom-changed should be
called scale? And we can note in the description that it is the delta.
==Tap==
As an addition we can think about a gesture handler for taps, to know
when there have been multiple taps.
==Namespace==
The Namespace is quiet long (SugarEventController.LongPressController)
and it doubles "Controller". We could either move it under SugarExt
(SugarExt.LongPressController) or we could maybe use SugarGestures
(SugarGestures.LongPressController).
Regards,
Simon
More information about the Sugar-devel
mailing list