scriptbase.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. var __read = (this && this.__read) || function (o, n) {
  18. var m = typeof Symbol === "function" && o[Symbol.iterator];
  19. if (!m) return o;
  20. var i = m.call(o), r, ar = [], e;
  21. try {
  22. while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  23. }
  24. catch (error) { e = { error: error }; }
  25. finally {
  26. try {
  27. if (r && !r.done && (m = i["return"])) m.call(i);
  28. }
  29. finally { if (e) throw e.error; }
  30. }
  31. return ar;
  32. };
  33. Object.defineProperty(exports, "__esModule", { value: true });
  34. exports.SVGscriptbase = void 0;
  35. var Wrapper_js_1 = require("../Wrapper.js");
  36. var scriptbase_js_1 = require("../../common/Wrappers/scriptbase.js");
  37. var SVGscriptbase = (function (_super) {
  38. __extends(SVGscriptbase, _super);
  39. function SVGscriptbase() {
  40. return _super !== null && _super.apply(this, arguments) || this;
  41. }
  42. SVGscriptbase.prototype.toSVG = function (parent) {
  43. var svg = this.standardSVGnode(parent);
  44. var w = this.getBaseWidth();
  45. var _a = __read(this.getOffset(), 2), x = _a[0], v = _a[1];
  46. this.baseChild.toSVG(svg);
  47. this.scriptChild.toSVG(svg);
  48. this.scriptChild.place(w + x, v);
  49. };
  50. SVGscriptbase.kind = 'scriptbase';
  51. return SVGscriptbase;
  52. }((0, scriptbase_js_1.CommonScriptbaseMixin)(Wrapper_js_1.SVGWrapper)));
  53. exports.SVGscriptbase = SVGscriptbase;
  54. //# sourceMappingURL=scriptbase.js.map