dojox/widget/AutoRotator (version 1.10)

dojox/widget/Rotator

Summary

A rotator that automatically transitions between child nodes.

Adds automatic rotating to the dojox.widget.Rotator. The AutoRotator has parameters that control how user input can affect the rotator including a suspend when hovering over the rotator and pausing when the user manually advances to another pane.

Usage

var foo = new AutoRotator();
dojox/widget/AutoRotator

See the dojox/widget/AutoRotator reference documentation for more information.

Examples

Example 1

<div dojoType="dojox.widget.AutoRotator" duration="3000">
    <div>
        Pane 1!
    </div>
    <div duration="5000">
        Pane 2 with an overrided duration!
    </div>
</div>

Property Summary

  • autoStartStarts the timer to transition children upon creation.
  • cyclesNumber of cycles before pausing.
  • durationThe time in milliseconds before transitioning to the next pane.
  • panesArray of panes to be created in the Rotator.
  • pauseOnManualChangePause the rotator when the pane is changed or a controller&#39;s next or previous buttons are clicked.
  • randomDetermines if the panes should cycle randomly.
  • reverseCauses the rotator to rotate in reverse order.
  • suspendOnHoverPause the rotator when the mouse hovers over it.
  • transitionThe name of a function that is passed two panes nodes and a duration, then returns a dojo.Animation object.
  • transitionParamsParameters for the transition.

Method Summary

  • _cycle(manual) Cycles the rotator to the next/previous pane.
  • _now() Helper function to return the current system time in milliseconds.
  • _resetTimer() Resets the timer used to schedule the next transition.
  • _resetWaitForEvent() If there is a waitForEvent pending, kill it.
  • control(action) Dispatches an action, first to this engine, then to the Rotator.
  • destroy() Disconnect the AutoRotator's events.
  • go(p) Transitions the Rotator to the specified pane index.
  • next() Transitions the Rotator to the next pane.
  • pause() Sets the state to "not playing" and clears the cycle timer.
  • play(skipCycleDecrement,skipDuration) Sets the state to "playing" and schedules the next cycle to run.
  • prev() Transitions the Rotator to the previous pane.
  • resize(width,height)

Event Summary

  • onManualChange(action) Override the Rotator's onManualChange so we can pause.
  • onUpdate(type,params) Send a notification to all controllers with the state of the rotator.

Properties

autoStart

Starts the timer to transition children upon creation.

cycles

Number of cycles before pausing.

duration

The time in milliseconds before transitioning to the next pane. The default value is 4000 (4 seconds).

panes
Defined by: dojox/widget/Rotator

Array of panes to be created in the Rotator. Each array element will be passed as attributes to a html.create() call.

pauseOnManualChange

Pause the rotator when the pane is changed or a controller's next or previous buttons are clicked.

random

Determines if the panes should cycle randomly.

reverse

Causes the rotator to rotate in reverse order.

suspendOnHover

Pause the rotator when the mouse hovers over it.

transition
Defined by: dojox/widget/Rotator

The name of a function that is passed two panes nodes and a duration, then returns a dojo.Animation object. The default value is "dojox.widget.rotator.swap".

transitionParams
Defined by: dojox/widget/Rotator

Parameters for the transition. The string is read in and eval'd as an object. If the duration is absent, the default value will be used.

Methods

_cycle(manual)

Cycles the rotator to the next/previous pane.

Parameter Type Description
manual Boolean | int
Optional
_now()

Helper function to return the current system time in milliseconds.

Returns:undefined
_resetTimer()

Resets the timer used to schedule the next transition.

_resetWaitForEvent()

If there is a waitForEvent pending, kill it.

control(action)

Dispatches an action, first to this engine, then to the Rotator.

Parameter Type Description
action string
destroy()

Disconnect the AutoRotator's events.

go(p)

Transitions the Rotator to the specified pane index.

Parameter Type Description
p int | string
Optional
Returns:null
next()

Transitions the Rotator to the next pane.

Returns:undefined
pause()

Sets the state to "not playing" and clears the cycle timer.

play(skipCycleDecrement,skipDuration)

Sets the state to "playing" and schedules the next cycle to run.

Parameter Type Description
skipCycleDecrement Boolean
Optional
skipDuration Boolean
Optional
prev()

Transitions the Rotator to the previous pane.

Returns:undefined
resize(width,height)
Parameter Type Description
width int
height int

Events

onManualChange(action)

Override the Rotator's onManualChange so we can pause.

Parameter Type Description
action string

Examples

Example 1

<div dojoType="dojox.widget.AutoRotator" duration="3000">
    <div>
        Pane 1!
    </div>
    <div duration="5000">
        Pane 2 with an overrided duration!
    </div>
</div>
onUpdate(type,params)
Defined by: dojox/widget/Rotator

Send a notification to all controllers with the state of the rotator.

Parameter Type Description
type string
params object
Optional

Examples

Example 1

<div dojoType="dojox.widget.AutoRotator" duration="3000">
    <div>
        Pane 1!
    </div>
    <div duration="5000">
        Pane 2 with an overrided duration!
    </div>
</div>
Error in the documentation? Can’t find what you are looking for? Let us know!