hoeditor-web 3.3.6-beta.11 → 3.3.6-beta.12

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-CiWuavNG.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-aSg440zH.mjs";
3
3
  export {
4
4
  i as HoDocs,
5
5
  r as HoEditorProvide,
@@ -10525,10 +10525,7 @@ class DrawCell extends DrawRect {
10525
10525
  return;
10526
10526
  const [o, n] = this._cell.table.getCellInfos(this._cell);
10527
10527
  if (this._cell.table.rowInfos[o].rowProperty.repeatAsTitleAtPageTop)
10528
- this.drawPageCells.splice(
10529
- r.table.drawTable.drawPageTables.length,
10530
- this.drawPageCells.length
10531
- );
10528
+ this.drawPageCells.splice(r.table.drawTable.drawPageTables.length, this.drawPageCells.length);
10532
10529
  else {
10533
10530
  const s = this.getDrawPageCell(r);
10534
10531
  if (s) {
@@ -10585,18 +10582,7 @@ class DrawCell extends DrawRect {
10585
10582
  const m = this._cell.drawCell.calcCellHeight(), g = Math.min(s, m);
10586
10583
  this._cell.cellProperty.align === VAlign.vatop ? u = 0 : this._cell.cellProperty.align === VAlign.vacenter && g > this._cell.drawCell.docHeight ? u = (g - this._cell.drawCell.docHeight) / 2 : this._cell.cellProperty.align === VAlign.vabottom && m > this._cell.drawCell.docHeight && (u = m - this._cell.drawCell.docHeight);
10587
10584
  }
10588
- const f = r, p = new DrawPageCell(
10589
- this._hoEditorFactoryID,
10590
- f,
10591
- this._cell,
10592
- c,
10593
- o,
10594
- d,
10595
- n,
10596
- this._drawPageCells.length,
10597
- l,
10598
- s
10599
- );
10585
+ const f = r, p = new DrawPageCell(this._hoEditorFactoryID, f, this._cell, c, o, d, n, this._drawPageCells.length, l, s);
10600
10586
  p.x = c, p.y = o, r.drawItems.push(p), r.addChild(p), this.drawPageCells.push(p), p.paintArea(this._drawLines, l, u), p.valignTop = u;
10601
10587
  }
10602
10588
  clear() {
@@ -10615,6 +10601,7 @@ class DrawCell extends DrawRect {
10615
10601
  }
10616
10602
  updateHeight() {
10617
10603
  let r = !0;
10604
+ if (!this.drawLines.length) return;
10618
10605
  const o = this.drawLines[this.drawLines.length - 1].paragraphNode, n = this.drawLines[0].paragraphNode;
10619
10606
  this.docHeight = o.dTop + o.dHeight - n.dTop + n.combineParagraph.topMarginPixes;
10620
10607
  const [s, l] = this._cell.table.getCellInfos(this._cell);
@@ -23044,7 +23031,7 @@ WebPDecoder.prototype.getData = function() {
23044
23031
  (function(a) {
23045
23032
  function t() {
23046
23033
  return function() {
23047
- return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-D-DaXvBQ.mjs");
23034
+ return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-BoBJasEJ.mjs");
23048
23035
  }().catch(function(r) {
23049
23036
  return Promise.reject(new Error("Could not load canvg: " + r));
23050
23037
  }).then(function(r) {
@@ -24344,7 +24331,7 @@ class DrawSignNode extends DrawCombineNode {
24344
24331
  const _ = !!(C && (C.isDisplayTitle == "true" || C.isDisplayTitle == !0)), D = !!(C && (C.isDisplayTime == "true" || C.isDisplayTime == !0));
24345
24332
  this.attribute === 4 && (_ ? this._title == "" && (this._title = this._abi02) : this._title = "", D ? this._timePosition = C && C.timePosition ? C.timePosition : "" : this._signTime = ""), this._title != "" && (this._drawTitle = new createjs$1.Text(this.title + this._connectChar, this._textStyle, "#000000")), this._signTime != "" && (this.attribute === 4 ? this._drawDate = new createjs$1.Text(this.signTime, this._textStyle, "#000000") : this._drawDate = new createjs$1.Text(this.signTime.substring(0, 16), this._textStyle, "#000000"));
24346
24333
  const E = HOEditorFactorys.instance().getFactory(r);
24347
- if (this.dHeight = E.signHeight, f == 0 && (f = E.signHeight), this.isSignOpinion() && f > 0 && (this.dHeight = f), n.customProperty && n.customProperty.vaq01 && ((d.includes("data:image/") || d.split("/").length > 1) && l == 3 ? (n.type = 1, this.type = 1) : !d.includes("data:image/") && !d.includes("/") && l == 3 && (n.type = 2, this.type = 2)), this.number > 0 && this.type === 2) {
24334
+ if (this.dHeight = E.signHeight, f == 0 && (f = E.signHeight), this.isSignOpinion() && f > 0 && (this.dHeight = f, E.patientSignOpinionWidth != 0 && u > 0 && (this.dHeight = E.patientSignOpinionWidth * (f / u))), n.customProperty && n.customProperty.vaq01 && ((d.includes("data:image/") || d.split("/").length > 1) && l == 3 ? (n.type = 1, this.type = 1) : !d.includes("data:image/") && !d.includes("/") && l == 3 && (n.type = 2, this.type = 2)), this.number > 0 && this.type === 2) {
24348
24335
  const T = d.split(`
24349
24336
  `);
24350
24337
  T.length > 1 && (this.dHeight = HOEditorFactorys.instance().getFactory(r).signHeight * T.length);
@@ -24464,6 +24451,11 @@ class DrawSignNode extends DrawCombineNode {
24464
24451
  let l = 1;
24465
24452
  return r > n && (l = n / r), o * l > s && (l = Math.min(l, s / o)), l;
24466
24453
  }
24454
+ /** 签名意见图片异步加载完成后,刷新所在行高度并让后续内容下移,避免图片高度超出这一行或与后续内容重叠 */
24455
+ refreshParentLineHeight() {
24456
+ const o = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawLineByDNode(this);
24457
+ o instanceof DrawLine && (o.fitLines(), o.updateLineStyle());
24458
+ }
24467
24459
  drawSignNodeAfter() {
24468
24460
  const r = this, o = HOEditorFactorys.instance().getFactory(r.node.hoEditorFactoryID), n = o.drawPageTree.getMainRootArea(r);
24469
24461
  if (n) {
@@ -24504,7 +24496,7 @@ class DrawSignNode extends DrawCombineNode {
24504
24496
  const f = () => {
24505
24497
  const p = d.naturalWidth !== 0 ? d.naturalWidth : d.width, m = d.naturalHeight !== 0 ? d.naturalHeight : d.height;
24506
24498
  let g = n.signHeight / m < 0.4 ? 0.4 : n.signHeight / m > 0.7 ? 1 : n.signHeight / m;
24507
- if (o.fingerPosition == FingerPosition.center && n.signHeight / m < 0.2 && (g = n.signHeight * 1.5 / m), n.patientSignHeight != 0 && (g = n.patientSignHeight / m), this.isSignOpinion() && (g = 1, r.parentNode instanceof CellNode || (g = this.fitToPageScale(p, m)), n.patientSignOpinionHeight != 0 && (g = n.patientSignOpinionHeight / m), this._dHeight = m * g), this._dWidth = p * g, o.fingerPrintSrc !== "")
24499
+ if (o.fingerPosition == FingerPosition.center && n.signHeight / m < 0.2 && (g = n.signHeight * 1.5 / m), n.patientSignHeight != 0 && (g = n.patientSignHeight / m), this.isSignOpinion() && (g = 1, r.parentNode instanceof CellNode || (g = this.fitToPageScale(p, m)), n.patientSignOpinionWidth != 0 && (g = n.patientSignOpinionWidth / p), this._dHeight = m * g), this._dWidth = p * g, o.fingerPrintSrc !== "")
24508
24500
  this._imageManager.addImageQueue(this, () => new Promise(async (y) => {
24509
24501
  const w = new Image();
24510
24502
  let v;
@@ -24528,7 +24520,7 @@ class DrawSignNode extends DrawCombineNode {
24528
24520
  } else
24529
24521
  r.imgWidth = this.dWidth, this.isSignOpinion() ? r.imgHeight = m * g : r.imgHeight = n.signHeight, this.isSignOpinion() ? u.setTransform(0, -m * g, g, g) : u.setTransform(0, -(m * g + l) / 2, g, g);
24530
24522
  }
24531
- c(o);
24523
+ this.isSignOpinion() && this.refreshParentLineHeight(), c(o);
24532
24524
  };
24533
24525
  n.drawTree.paintStatus === PaintState$1.psPreview && n.isFixPrint ? setTimeout(() => f(), this._imageManager.THROTTLE_DELAY) : f();
24534
24526
  };
@@ -24634,7 +24626,7 @@ class DrawSignNode extends DrawCombineNode {
24634
24626
  }
24635
24627
  }
24636
24628
  }
24637
- const version = "3.3.6-beta.11";
24629
+ const version = "3.3.6-beta.12";
24638
24630
  var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
24639
24631
  class SignNode extends BaseNode {
24640
24632
  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, associatedPatientElement, isTemp, innerIdentifier) {
@@ -73038,8 +73030,8 @@ class HOEditorFactory {
73038
73030
  // 患者签名签字图片高度
73039
73031
  b(this, "_patientFingerHeight", 0);
73040
73032
  // 患者指纹签名高度
73041
- b(this, "_patientSignOpinionHeight", 0);
73042
- // 患者签名意见高度
73033
+ b(this, "_patientSignOpinionWidth", 0);
73034
+ // 患者签名意见宽度
73043
73035
  b(this, "_superiorSigns", []);
73044
73036
  //上级医生签名之前的内容不允许编辑修改(云his)
73045
73037
  b(this, "_forbidEditBeforeSign", !1);
@@ -73419,11 +73411,11 @@ class HOEditorFactory {
73419
73411
  set patientFingerHeight(t) {
73420
73412
  this._patientFingerHeight !== t && (this._patientFingerHeight = t);
73421
73413
  }
73422
- get patientSignOpinionHeight() {
73423
- return this._patientSignOpinionHeight;
73414
+ get patientSignOpinionWidth() {
73415
+ return this._patientSignOpinionWidth;
73424
73416
  }
73425
- set patientSignOpinionHeight(t) {
73426
- this._patientSignOpinionHeight !== t && (this._patientSignOpinionHeight = t);
73417
+ set patientSignOpinionWidth(t) {
73418
+ this._patientSignOpinionWidth !== t && (this._patientSignOpinionWidth = t);
73427
73419
  }
73428
73420
  get pasteBase() {
73429
73421
  return this._pasteBase;
@@ -1,4 +1,4 @@
1
- import { c as Da, _ as Va, g as il } from "./index-CiWuavNG.mjs";
1
+ import { c as Da, _ as Va, g as il } from "./index-aSg440zH.mjs";
2
2
  var fn = {}, cn = {}, cr, vn;
3
3
  function Q() {
4
4
  if (vn) return cr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hoeditor-web",
3
- "version": "3.3.6-beta.11",
3
+ "version": "3.3.6-beta.12",
4
4
  "private": false,
5
5
  "main": "lib/hoeditor.mjs",
6
6
  "typings": "types/index.d.ts",