|
@ -77,8 +77,22 @@ CustomTime.prototype._create = function() { |
|
|
drag.style.left = '-10px'; |
|
|
drag.style.left = '-10px'; |
|
|
drag.style.height = '100%'; |
|
|
drag.style.height = '100%'; |
|
|
drag.style.width = '20px'; |
|
|
drag.style.width = '20px'; |
|
|
bar.appendChild(drag); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function onMouseWheel (e) { |
|
|
|
|
|
this.body.range._onMouseWheel(e); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (drag.addEventListener) { |
|
|
|
|
|
// IE9, Chrome, Safari, Opera
|
|
|
|
|
|
drag.addEventListener("mousewheel", onMouseWheel.bind(this), false); |
|
|
|
|
|
// Firefox
|
|
|
|
|
|
drag.addEventListener("DOMMouseScroll", onMouseWheel.bind(this), false); |
|
|
|
|
|
} else { |
|
|
|
|
|
// IE 6/7/8
|
|
|
|
|
|
drag.attachEvent("onmousewheel", onMouseWheel.bind(this)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bar.appendChild(drag); |
|
|
// attach event listeners
|
|
|
// attach event listeners
|
|
|
this.hammer = new Hammer(drag); |
|
|
this.hammer = new Hammer(drag); |
|
|
this.hammer.on('panstart', this._onDragStart.bind(this)); |
|
|
this.hammer.on('panstart', this._onDragStart.bind(this)); |
|
|