ScrollBar
优质
小牛编辑
127浏览
2023-12-01
A set of methods for setting and retrieving the editor's scrollbar.
Constructors
- new ScrollBar(DOMElement parent)
Creates a new ScrollBar
. parent
is the owner of the scroll bar.
parent | DOMElement | Required. A DOM element |
Events
- ScrollBar.on("scroll", function(Object e))
Emitted when the scroll bar, well, scrolls.
e | Object | Required. 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.
height | Number | Required. The new height |
- ScrollBar.setInnerHeight(Number height)
Sets the inner height of the scroll bar, in pixels.
height | Number | Required. The new inner height |
- ScrollBar.setScrollTop(Number scrollTop)
Sets the scroll top of the scroll bar.
scrollTop | Number | Required. The new scroll top |