class type t =Inheritsobject
..end
method active : bool Js.t Js.readonly_prop
Indicates whether the user is currently dragging this tracker.
Defaults to: false
method dragTarget : Dom_html.element Js.t Js.readonly_prop
The element being dragged.
Only valid during drag operations.
If the delegate option is used, this will be the delegate element which was mousedowned.
method getDragTarget : Ext_dom_Element.t Js.t Js.meth
Returns the drag target. This is usually the DragTracker's encapsulating element.
If the delegate option is being used, this may be a child element which matches the delegate selector.
Returns:
Ext_dom_Element.t Js.t
The element currently being tracked.
method getOffset : Js.js_string Js.t Js.optdef -> Js.number Js.t Js.js_array Js.t Js.meth
Returns the X, Y offset of the current mouse position from the mousedown point.
This method may optionally constrain the real offset values, and returns a point coerced in one of two modes:
point
The current mouse position is coerced into the constrainRegion and the resulting position is returned.dragTarget
The new Region of the dragTarget is calculated
based upon the current mouse position, and then coerced into the constrainRegion. The returned
mouse position is then adjusted by the same delta as was used to coerce the region.\Parameters:
Js.js_string Js.t
(optional)
If omitted the true mouse position is returned. May be passed
as point
or dragTarget
. See above.
Returns:
Js.number Js.t Js.js_array Js.t
The X, Y
offset from the mousedown point, optionally constrained.
method initEl : 'a. 'a Js.t -> unit Js.meth
Initializes the DragTracker on a given element.
Parameters:
_ Js.t
The element
method onBeforeStart : Ext_EventObject.t Js.t -> unit Js.meth
Template method which should be overridden by each DragTracker instance. Called when the user first clicks and holds the mouse button down. Return false to disallow the drag
Parameters:
Ext_EventObject.t Js.t
The event object
method onDrag : Ext_EventObject.t Js.t -> unit Js.meth
Template method which should be overridden by each DragTracker instance. Called whenever a drag has been detected.
Parameters:
Ext_EventObject.t Js.t
The event object
method onEnd : Ext_EventObject.t Js.t -> unit Js.meth
Template method which should be overridden by each DragTracker instance. Called when a drag operation has been completed (e.g. the user clicked and held the mouse down, dragged the element and then released the mouse button)
Parameters:
Ext_EventObject.t Js.t
The event object
method onStart : Ext_EventObject.t Js.t -> unit Js.meth
Template method which should be overridden by each DragTracker instance. Called when a drag operation starts (e.g. the user has moved the tracked element beyond the specified tolerance)
Parameters:
Ext_EventObject.t Js.t
The event object