|
@ -92,12 +92,28 @@ Core.prototype._create = function (container) { |
|
|
this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); |
|
|
this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); |
|
|
|
|
|
|
|
|
this.on('rangechange', this.redraw.bind(this)); |
|
|
this.on('rangechange', this.redraw.bind(this)); |
|
|
this.on('change', this.redraw.bind(this)); |
|
|
|
|
|
this.on('touch', this._onTouch.bind(this)); |
|
|
this.on('touch', this._onTouch.bind(this)); |
|
|
this.on('pinch', this._onPinch.bind(this)); |
|
|
this.on('pinch', this._onPinch.bind(this)); |
|
|
this.on('dragstart', this._onDragStart.bind(this)); |
|
|
this.on('dragstart', this._onDragStart.bind(this)); |
|
|
this.on('drag', this._onDrag.bind(this)); |
|
|
this.on('drag', this._onDrag.bind(this)); |
|
|
|
|
|
|
|
|
|
|
|
var me = this; |
|
|
|
|
|
this.on('change', function (properties) { |
|
|
|
|
|
if (properties && properties.queue == true) { |
|
|
|
|
|
// redraw once on next tick
|
|
|
|
|
|
if (!me._redrawTimer) { |
|
|
|
|
|
me._redrawTimer = setTimeout(function () { |
|
|
|
|
|
me._redrawTimer = null; |
|
|
|
|
|
me.redraw(); |
|
|
|
|
|
}, 0) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
// redraw immediately
|
|
|
|
|
|
me.redraw(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// create event listeners for all interesting events, these events will be
|
|
|
// create event listeners for all interesting events, these events will be
|
|
|
// emitted via emitter
|
|
|
// emitted via emitter
|
|
|
this.hammer = Hammer(this.dom.root, { |
|
|
this.hammer = Hammer(this.dom.root, { |
|
@ -105,7 +121,6 @@ Core.prototype._create = function (container) { |
|
|
}); |
|
|
}); |
|
|
this.listeners = {}; |
|
|
this.listeners = {}; |
|
|
|
|
|
|
|
|
var me = this; |
|
|
|
|
|
var events = [ |
|
|
var events = [ |
|
|
'touch', 'pinch', |
|
|
'touch', 'pinch', |
|
|
'tap', 'doubletap', 'hold', |
|
|
'tap', 'doubletap', 'hold', |
|
|