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