aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/controls.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2017-12-20 15:14:05 +0000
committerSam Potts <sam@potts.es>2017-12-20 15:14:05 +0000
commit6864149989c6a5b1bb6e9199e1f8af062c64dcc4 (patch)
tree283649e596f5a81780fabe3603bb0be7d0d47485 /src/js/controls.js
parentaab53fa91fded2babdef8c3529a0ff1203f92f97 (diff)
downloadplyr-6864149989c6a5b1bb6e9199e1f8af062c64dcc4.tar.lz
plyr-6864149989c6a5b1bb6e9199e1f8af062c64dcc4.tar.xz
plyr-6864149989c6a5b1bb6e9199e1f8af062c64dcc4.zip
Converted to SASS/SCSS
Diffstat (limited to 'src/js/controls.js')
-rw-r--r--src/js/controls.js33
1 files changed, 28 insertions, 5 deletions
diff --git a/src/js/controls.js b/src/js/controls.js
index 1bbe10d3..8138367e 100644
--- a/src/js/controls.js
+++ b/src/js/controls.js
@@ -46,7 +46,10 @@ const controls = {
}
// Insert new one
- styleSheet.insertRule([selector, styles].join(' '));
+ styleSheet.insertRule([
+ selector,
+ styles,
+ ].join(' '));
},
// Get icon URL
@@ -417,7 +420,10 @@ const controls = {
// Show/hide the tooltip
// If the event is a moues in/out and percentage is inside bounds
- if (utils.is.event(event) && ['mouseenter', 'mouseleave'].includes(event.type)) {
+ if (utils.is.event(event) && [
+ 'mouseenter',
+ 'mouseleave',
+ ].includes(event.type)) {
utils.toggleClass(this.elements.display.seekTooltip, visible, event.type === 'mouseenter');
}
},
@@ -701,7 +707,15 @@ const controls = {
// Set the default speeds
if (!utils.is.object(this.options.speed) || !Object.keys(this.options.speed).length) {
- this.options.speed = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
+ this.options.speed = [
+ 0.5,
+ 0.75,
+ 1,
+ 1.25,
+ 1.5,
+ 1.75,
+ 2,
+ ];
}
// Set options if passed and filter based on config
@@ -841,7 +855,10 @@ const controls = {
// Restore auto height/width
const restore = e => {
// We're only bothered about height and width on the container
- if (e.target !== container || !['width', 'height'].includes(e.propertyName)) {
+ if (e.target !== container || ![
+ 'width',
+ 'height',
+ ].includes(e.propertyName)) {
return;
}
@@ -1211,7 +1228,13 @@ const controls = {
if (this.config.tooltips.controls) {
const labels = utils.getElements.call(
this,
- [this.config.selectors.controls.wrapper, ' ', this.config.selectors.labels, ' .', this.config.classNames.hidden].join('')
+ [
+ this.config.selectors.controls.wrapper,
+ ' ',
+ this.config.selectors.labels,
+ ' .',
+ this.config.classNames.hidden,
+ ].join('')
);
Array.from(labels).forEach(label => {