hoeditor-web 3.2.21 → 3.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/hoeditor.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { H as i, d as r, b as e, a as l, e as t, T as H, f as d, i as f } from "./index-C1pE6q5X.mjs";
2
+ import { H as i, d as r, b as e, a as l, e as t, T as H, f as d, i as f } from "./index-BXRP9ydh.mjs";
3
3
  export {
4
4
  i as HoDocs,
5
5
  r as HoEditorProvide,
@@ -14897,7 +14897,7 @@ class DrawSignNode extends DrawCombineNode {
14897
14897
  }
14898
14898
  }
14899
14899
  }
14900
- const version = "3.2.21";
14900
+ const version = "3.2.23";
14901
14901
  var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
14902
14902
  class SignNode extends BaseNode {
14903
14903
  constructor(hoEditorFactoryID, rootNodes, pNode, nodeType, number, type, name, signType, signFormat, signor, signTime, signTimeFormat, imgSrc, imgWidth, imgHeight, customProperty, isTemplate, styleIndex, connectMode, isFront, allowEditSignTime, fingerPrintSrc, fingerPosition, attribute, connectChar, otherProperties, dataId, associatedElement, isTemp, innerIdentifier) {
@@ -20835,9 +20835,17 @@ class DrawMedicalExpression extends DrawCombineNode {
20835
20835
  }
20836
20836
  drawPermanentTeeth() {
20837
20837
  let r = this._arrValues[0].split(",").join(""), o = this._arrValues[1].split(",").join(""), n = this._arrValues[2].split(",").join(""), s = this._arrValues[3].split(",").join(""), l = this._textStyle.color, c = this._textStyle.color, d = this._textStyle.color, u = this._textStyle.color;
20838
- this.node.remark == "teeth" && (r == "" && (r = "右上牙位", l = "#9B9E9E"), o == "" && (o = "左上牙位", c = "#9B9E9E"), n == "" && (n = "右下牙位", d = "#9B9E9E"), s == "" && (s = "左下牙位", u = "#9B9E9E"));
20838
+ const f = this.node.remark;
20839
+ f == "teeth" && (r == "" && (r = "右上牙位", l = "#9B9E9E"), o == "" && (o = "左上牙位", c = "#9B9E9E"), n == "" && (n = "右下牙位", d = "#9B9E9E"), s == "" && (s = "左下牙位", u = "#9B9E9E"));
20839
20840
  const p = new createjs$1.Text(r, this._textStyle.getStyleKey(), l), m = new createjs$1.Text(o, this._textStyle.getStyleKey(), c), g = new createjs$1.Text(n, this._textStyle.getStyleKey(), d), y = new createjs$1.Text(s, this._textStyle.getStyleKey(), u), w = new createjs$1.Shape(), v = new createjs$1.Shape(), C = Math.max(p.getMeasuredWidth(), m.getMeasuredWidth()) + Math.max(g.getMeasuredWidth(), y.getMeasuredWidth()) + 15, _ = Math.max(p.getMeasuredWidth() + m.getMeasuredWidth(), g.getMeasuredWidth() + y.getMeasuredWidth()) + 15, S = Math.max(C, _), E = Math.max(p.getMeasuredHeight(), g.getMeasuredHeight()) + Math.max(m.getMeasuredHeight(), y.getMeasuredHeight()) + 15, T = Math.max(p.getMeasuredWidth(), g.getMeasuredWidth());
20840
- this.dWidth = S, this.dHeight < E && (this.dHeight = E), w.graphics.beginStroke(this._textStyle.color).moveTo(0, -this._dHeight / 2).lineTo(this.dWidth, -this._dHeight / 2).endStroke(), v.graphics.beginStroke(this._textStyle.color).moveTo(T + 6 - 0.5, -this._dHeight).lineTo(T + 6 - 0.5, 0).endStroke(), p.y = -this.dHeight / 2 - p.getMeasuredHeight() / 2, p.x = 4, p.textAlign = "left", p.textBaseline = "alphabetic", m.y = p.y, m.x = T + 6 + 2, m.textAlign = "left", m.textBaseline = "alphabetic", g.y = -3, g.x = 4, g.textAlign = "left", g.textBaseline = "alphabetic", y.y = g.y, y.x = m.x, y.textAlign = "left", y.textBaseline = "alphabetic", this.addChild(p), this.addChild(m), this.addChild(w), this.addChild(g), this.addChild(y), this.addChild(v);
20841
+ if (this.dWidth = S, this.dHeight < E && (this.dHeight = E), w.graphics.beginStroke(this._textStyle.color).moveTo(0, -this._dHeight / 2).lineTo(this.dWidth, -this._dHeight / 2).endStroke(), v.graphics.beginStroke(this._textStyle.color).moveTo(T + 6 - 0.5, -this._dHeight).lineTo(T + 6 - 0.5, 0).endStroke(), f == "teeth") {
20842
+ const I = T / 2, M = (S - (T + 6 + 2)) / 2;
20843
+ p.y = -this.dHeight / 2 - p.getMeasuredHeight() / 2, p.x = I, p.textAlign = "center", p.textBaseline = "alphabetic", m.y = p.y, m.x = T + 6 + 2 + M, m.textAlign = "center", m.textBaseline = "alphabetic", g.y = -3, g.x = I, g.textAlign = "center", g.textBaseline = "alphabetic", y.y = g.y, y.x = m.x, y.textAlign = "center", y.textBaseline = "alphabetic";
20844
+ } else {
20845
+ const I = "center";
20846
+ p.y = -this.dHeight / 2 - p.getMeasuredHeight() / 2, p.x = 4, p.textAlign = I, p.textBaseline = "alphabetic", m.y = p.y, m.x = T + 6 + 2, m.textAlign = I, m.textBaseline = "alphabetic", g.y = -3, g.x = 4, g.textAlign = I, g.textBaseline = "alphabetic", y.y = g.y, y.x = m.x, y.textAlign = I, y.textBaseline = "alphabetic";
20847
+ }
20848
+ this.addChild(p), this.addChild(m), this.addChild(w), this.addChild(g), this.addChild(y), this.addChild(v);
20841
20849
  }
20842
20850
  drawPrimaryTeeth() {
20843
20851
  if (this._arrValues[0].split(",").length > 0)
@@ -27195,7 +27203,7 @@ class Print {
27195
27203
  }
27196
27204
  }
27197
27205
  static async printPage(t) {
27198
- const r = document.createElement("iframe"), o = new Promise((n, s) => {
27206
+ const r = (window.top || window).document.createElement("iframe"), o = new Promise((n, s) => {
27199
27207
  r.onload = function() {
27200
27208
  var l, c;
27201
27209
  try {
@@ -27205,7 +27213,7 @@ class Print {
27205
27213
  }
27206
27214
  };
27207
27215
  });
27208
- r.id = "Ho_Editor_Print_Iframe", r.style.position = "fixed", r.style.right = "0", r.style.bottom = "0", r.style.width = "0", r.style.height = "0", r.style.border = "0", r.src = t.output("bloburl"), document.body.appendChild(r), await o;
27216
+ r.id = "Ho_Editor_Print_Iframe", r.style.position = "fixed", r.style.right = "0", r.style.bottom = "0", r.style.width = "0", r.style.height = "0", r.style.border = "0", r.src = t.output("bloburl"), (window.top || window).document.body.appendChild(r), await o;
27209
27217
  }
27210
27218
  static async printHTMLPage(t, r) {
27211
27219
  const o = document.createElement("iframe"), n = new Promise((s, l) => {
@@ -64100,7 +64108,7 @@ WebPDecoder.prototype.getData = function() {
64100
64108
  (function(a) {
64101
64109
  function t() {
64102
64110
  return function() {
64103
- return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-DZiMpOo6.mjs");
64111
+ return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-Clw7yHl5.mjs");
64104
64112
  }().catch(function(r) {
64105
64113
  return Promise.reject(new Error("Could not load canvg: " + r));
64106
64114
  }).then(function(r) {
@@ -1,4 +1,4 @@
1
- import { c as Ma, _ as qa, g as Zu } from "./index-C1pE6q5X.mjs";
1
+ import { c as Ma, _ as qa, g as Zu } from "./index-BXRP9ydh.mjs";
2
2
  var un = {}, ln = {}, lr, hn;
3
3
  function Z() {
4
4
  if (hn) return lr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hoeditor-web",
3
- "version": "3.2.21",
3
+ "version": "3.2.23",
4
4
  "private": false,
5
5
  "main": "lib/hoeditor.mjs",
6
6
  "typings": "types/index.d.ts",