Observable Draggable Scroller
Package: | Ext.util |
Defined In: | Scroller.js |
Class: | Scroller |
Extends: | Draggable |
Config Options | Defined By | |
---|---|---|
acceleration : Number A higher acceleration gives the scroller more initial velocity. Defaults to 30 | Scroller | |
bounces : Boolean/String Enable bouncing during scrolling past the bounds. Defaults to true. (Which is 'both').
You can also specify 'vertical... Enable bouncing during scrolling past the bounds. Defaults to true. (Which is 'both').
You can also specify 'vertical', 'horizontal', or 'both' | Scroller | |
cancelSelector : String A simple CSS selector that represents elements within the draggable
that should NOT initiate a drag. | Draggable | |
constrain : Element/Mixed Can be either a DOM element, an instance of Ext.Element, 'parent' or null for no constrain | Draggable | |
delay : Number How many milliseconds a user must hold the draggable before starting a
drag operation. Defaults to 0 or immediate. | Draggable | |
direction : String Possible values: 'vertical', 'horizontal', or 'both'
Defaults to 'both' | Draggable | |
disabled : Boolean Whether or not the draggable behavior is disabled on instantiation
Defaults to false | Draggable | |
eventTarget : Ext.Element/Element/String The element to actually bind touch events to, the only string accepted is 'parent'
for convenience.
Defaults to this ... The element to actually bind touch events to, the only string accepted is 'parent'
for convenience.
Defaults to this class' element itself | Draggable | |
fps : Number The desired fps of the deceleration. Defaults to 80. | Scroller | |
friction : Number The friction of the scroller.
By raising this value the length that momentum scrolls becomes shorter. This value is b... The friction of the scroller.
By raising this value the length that momentum scrolls becomes shorter. This value is best kept
between 0 and 1. The default value is 0.5 | Scroller | |
group : String Draggable and Droppable objects can participate in a group which are
capable of interacting. Defaults to 'base' | Draggable | |
listeners : Object A config object containing one or more event handlers to be added to this
object during initialization. This should ... A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the addListener example for attaching multiple handlers at once. DOM events from ExtJs Components While some ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
is usually only done when extra value can be added. For example the DataView's
| Observable | |
minVelocityForAnimation : Number The minimum velocity to keep animating. Defaults to 1 (1px per second) | Scroller | |
momentum : Boolean Whether or not to enable scrolling momentum. Defaults to true | Scroller | |
outOfBoundRestrictFactor : Number Determines the offset ratio when the scroller is pulled / pushed out of bound (when it's not decelerating)
A value of... Determines the offset ratio when the scroller is pulled / pushed out of bound (when it's not decelerating)
A value of 0.5 means 1px allowed for every 2px. Defaults to 0.5 | Scroller | |
revert : Boolean Whether or not the element or it's proxy will be reverted back (with animation)
when it's not dropped and held by a D... Whether or not the element or it's proxy will be reverted back (with animation)
when it's not dropped and held by a Droppable | Draggable | |
springTension : Number The tension of the spring that is attached to the scroller when it bounces.
By raising this value the bounce becomes ... The tension of the spring that is attached to the scroller when it bounces.
By raising this value the bounce becomes shorter. This value is best kept
between 0 and 1. The default value is 0.3 | Scroller | |
startMomentumResetTime : Number The time duration in ms to reset the start time of momentum
Defaults to 350 | Scroller | |
useCssTransform : Boolean Whether or not to translate the element using CSS Transform (much faster) instead of
left and top properties, default... Whether or not to translate the element using CSS Transform (much faster) instead of
left and top properties, defaults to true | Draggable |
Property | Defined By | |
---|---|---|
animationDuration : Number How long animations for this draggable take by default when using setOffset with animate being true.
This defaults to... How long animations for this draggable take by default when using setOffset with animate being true.
This defaults to 300. | Draggable | |
dragging : Boolean Read-only Property representing whether or not the Draggable is currently
dragging or not. | Draggable | |
horizontal : Boolean Read-only value representing whether the Draggable can be moved horizontally.
This is automatically calculated by Dra... Read-only value representing whether the Draggable can be moved horizontally.
This is automatically calculated by Draggable by the direction configuration. | Draggable | |
offsetBoundary : Ext.util.Region Read-only Property representing the region that the Draggable
is constrained to. | Draggable | |
threshold : Number The amount of pixels you have to move before the drag operation starts.
Defaults to 0 | Draggable | |
vertical : Boolean Read-only value representing whether the Draggable can be moved vertically.
This is automatically calculated by Dragg... Read-only value representing whether the Draggable can be moved vertically.
This is automatically calculated by Draggable by the direction configuration. | Draggable |
Method | Defined By | |
---|---|---|
addEvents( Object|String o , string Optional. )
:
voidAdds the specified events to the list of events which this Observable may fire. Adds the specified events to the list of events which this Observable may fire. Parameters:
| Observable | |
addListener( String eventName , Function handler , [Object scope ], [Object options ] )
:
voidAppends an event handler to this object. Appends an event handler to this object. Parameters:
| Observable | |
addManagedListener( Observable|Element item , Object|String ename , Function fn , Object scope , Object opt )
:
voidAdds listeners to any Observable object (or Element) which are automatically removed when this Component
is destroyed... Adds listeners to any Observable object (or Element) which are automatically removed when this Component is destroyed. Parameters:
| Observable | |
clearListeners()
:
void Removes all listeners for this object including the managed listeners Removes all listeners for this object including the managed listeners Parameters:
| Observable | |
clearManagedListeners()
:
void Removes all managed listeners for this object. Removes all managed listeners for this object. Parameters:
| Observable | |
destroy()
:
void Destroys this Draggable instance. Destroys this Draggable instance. Parameters:
| Draggable | |
disable()
:
Ext.util.Draggable Disable the Draggable. Disable the Draggable. Parameters:
| Draggable | |
enable()
:
Ext.util.Draggable Enable the Draggable. Enable the Draggable. Parameters:
| Draggable | |
enableBubble( String/Array events )
:
voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
this.getBubbleTarget() if present.... Enables events fired by this Observable to bubble up an owner hierarchy by calling
This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to access the required target more quickly. Example:
Parameters:
| Observable | |
fireEvent( String eventName , Object... args )
:
BooleanFires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse... Fires the specified event with the passed parameters (minus the event name). An event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget) by calling enableBubble. Parameters:
| Observable | |
getOffset()
:
Ext.util.Offset Returns the current offset relative to the original location of this Draggable. Returns the current offset relative to the original location of this Draggable. Parameters:
| Draggable | |
getProxyEl()
:
void Returns the element thats is being visually dragged. Returns the element thats is being visually dragged. Parameters:
| Draggable | |
hasListener( String eventName )
:
BooleanChecks to see if this object has any listeners for a specified event Checks to see if this object has any listeners for a specified event Parameters:
| Observable | |
isDragging()
:
Boolean Method to determine whether this Draggable is currently dragging. Method to determine whether this Draggable is currently dragging. Parameters:
| Draggable | |
isHorizontal()
:
Boolean Method to determine whether this Draggable can be dragged on the x-axis Method to determine whether this Draggable can be dragged on the x-axis Parameters:
| Draggable | |
isVertical()
:
Boolean Method to determine whether this Draggable can be dragged on the y-axis Method to determine whether this Draggable can be dragged on the y-axis Parameters:
| Draggable | |
moveTo( Number x , Number y )
:
Ext.util.DraggableUse this to move the draggable to a coordinate on the screen. Use this to move the draggable to a coordinate on the screen. Parameters:
| Draggable | |
on( String eventName , Function handler , [Object scope ], [Object options ] )
:
voidAppends an event handler to this object (shorthand for addListener.) Appends an event handler to this object (shorthand for addListener.) Parameters:
| Observable | |
relayEvents( Object o , Array events )
:
voidRelays selected events from the specified Observable as if the events were fired by this. Relays selected events from the specified Observable as if the events were fired by this. Parameters:
| Observable | |
removeListener( String eventName , Function handler , [Object scope ] )
:
voidRemoves an event handler. Removes an event handler. Parameters:
| Observable | |
removeManagedListener( Observable|Element item , Object|String ename , Function fn , Object scope )
:
voidRemoves listeners that were added by the mon method. Removes listeners that were added by the mon method. Parameters:
| Observable | |
resumeEvents()
:
void Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
event... Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
events fired during event suspension will be sent to any listeners now. Parameters:
| Observable | |
setEnabled( Boolean enabled )
:
Ext.util.DraggableCombined method to disable or enable the Draggable. This method is called by the enable and
disable methods. Combined method to disable or enable the Draggable. This method is called by the enable and
disable methods. Parameters:
| Draggable | |
setOffset( Ext.util.Offset/Object offset , Boolean/Number animate )
:
Ext.util.DraggableSets the offset of this Draggable relatively to its original offset. Sets the offset of this Draggable relatively to its original offset. Parameters:
| Draggable | |
setUseCssTransform( Boolean useCssTransform )
:
Ext.util.DraggableChange the Draggable to use css transforms instead of style offsets
or the other way around. Change the Draggable to use css transforms instead of style offsets
or the other way around. Parameters:
| Draggable | |
suspendEvents( Boolean queueSuspended )
:
voidSuspend the firing of all events. (see resumeEvents) Suspend the firing of all events. (see resumeEvents) Parameters:
| Observable | |
un( String eventName , Function handler , [Object scope ] )
:
voidRemoves an event handler (shorthand for removeListener.) Removes an event handler (shorthand for removeListener.) Parameters:
| Observable |
Event | Defined By | |
---|---|---|
bouncestart :
( Ext.util.Scroller this , Object info )
Listeners will be called with the following arguments:
| Scroller | |
bouncestart :
( Ext.util.Scroller this , Object info )
Listeners will be called with the following arguments:
| Scroller | |
offsetchange :
( Ext.Draggable this , Ext.util.Offset offset )
Listeners will be called with the following arguments:
| Draggable | |
scroll :
( Ext.util.Scroller this , Object offsets )
Listeners will be called with the following arguments:
| Scroller | |
scrollend :
( Ext.util.Scroller this , Object offsets )
Listeners will be called with the following arguments:
| Scroller | |
scrollstart :
( Ext.util.Scroller this , Ext.EventObject e )
Listeners will be called with the following arguments:
| Scroller |