StaticgetRetrieve an existing widget by element and ID.
StaticregisterOptionalconfig: TrackGestureConfigReadonlydestroyUndoes all modifications to the element and returns it to its original state.
You will need to recreate it if you want to enable its functionality again.
ReadonlydisableDisables the functionality of the widget. What this means is specific to each widget.
ReadonlyenableRe-enables the functionality of the widget. What this means is specific to each widget.
ReadonlygetReturns the element passed to the widget constructor.
ReadonlyisReturns true if the widget is destroyed.
ReadonlyisReturns true if the widget is currently disabled.
ReadonlyonThe given handler will be called when the widget is destroyed.
ReadonlyonThe given handler will be called when the widget is disabled.
ReadonlyonThe given handler will be called when the widget is enabled.
ReadonlytoggleRe-enables the widget if disabled, otherwise disables it.
This is a simple wrapper around the GestureWatcher. If you are using the JavaScript API, you should use the GestureWatcher directly. The purpose of this widget is to expose the watcher's ability to track gestures and set relevant CSS properties via the HTML API. See GestureWatcher.trackGesture.
To use with auto-widgets (HTML API) (see settings.autoWidgets), the following CSS classes or data attributes are recognized:
lisn-track-gestureclass ordata-lisn-track-gestureattribute set on the element that constitutes the widget.See below examples for what values you can use set for the data attributes in order to modify the configuration of the automatically created widget.
Example
This will track user gestures over this element and set the relevant CSS properties. It will use the default GestureWatcher options.
Example
As above but with custom settings.