blob: 3913a8a8c0584d674bbee7964ccf706714cf7f56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/**
* @file custom-control-spacer.js
*/
import Spacer from './spacer.js';
import Component from '../../component.js';
/**
* Spacer specifically meant to be used as an insertion point for new plugins, etc.
*
* @extends Spacer
*/
class CustomControlSpacer extends Spacer {
/**
* Builds the default DOM `className`.
*
* @return {string}
* The DOM `className` for this object.
*/
buildCSSClass() {
return `vjs-custom-control-spacer ${super.buildCSSClass()}`;
}
/**
* Create the `Component`'s DOM element
*
* @return {Element}
* The element that was created.
*/
createEl() {
return super.createEl('div', {
className: this.buildCSSClass(),
// No-flex/table-cell mode requires there be some content
// in the cell to fill the remaining space of the table.
textContent: '\u00a0'
});
}
}
Component.registerComponent('CustomControlSpacer', CustomControlSpacer);
export default CustomControlSpacer;
|