Zebra API Doc

zebra.ui.ScrollManager Class

Scroll manager class.

Constructor

zebra.ui.ScrollManager

(
  • t
)

Parameters:

Methods

getSX

() Integer

Get current target component x scroll location


Return: Integer

a x scroll location

getSY

() Integer

Get current target component y scroll location


Return: Integer

a y scroll location

makeVisible

(
  • x
  • y
  • w
  • h
)

Make visible the given rectangular area of the scrolled target component

Parameters:

  • x Integer

    a x coordinate of top left corner of the rectangular area

  • y Integer

    a y coordinate of top left corner of the rectangular area

  • w Integer

    a width of the rectangular area

  • h Integer

    a height of the rectangular area

scrollTo

(
  • x
  • y
)

Scroll the target component into the specified location

Parameters:

  • x Integer

    a x location

  • y Integer

    a y location

scrollXTo

(
  • v
)

Set a target component scroll x location to the specified value

Parameters:

  • v Integer

    a x scroll location

scrollYTo

(
  • v
)

Set a target component scroll y location to the specified value

Parameters:

  • v Integer

    a y scroll location

Attributes

target

zebra.ui.Panel readonly

Target UI component for that the scroll manager has been instantiated

Events

scrolled

Fired when a target component has been scrolled

   scrollManager.bind(function(px, py) {
       ...
   });

Event Parameters:

  • px Integer

    a previous x location target component scroll location

  • py Integer

    a previous y location target component scroll location

scrollStateUpdated

Fired when a scroll state has been updated

   scrollManager.scrollStateUpdated = function(x, y, px, py) {
       ...
   };

Event Parameters:

  • x Integer

    a new x location target component scroll location

  • y Integer

    a new y location target component scroll location

  • px Integer

    a previous x location target component scroll location

  • py Integer

    a previous y location target component scroll location