|
@ -29,6 +29,7 @@ Emitter(Core.prototype); |
|
|
*/ |
|
|
*/ |
|
|
Core.prototype._create = function (container) { |
|
|
Core.prototype._create = function (container) { |
|
|
this.dom = {}; |
|
|
this.dom = {}; |
|
|
|
|
|
this.options = {}; |
|
|
|
|
|
|
|
|
this.dom.container = container; |
|
|
this.dom.container = container; |
|
|
|
|
|
|
|
@ -91,7 +92,7 @@ Core.prototype._create = function (container) { |
|
|
this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); |
|
|
this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); |
|
|
|
|
|
|
|
|
this.on('rangechange', function () { |
|
|
this.on('rangechange', function () { |
|
|
if (this.initialDrawDone) { |
|
|
|
|
|
|
|
|
if (this.initialDrawDone === true) { |
|
|
this._redraw(); // this allows overriding the _redraw method
|
|
|
this._redraw(); // this allows overriding the _redraw method
|
|
|
} |
|
|
} |
|
|
}.bind(this)); |
|
|
}.bind(this)); |
|
@ -226,6 +227,7 @@ Core.prototype.setOptions = function (options) { |
|
|
]; |
|
|
]; |
|
|
util.selectiveExtend(fields, this.options, options); |
|
|
util.selectiveExtend(fields, this.options, options); |
|
|
|
|
|
|
|
|
|
|
|
this.options.orientation = {item:undefined,axis:undefined}; |
|
|
if ('orientation' in options) { |
|
|
if ('orientation' in options) { |
|
|
if (typeof options.orientation === 'string') { |
|
|
if (typeof options.orientation === 'string') { |
|
|
this.options.orientation = { |
|
|
this.options.orientation = { |
|
@ -986,7 +988,6 @@ Core.prototype._onDrag = function (event) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (newScrollTop != oldScrollTop) { |
|
|
if (newScrollTop != oldScrollTop) { |
|
|
this._redraw(); // TODO: this causes two redraws when dragging, the other is triggered by rangechange already
|
|
|
|
|
|
this.emit("verticalDrag"); |
|
|
this.emit("verticalDrag"); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|