item_label.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. "use strict";
  2. var __extends = (this && this.__extends) || (function () {
  3. var extendStatics = function (d, b) {
  4. extendStatics = Object.setPrototypeOf ||
  5. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  6. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  7. return extendStatics(d, b);
  8. };
  9. return function (d, b) {
  10. extendStatics(d, b);
  11. function __() { this.constructor = d; }
  12. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  13. };
  14. })();
  15. Object.defineProperty(exports, "__esModule", { value: true });
  16. exports.Label = void 0;
  17. var abstract_item_js_1 = require("./abstract_item.js");
  18. var html_classes_js_1 = require("./html_classes.js");
  19. var Label = (function (_super) {
  20. __extends(Label, _super);
  21. function Label(menu, content, id) {
  22. return _super.call(this, menu, 'label', content, id) || this;
  23. }
  24. Label.fromJson = function (_factory, _a, menu) {
  25. var content = _a.content, id = _a.id;
  26. return new this(menu, content, id);
  27. };
  28. Label.prototype.generateHtml = function () {
  29. _super.prototype.generateHtml.call(this);
  30. var html = this.html;
  31. html.classList.add(html_classes_js_1.HtmlClasses['MENULABEL']);
  32. };
  33. Label.prototype.toJson = function () {
  34. return { type: ''
  35. };
  36. };
  37. return Label;
  38. }(abstract_item_js_1.AbstractItem));
  39. exports.Label = Label;
  40. //# sourceMappingURL=item_label.js.map