• Topic
  • Discussion
  • OATWikiWeb.OATDOCrotator(Last) -- Owiki? , 2016-08-19 14:58:52 Edit owiki 2016-08-19 14:58:52

    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();
    

    Referenced by...