Modify gesture callback.

This commit is contained in:
jinyuan.weng 2018-08-20 17:45:49 +08:00
parent bbe56ee9cf
commit 1154cb2fef

View File

@ -76,7 +76,7 @@ namespace grove {
* @param handler code to run * @param handler code to run
*/ */
//% blockId=grove_gesture_create_event block="on Gesture|%gesture" //% blockId=grove_gesture_create_event block="on Gesture|%gesture"
export function onGesture(gesture: GroveGesture, handler: Action) { export function onGesture(gesture: GroveGesture, handler: () => void) {
control.onEvent(gestureEventId, gesture, handler); control.onEvent(gestureEventId, gesture, handler);
if (!paj7620) { if (!paj7620) {
paj7620.init(); paj7620.init();