Index | OAT homepage | OpenLink Software

# OATDOCrotator

- OATDOCrotator
- _ _ rotator.js
- _ _ _ _ Objects
- _ _ _ _ _ _ OAT.Rotator(panelX, panelY, options, callback)
- _ _ _ _ Methods
- _ _ _ _ _ _ OAT.Rotator.addPanel(element)
- _ _ _ _ _ _ OAT.Rotator.start()
- _ _ _ _ Constants
- _ _ _ _ _ _ OAT.RotatorData.TYPE_
- _ _ _ _ CSS classes
- _ _ _ _ _ _ .rotator
- _ _ _ _ Example

## rotator.js

Creates a set of 'rotating' elements, which are cyclically displayed in an infinite fashion (1, 2, 3, 1, 2 ...).

### Objects

#### OAT.Rotator(panelX, panelY, options, callback)

Creates the `Rotator` object. Its elements will have width of `panelX` and height of `panelY` . `Callback` will be executed every time rotation pauses. Parameter `options` is an object of the following properties:

- `delay` - rotation speed (number)
- `step` - animation smoothness (number)
- `numLeft` - how many elements should be rotated before shifting the first one to the end (number)
- `pause` - delay after one animation round (number)
- `type` - `OAT.RotatorData.TYPE_` constant, specifies an animation direction (see Constants section)

### Methods

#### OAT.Rotator.addPanel(element)

Adds a new `element` to rotating set.

#### OAT.Rotator.start()

Starts the rotation process.

### Constants

#### OAT.RotatorData.TYPE_

- `OAT.RotatorData.TYPE_LEFT`
  - ToBeDone
- `OAT.RotatorData.TYPE_RIGHT`
  - ToBeDone
- `OAT.RotatorData.TYPE_BOTTOM`
  - ToBeDone
- `OAT.RotatorData.TYPE_TOP`
  - ToBeDone

### CSS classes

#### .rotator

ToBeDone

### Example

    var r = new OAT.Rotator(200, 200, {type:OAT.Rotator.TYPE_RIGHT}, function(){});
    r.addPanel("div1");
    r.addPanel("div2");
    r.addPanel("div3");
    r.start();

Copyright (C) 2005-2008 OpenLink Software