abstract_variable_item.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.AbstractVariableItem = void 0;
  17. var abstract_item_js_1 = require("./abstract_item.js");
  18. var AbstractVariableItem = (function (_super) {
  19. __extends(AbstractVariableItem, _super);
  20. function AbstractVariableItem() {
  21. return _super !== null && _super.apply(this, arguments) || this;
  22. }
  23. AbstractVariableItem.prototype.generateHtml = function () {
  24. _super.prototype.generateHtml.call(this);
  25. var html = this.html;
  26. if (!this.span) {
  27. this.generateSpan();
  28. }
  29. html.appendChild(this.span);
  30. this.update();
  31. };
  32. AbstractVariableItem.prototype.register = function () {
  33. this.variable.register(this);
  34. };
  35. AbstractVariableItem.prototype.unregister = function () {
  36. this.variable.unregister(this);
  37. };
  38. AbstractVariableItem.prototype.update = function () {
  39. this.updateAria();
  40. if (this.span) {
  41. this.updateSpan();
  42. }
  43. };
  44. return AbstractVariableItem;
  45. }(abstract_item_js_1.AbstractItem));
  46. exports.AbstractVariableItem = AbstractVariableItem;
  47. //# sourceMappingURL=abstract_variable_item.js.map