cleanup
This commit is contained in:
parent
2852638c45
commit
2d9225326c
1 changed files with 2 additions and 20 deletions
|
|
@ -37,8 +37,6 @@ var event = require("./lib/event");
|
||||||
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* A set of methods for setting and retrieving the editor's scrollbar.
|
* A set of methods for setting and retrieving the editor's scrollbar.
|
||||||
* @class ScrollBar
|
* @class ScrollBar
|
||||||
**/
|
**/
|
||||||
|
|
@ -47,9 +45,6 @@ var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
||||||
* Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.
|
* Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.
|
||||||
* @param {DOMElement} parent A DOM element
|
* @param {DOMElement} parent A DOM element
|
||||||
*
|
*
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @constructor
|
* @constructor
|
||||||
**/
|
**/
|
||||||
var ScrollBar = function(parent) {
|
var ScrollBar = function(parent) {
|
||||||
|
|
@ -62,8 +57,8 @@ var ScrollBar = function(parent) {
|
||||||
|
|
||||||
parent.appendChild(this.element);
|
parent.appendChild(this.element);
|
||||||
|
|
||||||
// in OSX lion the scrollbars appear to have no width. In this case resize
|
// in OSX lion the scrollbars appear to have no width. In this case resize the
|
||||||
// the to show the scrollbar but still pretend that the scrollbar has a width
|
// element to show the scrollbar but still pretend that the scrollbar has a width
|
||||||
// of 0px
|
// of 0px
|
||||||
// in Firefox 6+ scrollbar is hidden if element has the same width as scrollbar
|
// in Firefox 6+ scrollbar is hidden if element has the same width as scrollbar
|
||||||
// make element a little bit wider to retain scrollbar when page is zoomed
|
// make element a little bit wider to retain scrollbar when page is zoomed
|
||||||
|
|
@ -80,9 +75,6 @@ var ScrollBar = function(parent) {
|
||||||
* Emitted when the scroll bar, well, scrolls.
|
* Emitted when the scroll bar, well, scrolls.
|
||||||
* @event scroll
|
* @event scroll
|
||||||
* @param {Object} e Contains one property, `"data"`, which indicates the current scroll top position
|
* @param {Object} e Contains one property, `"data"`, which indicates the current scroll top position
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
this.onScroll = function() {
|
this.onScroll = function() {
|
||||||
if (!this.skipEvent) {
|
if (!this.skipEvent) {
|
||||||
|
|
@ -93,7 +85,6 @@ var ScrollBar = function(parent) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Returns the width of the scroll bar.
|
* Returns the width of the scroll bar.
|
||||||
* @returns {Number}
|
* @returns {Number}
|
||||||
**/
|
**/
|
||||||
|
|
@ -104,9 +95,6 @@ var ScrollBar = function(parent) {
|
||||||
/**
|
/**
|
||||||
* Sets the height of the scroll bar, in pixels.
|
* Sets the height of the scroll bar, in pixels.
|
||||||
* @param {Number} height The new height
|
* @param {Number} height The new height
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
this.setHeight = function(height) {
|
this.setHeight = function(height) {
|
||||||
this.element.style.height = height + "px";
|
this.element.style.height = height + "px";
|
||||||
|
|
@ -115,9 +103,6 @@ var ScrollBar = function(parent) {
|
||||||
/**
|
/**
|
||||||
* Sets the inner height of the scroll bar, in pixels.
|
* Sets the inner height of the scroll bar, in pixels.
|
||||||
* @param {Number} height The new inner height
|
* @param {Number} height The new inner height
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
this.setInnerHeight = function(height) {
|
this.setInnerHeight = function(height) {
|
||||||
this.inner.style.height = height + "px";
|
this.inner.style.height = height + "px";
|
||||||
|
|
@ -129,9 +114,6 @@ var ScrollBar = function(parent) {
|
||||||
/**
|
/**
|
||||||
* Sets the scroll top of the scroll bar.
|
* Sets the scroll top of the scroll bar.
|
||||||
* @param {Number} scrollTop The new scroll top
|
* @param {Number} scrollTop The new scroll top
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
this.setScrollTop = function(scrollTop) {
|
this.setScrollTop = function(scrollTop) {
|
||||||
if (this.scrollTop != scrollTop) {
|
if (this.scrollTop != scrollTop) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue