mspace.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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.CommonMspaceMixin = void 0;
  19. function CommonMspaceMixin(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. class_1.prototype.computeBBox = function (bbox, _recompute) {
  26. if (_recompute === void 0) { _recompute = false; }
  27. var attributes = this.node.attributes;
  28. bbox.w = this.length2em(attributes.get('width'), 0);
  29. bbox.h = this.length2em(attributes.get('height'), 0);
  30. bbox.d = this.length2em(attributes.get('depth'), 0);
  31. };
  32. class_1.prototype.handleVariant = function () {
  33. };
  34. return class_1;
  35. }(Base));
  36. }
  37. exports.CommonMspaceMixin = CommonMspaceMixin;
  38. //# sourceMappingURL=mspace.js.map