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