mfenced.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 __values = (this && this.__values) || function(o) {
  18. var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  19. if (m) return m.call(o);
  20. if (o && typeof o.length === "number") return {
  21. next: function () {
  22. if (o && i >= o.length) o = void 0;
  23. return { value: o && o[i++], done: !o };
  24. }
  25. };
  26. throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
  27. };
  28. Object.defineProperty(exports, "__esModule", { value: true });
  29. exports.SVGmfenced = void 0;
  30. var Wrapper_js_1 = require("../Wrapper.js");
  31. var mfenced_js_1 = require("../../common/Wrappers/mfenced.js");
  32. var mfenced_js_2 = require("../../../core/MmlTree/MmlNodes/mfenced.js");
  33. var SVGmfenced = (function (_super) {
  34. __extends(SVGmfenced, _super);
  35. function SVGmfenced() {
  36. return _super !== null && _super.apply(this, arguments) || this;
  37. }
  38. SVGmfenced.prototype.toSVG = function (parent) {
  39. var svg = this.standardSVGnode(parent);
  40. this.setChildrenParent(this.mrow);
  41. this.mrow.toSVG(svg);
  42. this.setChildrenParent(this);
  43. };
  44. SVGmfenced.prototype.setChildrenParent = function (parent) {
  45. var e_1, _a;
  46. try {
  47. for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
  48. var child = _c.value;
  49. child.parent = parent;
  50. }
  51. }
  52. catch (e_1_1) { e_1 = { error: e_1_1 }; }
  53. finally {
  54. try {
  55. if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
  56. }
  57. finally { if (e_1) throw e_1.error; }
  58. }
  59. };
  60. SVGmfenced.kind = mfenced_js_2.MmlMfenced.prototype.kind;
  61. return SVGmfenced;
  62. }((0, mfenced_js_1.CommonMfencedMixin)(Wrapper_js_1.SVGWrapper)));
  63. exports.SVGmfenced = SVGmfenced;
  64. //# sourceMappingURL=mfenced.js.map