mtd.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
  7. return extendStatics(d, b);
  8. };
  9. return function (d, b) {
  10. if (typeof b !== "function" && b !== null)
  11. throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  12. extendStatics(d, b);
  13. function __() { this.constructor = d; }
  14. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  15. };
  16. })();
  17. Object.defineProperty(exports, "__esModule", { value: true });
  18. exports.CommonMtdMixin = void 0;
  19. function CommonMtdMixin(Base) {
  20. return (function (_super) {
  21. __extends(class_1, _super);
  22. function class_1() {
  23. return _super !== null && _super.apply(this, arguments) || this;
  24. }
  25. Object.defineProperty(class_1.prototype, "fixesPWidth", {
  26. get: function () {
  27. return false;
  28. },
  29. enumerable: false,
  30. configurable: true
  31. });
  32. class_1.prototype.invalidateBBox = function () {
  33. this.bboxComputed = false;
  34. };
  35. class_1.prototype.getWrapWidth = function (_j) {
  36. var table = this.parent.parent;
  37. var row = this.parent;
  38. var i = this.node.childPosition() - (row.labeled ? 1 : 0);
  39. return (typeof (table.cWidths[i]) === 'number' ? table.cWidths[i] : table.getTableData().W[i]);
  40. };
  41. class_1.prototype.getChildAlign = function (_i) {
  42. return this.node.attributes.get('columnalign');
  43. };
  44. return class_1;
  45. }(Base));
  46. }
  47. exports.CommonMtdMixin = CommonMtdMixin;
  48. //# sourceMappingURL=mtd.js.map