class type t =Inheritsobject..end
method active : bool Js.t Js.readonly_propIndicates whether the user is currently dragging this tracker.
Defaults to: false
method dragTarget : Dom_html.element Js.t Js.readonly_propThe 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.methReturns 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.methReturns 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.methInitializes the DragTracker on a given element.
Parameters:
_ Js.t The element
method onBeforeStart : Ext_EventObject.t Js.t -> unit Js.methTemplate 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.methTemplate 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.methTemplate 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.methTemplate 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