ScrollBar

优质
小牛编辑
127浏览
2023-12-01

A set of methods for setting and retrieving the editor's scrollbar.

Constructors

Creates a new ScrollBar. parent is the owner of the scroll bar.

parentDOMElementRequired. A DOM element

Events

  • ScrollBar.on("scroll", function(Object e))

Emitted when the scroll bar, well, scrolls.

eObjectRequired. Contains one property, "data", which indicates the current scroll top position

Methods

  • ScrollBar.getWidth()
  • 返回值: Number

Returns the width of the scroll bar.

  • ScrollBar.onScroll()
  • Undocumented
  • ScrollBar.setHeight(Number height)

Sets the height of the scroll bar, in pixels.

heightNumberRequired. The new height
  • ScrollBar.setInnerHeight(Number height)

Sets the inner height of the scroll bar, in pixels.

heightNumberRequired. The new inner height
  • ScrollBar.setScrollTop(Number scrollTop)

Sets the scroll top of the scroll bar.

scrollTopNumberRequired. The new scroll top