mirror of
https://github.com/videojs/video.js.git
synced 2025-01-27 11:22:06 +02:00
Added a class for when slider is "sliding"
This commit is contained in:
parent
14c64f197f
commit
3da12eba29
@ -48,6 +48,7 @@ vjs.Slider.prototype.createEl = function(type, props) {
|
|||||||
vjs.Slider.prototype.onMouseDown = function(event){
|
vjs.Slider.prototype.onMouseDown = function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
vjs.blockTextSelection();
|
vjs.blockTextSelection();
|
||||||
|
this.addClass('vjs-sliding');
|
||||||
|
|
||||||
this.boundEvents.move = vjs.bind(this, this.onMouseMove);
|
this.boundEvents.move = vjs.bind(this, this.onMouseMove);
|
||||||
this.boundEvents.end = vjs.bind(this, this.onMouseUp);
|
this.boundEvents.end = vjs.bind(this, this.onMouseUp);
|
||||||
@ -62,6 +63,8 @@ vjs.Slider.prototype.onMouseDown = function(event){
|
|||||||
|
|
||||||
vjs.Slider.prototype.onMouseUp = function() {
|
vjs.Slider.prototype.onMouseUp = function() {
|
||||||
vjs.unblockTextSelection();
|
vjs.unblockTextSelection();
|
||||||
|
this.removeClass('vjs-sliding');
|
||||||
|
|
||||||
vjs.off(document, 'mousemove', this.boundEvents.move, false);
|
vjs.off(document, 'mousemove', this.boundEvents.move, false);
|
||||||
vjs.off(document, 'mouseup', this.boundEvents.end, false);
|
vjs.off(document, 'mouseup', this.boundEvents.end, false);
|
||||||
vjs.off(document, 'touchmove', this.boundEvents.move, false);
|
vjs.off(document, 'touchmove', this.boundEvents.move, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user