@JsType(isNative=true)
public class PosAnimation
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static L |
clearAllEventListeners()
Clear all event listeners.
|
static L |
fire(java.lang.String type)
Fires an event of the specified type.
|
static L |
off(java.lang.String type,
Function fn)
the listener will only get fired once and then removed.
|
static L |
on(java.lang.String type,
Function fn)
Adds a set of type/listener pairs
|
static L |
once(java.lang.String type,
Function fn)
Once.
|
L |
run(HTMLElement element,
Point newPos,
java.lang.Number duration,
java.lang.Number easeLinearity)
Runs an animation of a given element to a new position, optionally setting duration in seconds (0.25 by default) and easing linearity factor (3rd argument of the cubic bezier curve, 0.5 by default).
|
@JsMethod public L run(HTMLElement element, Point newPos, java.lang.Number duration, java.lang.Number easeLinearity)
element
- the elementnewPos
- the new positionduration
- the durationeaseLinearity
- the easing linearity factor@JsMethod public static L clearAllEventListeners()
@JsMethod public static L on(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L once(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L off(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L fire(java.lang.String type)
type
- the type