diff --git a/lib/timeline/component/CustomTime.js b/lib/timeline/component/CustomTime.js index fcdff5de..63963abe 100644 --- a/lib/timeline/component/CustomTime.js +++ b/lib/timeline/component/CustomTime.js @@ -77,8 +77,22 @@ CustomTime.prototype._create = function() { drag.style.left = '-10px'; drag.style.height = '100%'; 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 this.hammer = new Hammer(drag); this.hammer.on('panstart', this._onDragStart.bind(this)); diff --git a/lib/timeline/component/css/currenttime.css b/lib/timeline/component/css/currenttime.css index 46c7b9c3..7d3547a1 100644 --- a/lib/timeline/component/css/currenttime.css +++ b/lib/timeline/component/css/currenttime.css @@ -2,4 +2,5 @@ background-color: #FF7F6E; width: 2px; z-index: 1; + pointer-events: none; } \ No newline at end of file