hoeditor-web 3.1.166 → 3.1.167

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.
@@ -7847,7 +7847,7 @@ var component = (0,componentNormalizer/* default */.Z)(
7847
7847
 
7848
7848
  /***/ }),
7849
7849
 
7850
- /***/ 98064:
7850
+ /***/ 33693:
7851
7851
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7852
7852
 
7853
7853
  "use strict";
@@ -7859,7 +7859,7 @@ __webpack_require__.d(__webpack_exports__, {
7859
7859
  "default": function() { return /* binding */ FindReplace; }
7860
7860
  });
7861
7861
 
7862
- ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/findReplace/FindReplace.vue?vue&type=template&id=4253b228&
7862
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/findReplace/FindReplace.vue?vue&type=template&id=3e1097a1&
7863
7863
  var render = function render() {
7864
7864
  var _vm = this,
7865
7865
  _c = _vm._self._c;
@@ -7893,6 +7893,7 @@ var render = function render() {
7893
7893
  "color": "#000"
7894
7894
  }
7895
7895
  }, [_vm._v("查找内容")]), _c('a-input', {
7896
+ ref: "findInput",
7896
7897
  attrs: {
7897
7898
  "type": "text"
7898
7899
  },
@@ -8047,7 +8048,13 @@ var HOEditorFactorys = __webpack_require__(74089);
8047
8048
  };
8048
8049
  },
8049
8050
  mounted: function mounted() {
8051
+ var _this = this;
8050
8052
  this.findModal = this.$refs.findModal;
8053
+ this.$nextTick(function () {
8054
+ if (_this.$refs.findInput) {
8055
+ _this.$refs.findInput.focus();
8056
+ }
8057
+ });
8051
8058
  },
8052
8059
  methods: {
8053
8060
  switchTypes: function switchTypes(val) {
@@ -8067,7 +8074,8 @@ var HOEditorFactorys = __webpack_require__(74089);
8067
8074
  },
8068
8075
  toReplace: function toReplace() {
8069
8076
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this.hoEditorFactoryId);
8070
- if (this.path === '' || this.path === '-1') {
8077
+ // this.path = hoEditorFactory.vueController.find(this.findContent, this.direction, this.matchCase);
8078
+ if (!this.path || this.path === '-1') {
8071
8079
  if (this.callbackCount <= 2) {
8072
8080
  this.callbackCount++;
8073
8081
  this.toFind(this.toReplace);
@@ -8087,11 +8095,11 @@ var HOEditorFactorys = __webpack_require__(74089);
8087
8095
  this.path = '';
8088
8096
  },
8089
8097
  handleClose: function handleClose() {
8090
- var _this = this;
8098
+ var _this2 = this;
8091
8099
  this.animationClassNames = 'control-modal-contents find-modal animation-out';
8092
8100
  window.clearTimeout();
8093
8101
  setTimeout(function () {
8094
- _this.hoEditorProvider.setControlFindType('');
8102
+ _this2.hoEditorProvider.setControlFindType('');
8095
8103
  }, 100);
8096
8104
  },
8097
8105
  toolModalDown: function toolModalDown(e) {
@@ -8101,10 +8109,10 @@ var HOEditorFactorys = __webpack_require__(74089);
8101
8109
  });
8102
8110
  ;// CONCATENATED MODULE: ./src/components/controls/findReplace/FindReplace.vue?vue&type=script&lang=js&
8103
8111
  /* harmony default export */ var findReplace_FindReplacevue_type_script_lang_js_ = (FindReplacevue_type_script_lang_js_);
8104
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/findReplace/FindReplace.vue?vue&type=style&index=0&id=4253b228&prod&lang=less&
8112
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/findReplace/FindReplace.vue?vue&type=style&index=0&id=3e1097a1&prod&lang=less&
8105
8113
  // extracted by mini-css-extract-plugin
8106
8114
 
8107
- ;// CONCATENATED MODULE: ./src/components/controls/findReplace/FindReplace.vue?vue&type=style&index=0&id=4253b228&prod&lang=less&
8115
+ ;// CONCATENATED MODULE: ./src/components/controls/findReplace/FindReplace.vue?vue&type=style&index=0&id=3e1097a1&prod&lang=less&
8108
8116
 
8109
8117
  // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
8110
8118
  var componentNormalizer = __webpack_require__(70713);
@@ -33281,16 +33289,7 @@ var Caret = /*#__PURE__*/function () {
33281
33289
  return this._visible;
33282
33290
  },
33283
33291
  set: function set(val) {
33284
- // if (val !== this._visible) {
33285
33292
  this.div_cursor.style.visibility = val ? 'visible' : 'hidden';
33286
- // this._visible = val;
33287
- // if (this.cursor) {
33288
- // this.cursor.visible = this.visible;
33289
- // if (this.cursor.stage) {
33290
- // this.cursor.stage.update();
33291
- // }
33292
- // }
33293
- // }
33294
33293
  }
33295
33294
  }, {
33296
33295
  key: "cursor",
@@ -37412,23 +37411,7 @@ var SubDocManger = /*#__PURE__*/function () {
37412
37411
  _dPage.reFreshBounds();
37413
37412
  hoEditorFactory.drawPageTree.updateDrawPage(_dPage.pageIndex);
37414
37413
  }
37415
- // e.newActiveArea.drawLines.length = 0;
37416
- // e.newActiveArea.removeAllChildren();
37417
- // e.newActiveArea.stage.update();
37418
- // const [dRoots, path] = hoEditorFactory.drawTree.getFooterDNodes(
37419
- // e.newPageIndex
37420
- // );
37421
- // if (dRoots)
37422
- // hoEditorFactory.redrawManger.addRedrawRange(
37423
- // null,
37424
- // 0,
37425
- // dRoots,
37426
- // 0,
37427
- // dRoots.length - 1,
37428
- // path
37429
- // );
37430
37414
  }
37431
-
37432
37415
  return true;
37433
37416
  }
37434
37417
  }, {
@@ -37442,14 +37425,6 @@ var SubDocManger = /*#__PURE__*/function () {
37442
37425
  return HeaderFooterType.hftUnkown;
37443
37426
  }
37444
37427
  }
37445
- // public updateAllPageMark(pageIndex: number, type: HeaderFooterType) {
37446
- // const [index, roots] = this.getSubDocIndex(pageIndex, type);
37447
- // const path = hoEditorFactory.docTree.getRootPathByNodes(roots);
37448
- // const arr = hoEditorFactory.drawTree.getSubDocPageMarkNodes(path);
37449
- // for (let i = 0; i < arr.length; i++) {
37450
- // this.updateAPageMark(arr[i]);
37451
- // }
37452
- // }
37453
37428
  // /**
37454
37429
  // * @author xyl
37455
37430
  // * @param markNode
@@ -37459,36 +37434,6 @@ var SubDocManger = /*#__PURE__*/function () {
37459
37434
  key: "updateAPageMark",
37460
37435
  value: function updateAPageMark(markNode) {
37461
37436
  markNode.drawNodes[0].updatePaint();
37462
- // const strPath = markNode.getNodePath();
37463
- // const rootArea = hoEditorFactory.drawTree.getParentDrawArea(
37464
- // markNode.drawNodes[0]
37465
- // );
37466
- // const dArea = hoEditorFactory.drawPageTree.getMainRootArea(
37467
- // markNode.drawNodes[0]
37468
- // );
37469
- // const type = this.getHeaderFooterType(strPath);
37470
- // if (dArea) {
37471
- // const [start, end] = this.getAllSameSubDocRange(dArea.index, type, false);
37472
- // for (let i = start; i <= end; i++) {
37473
- // const aPage = hoEditorFactory.drawTree.drawPages[i];
37474
- // const subDoc = this.getSubDocDrawArea(i, type);
37475
- // if (subDoc) {
37476
- // (subDoc as DrawPageHeaderFooter).removePageMarkDrawNode(markNode);
37477
- // const dPageMarkNode = DrawPageMarkNode.paintMarkNode(
37478
- // this._hoEditorFactory,
37479
- // markNode,
37480
- // aPage,
37481
- // subDoc
37482
- // );
37483
- // (subDoc as DrawPageHeaderFooter).drawPageMarks.push(dPageMarkNode);
37484
- // aPage.drawDomLevel?.stage.addChild(dPageMarkNode);
37485
- // if (aPage.drawDomLevel)
37486
- // hoEditorFactory.drawPageTree.updateStage(
37487
- // aPage.drawDomLevel.stage
37488
- // );
37489
- // }
37490
- // }
37491
- // }
37492
37437
  }
37493
37438
  }, {
37494
37439
  key: "clearPageMarkNode",
@@ -37503,23 +37448,11 @@ var SubDocManger = /*#__PURE__*/function () {
37503
37448
  }, {
37504
37449
  key: "repaintPageMarkNodes",
37505
37450
  value: function repaintPageMarkNodes(dArea, type) {
37506
- // const [index,rootNodes]= this.getSubDocIndex(dArea.index,type);
37507
37451
  var strPath = dArea.rootPath;
37508
37452
  var arrNodes = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_16__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getSubDocPageMarkNodes(strPath);
37509
37453
  for (var i = arrNodes.length - 1; i >= 0; i--) {
37510
37454
  var aNode = arrNodes[i];
37511
37455
  aNode.drawNodes[0].repaintPageMarkNodes(dArea, type);
37512
- // (dArea as DrawPageHeaderFooter).removePageMarkDrawNode(aNode);
37513
- // const dPageMarkNode = DrawPageMarkNode.paintMarkNode(
37514
- // this._hoEditorFactory,
37515
- // aNode,
37516
- // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.drawPages[dArea.index],
37517
- // dArea
37518
- // );
37519
- // (dArea as DrawPageHeaderFooter).drawPageMarks.push(dPageMarkNode);
37520
- // if (dArea.stage) {
37521
- // dArea.stage.addChild(dPageMarkNode);
37522
- // }
37523
37456
  }
37524
37457
  }
37525
37458
  }]);
@@ -40167,21 +40100,6 @@ var DocController = /*#__PURE__*/function () {
40167
40100
  hoEditorFactory.undoService.begin();
40168
40101
  hoEditorFactory.undoService.add(new _undoRedo_TableUndos_TableMergeCellUndoUnit__WEBPACK_IMPORTED_MODULE_73__/* .TableMergeCellUndoUnit */ .A(this._hoEditorFactoryID, cell1.table, r1, c1, aRowSpan, aColSpan));
40169
40102
  hoEditorFactory.undoService.commit();
40170
- // cell1.table.mergeCells(r1, c1, rowSpan, colSpan);
40171
- // const endPath = (cell1 as CellNode).table.getNodePath();
40172
- // const [dcell, dRoots] = hoEditorFactory.drawTree.getDrawRootsByPath(
40173
- // endPath
40174
- // );
40175
- // const startDline = dRoots.indexOf((cell1 as CellNode).table.drawTable);
40176
- // if (startDline >= 0) {
40177
- // hoEditorFactory.redrawManger.addRedrawRange(
40178
- // null,
40179
- // dRoots,
40180
- // startDline,
40181
- // dRoots.length - 1,
40182
- // endPath
40183
- // );
40184
- // }
40185
40103
  }
40186
40104
  }
40187
40105
  }
@@ -40630,8 +40548,8 @@ var DocController = /*#__PURE__*/function () {
40630
40548
  }
40631
40549
  this._count = 0;
40632
40550
  var getArr2 = hoEditorFactory.docTree.singleReplace(path, findContent, replaceContent);
40633
- var endPath2 = getArr2[0];
40634
- var newTextNode2 = getArr2[1];
40551
+ var endPath2 = getArr2[1];
40552
+ var newTextNode2 = getArr2[2];
40635
40553
  if (getArr2[3]) {
40636
40554
  hoEditorFactory.undoService.begin();
40637
40555
  hoEditorFactory.undoService.add(new _undoRedo_NodesDeleteUndoUnit__WEBPACK_IMPORTED_MODULE_43__/* .NodesDeleteUndoUnit */ .F(this._hoEditorFactoryID, path, endPath2));
@@ -41244,7 +41162,6 @@ var DocController = /*#__PURE__*/function () {
41244
41162
  }
41245
41163
  }
41246
41164
  }
41247
- //mainArea.stage.update();
41248
41165
  hoEditorFactory.drawPageTree.updateDrawPage(mainArea.index);
41249
41166
  } else {
41250
41167
  return;
@@ -43812,15 +43729,12 @@ var DocTree = /*#__PURE__*/function () {
43812
43729
  } else {
43813
43730
  var npEnd = this.findNodePositionByPath(ePath);
43814
43731
  if (npEnd && npEnd.node) {
43815
- //if (npEnd.node instanceof TextNode) {
43816
43732
  var _preNode = npEnd.node.previousLeaf();
43817
43733
  if (_preNode) {
43818
43734
  endPath = this.getNodeLastPath(_preNode);
43819
43735
  }
43820
- //}
43821
43736
  }
43822
43737
  }
43823
- // const parentNode = this.getParentNode(sPath);
43824
43738
  var node = this.getFindPathNode(sPath);
43825
43739
  if (node instanceof _treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_36__/* .TextInputFieldNode */ .re) {
43826
43740
  var textNode = new _treeNode_TextNode__WEBPACK_IMPORTED_MODULE_29__/* .TextNode */ .R(this._hoEditorFactoryID, np.roots, node, _treeNode_BaseNode__WEBPACK_IMPORTED_MODULE_26__/* .NodeType */ .Jq.ntText, replaceContent, styleIndex);
@@ -43833,6 +43747,11 @@ var DocTree = /*#__PURE__*/function () {
43833
43747
  } else if (node instanceof _treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_47__/* .DownListNode */ .yF) {
43834
43748
  var _hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_45__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
43835
43749
  _hoEditorFactory.elementController.updateDownListText(node, replaceContent);
43750
+ } else if (node instanceof _treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_28__/* .ParagraphNode */ .C || node instanceof _treeNode_TextNode__WEBPACK_IMPORTED_MODULE_29__/* .TextNode */ .R) {
43751
+ var _textNode = new _treeNode_TextNode__WEBPACK_IMPORTED_MODULE_29__/* .TextNode */ .R(this._hoEditorFactoryID, np.roots, null, _treeNode_BaseNode__WEBPACK_IMPORTED_MODULE_26__/* .NodeType */ .Jq.ntText, replaceContent, styleIndex);
43752
+ retArray[0] = startPath;
43753
+ retArray[1] = endPath;
43754
+ retArray[2] = _textNode;
43836
43755
  }
43837
43756
  return retArray;
43838
43757
  }
@@ -43906,6 +43825,12 @@ var DocTree = /*#__PURE__*/function () {
43906
43825
  _hoEditorFactory2.elementController.updateDownListText(snode, replaceContent);
43907
43826
  // retArray[2] = snode;
43908
43827
  retArray[3] = false;
43828
+ } else if (snode instanceof _treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_28__/* .ParagraphNode */ .C) {
43829
+ var _textNode2 = new _treeNode_TextNode__WEBPACK_IMPORTED_MODULE_29__/* .TextNode */ .R(this._hoEditorFactoryID, np.roots, null, _treeNode_BaseNode__WEBPACK_IMPORTED_MODULE_26__/* .NodeType */ .Jq.ntText, replaceContent, styleIndex);
43830
+ retArray[0] = startPath;
43831
+ retArray[1] = endPath;
43832
+ retArray[2] = _textNode2;
43833
+ retArray[3] = true;
43909
43834
  }
43910
43835
  return retArray;
43911
43836
  }
@@ -44215,7 +44140,7 @@ var DocTree = /*#__PURE__*/function () {
44215
44140
  if (!(np && np.node)) {
44216
44141
  throw _events_Exception__WEBPACK_IMPORTED_MODULE_42__/* .Exception */ .P.NodeNotFound();
44217
44142
  }
44218
- if (np.node instanceof _treeNode_DateTimeNode__WEBPACK_IMPORTED_MODULE_46__/* .DateTimeNode */ .Z || np.node instanceof _treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_47__/* .DownListNode */ .yF) {
44143
+ if (np.node instanceof _treeNode_DateTimeNode__WEBPACK_IMPORTED_MODULE_46__/* .DateTimeNode */ .Z || np.node instanceof _treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_47__/* .DownListNode */ .yF || np.node instanceof _treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_28__/* .ParagraphNode */ .C || np.node instanceof _treeNode_TextNode__WEBPACK_IMPORTED_MODULE_29__/* .TextNode */ .R) {
44219
44144
  return np.node;
44220
44145
  } else {
44221
44146
  node = np.node.parentNode;
@@ -55118,12 +55043,9 @@ var MarkNode = /*#__PURE__*/function (_BaseNode) {
55118
55043
  set: function set(val) {
55119
55044
  if (this._alpha != val) {
55120
55045
  this._alpha = val;
55121
- if (this._type == MarkNodeType.mtContent) {
55122
- // this.node2DrawNode();
55123
- } else {
55046
+ if (this._type == MarkNodeType.mtContent) {} else {
55124
55047
  if (this.drawNodes[0].parent && this.drawNodes[0].parent.stage) {
55125
55048
  this.drawNodes[0].alpha = this._alpha;
55126
- // (this.drawNodes[0].parent as DrawLine).updateCache();
55127
55049
  this.drawNodes[0].parent.stage.update();
55128
55050
  }
55129
55051
  }
@@ -56232,28 +56154,11 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56232
56154
  if (customProperty) {
56233
56155
  _this.setCustomProperty(customProperty);
56234
56156
  }
56235
- // this.node2DrawNode();
56236
56157
  return _this;
56237
56158
  }
56238
56159
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(ParagraphNode, [{
56239
56160
  key: "setCustomProperty",
56240
56161
  value: function setCustomProperty(customProperty, printAsSinglePage, forceChangeHeader) {
56241
- // const assignvalue = (target: any, source: any) => {
56242
- // Object.keys(source).forEach((value) => {
56243
- // if (typeof target[value] == "object") {
56244
- // if (Object.prototype.toString.call(source[value]) === "[object Object]") {
56245
- // assignvalue(target[value], source[value]);
56246
- // } else {
56247
- // if (source[value] !== "" && source[value] !== null) {
56248
- // assignvalue(target[value], eval("(" + source[value] + ")"));
56249
- // }
56250
- // }
56251
- // } else {
56252
- // target[value] = source[value];
56253
- // }
56254
- // });
56255
- // };
56256
- // assignvalue(this._customProperty, customProperty);
56257
56162
  if (customProperty) {
56258
56163
  this._customProperty = customProperty;
56259
56164
  }
@@ -56274,7 +56179,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56274
56179
  if (val != this._paraNo) {
56275
56180
  this._paraNo = val;
56276
56181
  this.combineParagraph = this.updateCombineParagraph();
56277
- // this.node2DrawNode();
56278
56182
  this._drawLines.forEach(function (value) {
56279
56183
  value.paragraphNode.combineParagraph.copyStyle(_this2.combineParagraph);
56280
56184
  });
@@ -63149,9 +63053,6 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
63149
63053
  for (var col = c; col < c + aColSpan; col++) {
63150
63054
  victimCell = this._rows[row][col];
63151
63055
  if (victimCell !== vampireCell && victimCell) {
63152
- // if (vampireCell.childNodes.length > 0) {
63153
- // vampireCell.childNodes.concat(victimCell.childNodes);
63154
- // }
63155
63056
  victimCell.drawCell.removeAllPartCell();
63156
63057
  this._rows[row][col] = undefined;
63157
63058
  }
@@ -63159,16 +63060,6 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
63159
63060
  }
63160
63061
  vampireCell.rowSpan = aRowSpan;
63161
63062
  vampireCell.colSpan = aColSpan;
63162
- // let aWidth = 0;
63163
- // for (let i = c; i <= c + vampireCell.colSpan - 1; i++) {
63164
- // aWidth += this._colInfos[i].colWidth;
63165
- // }
63166
- // vampireCell.updateWidth(aWidth);
63167
- // let aHeight = 0;
63168
- // for (let i = r; i <= r + vampireCell.rowSpan - 1; i++) {
63169
- // aHeight += this._rowInfos[i].rowHeight;
63170
- // }
63171
- // vampireCell.updateHeight(aHeight);
63172
63063
  this.countChildNodes();
63173
63064
  vampireCell.drawCell.needUpdate = true;
63174
63065
  return vampireCell;
@@ -71359,21 +71250,6 @@ var DrawResize = /*#__PURE__*/function () {
71359
71250
  changeEvent.oldDrawLines = new _SelectRange__WEBPACK_IMPORTED_MODULE_10__/* .SelectRange */ .E(this._hoEditorFactoryID).getRangeDrawLines(path, path, true, true);
71360
71251
  hoEditorFactory.docTree.change(changeEvent);
71361
71252
  hoEditorFactory.docTree.curDomRange.setSamePath(path);
71362
- //hoEditorFactory.drawTree.moveCaretToPath(path);
71363
- // const drawArea = hoEditorFactory.drawPageTree.getMainRootArea(this.drawNode);
71364
- // drawArea.changed = true;
71365
- // const redrawPositions = hoEditorFactory.drawTree.getDlineDrawRootLists(drawLine);
71366
- // //const startUpdateLine = hoEditorFactory.drawTree.getDlineRootDrawNode(drawLine as DrawLine);
71367
- // hoEditorFactory.drawPageTree.update(
71368
- // drawArea,
71369
- // redrawPositions[0].drawRoots,
71370
- // drawLine as DrawLine,
71371
- // redrawPositions[0].index,
71372
- // redrawPositions[0].drawRoots.length - 1
71373
- // );
71374
- // drawArea.stage.update();
71375
- //if (drawLine instanceof DrawLine) drawLine.updateCache();
71376
- //this.drawNode.stage.update();
71377
71253
  var dArea = hoEditorFactory.drawPageTree.getMainRootArea(this.drawNode);
71378
71254
  if (dArea) {
71379
71255
  hoEditorFactory.drawPageTree.updateDrawPage(dArea.index);
@@ -72397,7 +72273,7 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
72397
72273
  var startChildIndex = 0;
72398
72274
  var dHeadHeight = dTable.getHeadHeight();
72399
72275
  var dPageTable = dTable.getDrawTableByParentArea(this);
72400
- if (dHeadHeight + _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_23__/* .gDefaultRowHeight */ .dT > dRestHeight) {
72276
+ if (dHeadHeight + _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_23__/* .gDefaultRowHeight */ .dT > dRestHeight || !dTable.isFirstRowCanFit(dRestHeight)) {
72401
72277
  if (dPageTable) {
72402
72278
  dPageTable.parent.removeChild(dPageTable);
72403
72279
  }
@@ -72577,7 +72453,7 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
72577
72453
  // const pagePos = hoEditorFactory.drawTree.getDrawLinePagePos(dline);
72578
72454
  if (dline instanceof _drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_18__/* .DrawTable */ .t) {
72579
72455
  var dTable = dline;
72580
- if (dTable.getHeadHeight() + _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_23__/* .gDefaultRowHeight */ .dT > restHeight) {
72456
+ if (dTable.getHeadHeight() + _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_23__/* .gDefaultRowHeight */ .dT > restHeight || !dTable.isFirstRowCanFit(restHeight)) {
72581
72457
  isFull = true;
72582
72458
  this.clearOverDitem(dlines, nextDline);
72583
72459
  return [isFull, dTop, restHeight];
@@ -73905,7 +73781,6 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
73905
73781
  set: function set(val) {
73906
73782
  if (val !== this._dWidth) {
73907
73783
  this._dWidth = val;
73908
- // ((this as unknown) as DrawInfos).dWidth = val;
73909
73784
  }
73910
73785
  }
73911
73786
  }, {
@@ -73963,98 +73838,6 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
73963
73838
  }
73964
73839
  }
73965
73840
  }
73966
- // public update(
73967
- // index: number,
73968
- // dParent: DrawPageTable,
73969
- // startIndex: number,
73970
- // canSkipIndex: number,
73971
- // dTop: number,
73972
- // dRestHeight: number
73973
- // ): [DrawArea, number, number, number] {
73974
- // if (this._drawPageCells.length <= index) {
73975
- // throw new Error("需要先更新当前单元格的前一页绘制");
73976
- // }
73977
- // const dPageCell = this._drawPageCells[index];
73978
- // if (dPageCell) {
73979
- // for (let i = startIndex; i < this._drawLines.length; i++) {
73980
- // const dobj = this._drawLines[i];
73981
- // if (i > canSkipIndex && dobj.y === dTop) {
73982
- // break;
73983
- // }
73984
- // if (dobj instanceof DrawTable) {
73985
- // const adrawPageTable = dobj.getDrawTableByParentArea(
73986
- // dParent.pageIndex
73987
- // );
73988
- // if (
73989
- // dobj.needUpdate ||
73990
- // (adrawPageTable && adrawPageTable.dHeight + dTop > dRestHeight)
73991
- // ) {
73992
- // dobj.update(pageIndex, dPageCell, dTop, dRestHeight);
73993
- // }
73994
- // const drawPageTable = dobj.getDrawTableByParentArea(pageIndex);
73995
- // if (drawPageTable) {
73996
- // if (!dPageCell.contains(drawPageTable)) {
73997
- // dPageCell.addChild(drawPageTable);
73998
- // }
73999
- // drawPageTable.y = dTop;
74000
- // dTop +=
74001
- // drawPageTable.dHeight +
74002
- // drawPageTable.paragraphNode.combineParagraph.lineSpace;
74003
- // this._docHeight = dTop;
74004
- // this._dHeight = dTop;
74005
- // } else {
74006
- // //表格无法在此页摆下,放入下一页
74007
- // }
74008
- // } else {
74009
- // if (dTop + dobj.dHeight > dRestHeight) {
74010
- // const dTop = dPageCell.getParentHeadHeight();
74011
- // const dRestHeight =
74012
- // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawPageTree.getMainDoc(pageIndex + 1)
74013
- // .restHeight - dTop;
74014
- // const adParent = dParent.getPageTableByIndex(pageIndex);
74015
- // this.update(
74016
- // pageIndex + 1,
74017
- // adParent,
74018
- // i,
74019
- // canSkipIndex,
74020
- // dTop,
74021
- // dRestHeight
74022
- // );
74023
- // return;
74024
- // }
74025
- // if (!dPageCell.contains(dobj)) {
74026
- // dPageCell.addChild(dobj);
74027
- // }
74028
- // dTop += dobj.dHeight + dobj.paragraphNode.combineParagraph.lineSpace;
74029
- // this._docHeight = dTop;
74030
- // this._dHeight = dTop;
74031
- // }
74032
- // }
74033
- // }
74034
- // }
74035
- // public update() {
74036
- // let dHeight = 0;
74037
- // for (let i = 0; i < this._drawLines.length; i++) {
74038
- // dHeight += this._drawLines[i].dHeight;
74039
- // }
74040
- // this._dHeight = dHeight;
74041
- // const rowIndex = this._cell.table.rows.indexOf(this._cell.row);
74042
- // this._cell.table.drawTable.updateRow(rowIndex);
74043
- // }
74044
- // public clear() {
74045
- // for (const map of this._drawCells) {
74046
- // map[1].clear();
74047
- // }
74048
- // this._drawCells.clear();
74049
- // }
74050
- // public clearAfterPageNo(pageNo: number) {
74051
- // for (const map of this._drawCells) {
74052
- // if (map[0] >= pageNo) {
74053
- // map[1].clear();
74054
- // this._drawCells.delete(map[0]);
74055
- // }
74056
- // }
74057
- // }
74058
73841
  }, {
74059
73842
  key: "getCellRestHeight",
74060
73843
  value: function getCellRestHeight(index) {
@@ -74073,21 +73856,10 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
74073
73856
  key: "copyPaintCell",
74074
73857
  value: function copyPaintCell(destParent, r, dTop) {
74075
73858
  var dParent = destParent;
74076
- // if (!dParent)
74077
- // dParent = this._cell.table.drawTable.getDrawTableByParentArea(pageIndex);
74078
73859
  if (dParent) {
74079
- // const [irow, icol] = dParent.table.getCellRowCol(this._cell);
74080
- // let dPage: DrawPage | null = null;
74081
- // if (dParent.stage)
74082
- // dPage = this.cell.hoEditorFactory.drawTree.getDrawPageByDomStage(
74083
- // dParent.stage
74084
- // );
74085
- // if (dPage && dPage.pageIndex !== pageIndex) {
74086
73860
  var subDocArea = this._cell.drawCell._drawPageCells[0];
74087
73861
  var destArea = this._cell.drawCell.getDrawPageCell(dParent);
74088
73862
  if (subDocArea) {
74089
- // const dPage = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.drawPages[pageIndex];
74090
- // if (dPage && dPage.drawDomLevel) {
74091
73863
  var cc = subDocArea.clone(true);
74092
73864
  var destSubDocArea;
74093
73865
  if (destArea) {
@@ -74096,11 +73868,6 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
74096
73868
  if (!destParent.contains(destArea)) {
74097
73869
  destParent.addChild(destSubDocArea);
74098
73870
  }
74099
- // // dPage.drawDomLevel.stage.removeChild(destSubDocArea);
74100
- // cc.x = subDocArea.x;
74101
- // cc.y = subDocArea.y;
74102
- // destSubDocArea.addChild(cc);
74103
- // this.updateAllDlineStage(destSubDocArea, destSubDocArea.children, dPage);
74104
73871
  } else {
74105
73872
  destSubDocArea = new _DrawPageCell__WEBPACK_IMPORTED_MODULE_12__/* .DrawPageCell */ .k(this._hoEditorFactoryID, destParent, this._cell, subDocArea.dLeft, subDocArea.dTop, subDocArea.dWidth, subDocArea.dHeight, subDocArea.index, subDocArea.startDline, subDocArea.maxHeight, false);
74106
73873
  destParent.addChild(destSubDocArea);
@@ -74112,12 +73879,6 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
74112
73879
  if (tindex >= 0) {
74113
73880
  destSubDocArea.removeChildAt(tindex);
74114
73881
  }
74115
- // const index = subDocArea.getChildIndex(subDocArea.backImage);
74116
- // if (index >= 0){
74117
- // destSubDocArea.removeChildAt(index);
74118
- // }
74119
- // destSubDocArea.removeChildAt(0);
74120
- // destSubDocArea.drawLines = subDocArea.drawLines;
74121
73882
  destSubDocArea.dHeight = subDocArea.dHeight;
74122
73883
  destSubDocArea.dLeft = subDocArea.dLeft;
74123
73884
  destSubDocArea.dTop = dTop;
@@ -74132,21 +73893,15 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
74132
73893
  destSubDocArea.x = subDocArea.x;
74133
73894
  destSubDocArea.y = dTop;
74134
73895
  return destSubDocArea;
74135
- // dPage.drawDomLevel.stage.update();
74136
- // }
74137
73896
  }
74138
-
74139
73897
  return destArea;
74140
- // }
74141
73898
  }
74142
-
74143
73899
  return null;
74144
73900
  }
74145
73901
  }, {
74146
73902
  key: "paintCell",
74147
73903
  value: function paintCell(dParent, dTop, dHeight, maxHeight, startDline) {
74148
73904
  var ret = 0;
74149
- // let aTop = 0;
74150
73905
  var _this$_cell$getLeftWi = this._cell.getLeftWidth(),
74151
73906
  _this$_cell$getLeftWi2 = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_this$_cell$getLeftWi, 2),
74152
73907
  aleft = _this$_cell$getLeftWi2[0],
@@ -74164,36 +73919,7 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
74164
73919
  valignTop = aHeight - this._cell.drawCell.docHeight;
74165
73920
  }
74166
73921
  }
74167
- // if (this.drawPageCells.size > 0 && bContinuePaint) {
74168
- // const prevDCell = this._getDrawPageCellByPageIndex(pageIndex - 1);
74169
- // if (prevDCell) {
74170
- // // aTop += prevDCell.drawPageTable.getPageCellTop(this._cell);
74171
- // if (
74172
- // !prevDCell.lastDrawLine &&
74173
- // prevDCell.startDline >= this._drawLines.length
74174
- // ) {
74175
- // startDline = this._drawLines.length;
74176
- // } else if (prevDCell.lastDrawLine instanceof DrawLine) {
74177
- // startDline = this.drawLines.indexOf(prevDCell.lastDrawLine) + 1;
74178
- // } else if (prevDCell.lastDrawLine instanceof DrawPageTable) {
74179
- // startDline = this.drawLines.indexOf(
74180
- // (prevDCell.lastDrawLine as DrawPageTable).table.drawTable
74181
- // );
74182
- // if (
74183
- // (prevDCell.lastDrawLine as DrawPageTable).table.drawTable.isFinishedPaint(
74184
- // drawPage
74185
- // )
74186
- // ) {
74187
- // startDline += 1;
74188
- // }
74189
- // }
74190
- // }
74191
- // }
74192
- // if (!bContinuePaint) {
74193
- // startDline = this._drawLines.length;
74194
- // }
74195
73922
  var dPartTable = dParent;
74196
- //const cellRestHeight = this.getCellRestHeight(drawPage.pageIndex);
74197
73923
  var dPartCell = new _DrawPageCell__WEBPACK_IMPORTED_MODULE_12__/* .DrawPageCell */ .k(this._hoEditorFactoryID, dPartTable, this._cell, aleft, dTop, awidth, dHeight, this._drawPageCells.length, startDline, maxHeight);
74198
73924
  dPartCell.x = aleft;
74199
73925
  dPartCell.y = dTop;
@@ -74217,8 +73943,6 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
74217
73943
  });
74218
73944
  if (this._drawPageCells.length > 0) {
74219
73945
  this._drawPageCells[0].addChild(paraNode.drawlines[0]);
74220
- // paraNode.drawlines[0].x = paraNode.combineParagraph.leftMarginPixes;
74221
- // paraNode.drawlines[0].y = paraNode.combineParagraph.topMarginPixes;
74222
73946
  }
74223
73947
  }
74224
73948
  }
@@ -76749,23 +76473,7 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
76749
76473
  bret = _get$call2[0],
76750
76474
  aTop = _get$call2[1],
76751
76475
  aRestHeight = _get$call2[2];
76752
- // this._docHeight -= dTop;
76753
76476
  this.updateDHeight();
76754
- var _this$_cell$table$get = this._cell.table.getCellRowCol(this._cell),
76755
- _this$_cell$table$get2 = (0,slicedToArray/* default */.Z)(_this$_cell$table$get, 2),
76756
- r = _this$_cell$table$get2[0],
76757
- c = _this$_cell$table$get2[1];
76758
- // if (this._cell.table.rowInfos[r].rowProperty.repeatAsTitleAtPageTop) {
76759
- // const keyPages = this._cell.table.drawTable.drawPageTables.keys();
76760
- // let pageKey = keyPages.next();
76761
- // if (pageKey.value === pageIndex) {
76762
- // pageKey = keyPages.next();
76763
- // while (!pageKey.done) {
76764
- // this._cell.drawCell.copyPaintCell(pageKey.value, undefined, aTop);
76765
- // pageKey = keyPages.next();
76766
- // }
76767
- // }
76768
- // }
76769
76477
  return [bret, aTop, aRestHeight];
76770
76478
  }
76771
76479
  }, {
@@ -77116,10 +76824,10 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
77116
76824
  key: "paintCellAdress",
77117
76825
  value: function paintCellAdress(visible) {
77118
76826
  if (visible) {
77119
- var _this$_cell$table$get3 = this._cell.table.getCellInfos(this._cell),
77120
- _this$_cell$table$get4 = (0,slicedToArray/* default */.Z)(_this$_cell$table$get3, 2),
77121
- row = _this$_cell$table$get4[0],
77122
- col = _this$_cell$table$get4[1];
76827
+ var _this$_cell$table$get = this._cell.table.getCellInfos(this._cell),
76828
+ _this$_cell$table$get2 = (0,slicedToArray/* default */.Z)(_this$_cell$table$get, 2),
76829
+ row = _this$_cell$table$get2[0],
76830
+ col = _this$_cell$table$get2[1];
77123
76831
  var strRow = this._cell.table.colToStr(col + 1).toUpperCase();
77124
76832
  if (!this._fronAddress) {
77125
76833
  this._fronAddress = new DrawSimpleText/* DrawSimpleText */.b("", "18px Arial", "#111");
@@ -77295,10 +77003,10 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
77295
77003
  }, {
77296
77004
  key: "calcCellHeight",
77297
77005
  value: function calcCellHeight(restHeight) {
77298
- var _this$_cell$table$get5 = this._cell.table.getCellInfos(this._cell),
77299
- _this$_cell$table$get6 = (0,slicedToArray/* default */.Z)(_this$_cell$table$get5, 2),
77300
- row = _this$_cell$table$get6[0],
77301
- c = _this$_cell$table$get6[1];
77006
+ var _this$_cell$table$get3 = this._cell.table.getCellInfos(this._cell),
77007
+ _this$_cell$table$get4 = (0,slicedToArray/* default */.Z)(_this$_cell$table$get3, 2),
77008
+ row = _this$_cell$table$get4[0],
77009
+ c = _this$_cell$table$get4[1];
77302
77010
  var ret = 0;
77303
77011
  var hoeditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._cell.hoEditorFactoryID);
77304
77012
  var dTopArr = new Array();
@@ -77463,7 +77171,6 @@ var DrawPageMarkNode = /*#__PURE__*/function (_DrawCombineNode) {
77463
77171
  dPageMarkNodes.push(newMarkNode);
77464
77172
  hoEditorFactory.drawPageTree.updateDrawPage(dPage.pageIndex);
77465
77173
  }
77466
- // dPage.drawDomLevel.stage.update();
77467
77174
  } else {
77468
77175
  var dArea = hoEditorFactory.drawPageTree.getMainRootArea(this);
77469
77176
  if (!dArea) return;
@@ -77493,25 +77200,17 @@ var DrawPageMarkNode = /*#__PURE__*/function (_DrawCombineNode) {
77493
77200
  var newMarkNode = DrawPageMarkNode.paintMarkNode(this._hoEditorFactoryID, this._node, dArea, _editor_SubDocManger__WEBPACK_IMPORTED_MODULE_18__/* .HeaderFooterType */ .pi.hftUnkown);
77494
77201
  dArea.addChild(newMarkNode);
77495
77202
  _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_19__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID).drawPageTree.updateDrawPage(dArea.index);
77496
- // dPage.drawDomLevel.stage.update();
77497
77203
  dPageMarkNodes.push(newMarkNode);
77498
77204
  }
77499
77205
  }, {
77500
77206
  key: "repaintPageMarkNodes",
77501
77207
  value: function repaintPageMarkNodes(dArea, type) {
77502
- // const [index,rootNodes]= this.getSubDocIndex(dArea.index,type);
77503
- var strPath = dArea.rootPath;
77504
- // const arrNodes = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.getSubDocPageMarkNodes(
77505
- // strPath
77506
- // );
77507
- // for (let i = arrNodes.length - 1; i >= 0; i--) {
77508
77208
  var aNode = this.node;
77509
77209
  this.removePageMarkDrawNode(aNode, dArea);
77510
77210
  var dPageMarkNode = DrawPageMarkNode.paintMarkNode(this._hoEditorFactoryID, aNode, dArea, type);
77511
77211
  var dPageMarkNodes = this.node.drawPageMarkNodes;
77512
77212
  dPageMarkNodes.push(dPageMarkNode);
77513
77213
  dArea.addChild(dPageMarkNode);
77514
- // }
77515
77214
  }
77516
77215
  }, {
77517
77216
  key: "removePageMarkDrawNode",
@@ -78159,6 +77858,9 @@ var DrawPageTable = /*#__PURE__*/function (_DrawRect) {
78159
77858
  if (pageRestHeight < _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_15__/* .gDefaultRowHeight */ .dT) {
78160
77859
  break;
78161
77860
  }
77861
+ if (pageRestHeight < this._table.drawTable.getRowStartLineMaxHeight(r)) {
77862
+ break;
77863
+ }
78162
77864
  //开始行需要判断是否存在上一个未绘制完成的表格
78163
77865
  if (r === this._startRow && index > 0 && !bStartRowFinished) {
78164
77866
  rowRestHeight = Math.max(this._table.drawTable.getRowRestHeight(index - 1, this._startRow), _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_15__/* .gDefaultRowHeight */ .dT);
@@ -78240,7 +77942,7 @@ var DrawPageTable = /*#__PURE__*/function (_DrawRect) {
78240
77942
  break;
78241
77943
  }
78242
77944
  }
78243
- //如果某个单元格的合并多行,且当前页最后一行不是单元格的最后合并行,则需要绘制此单元格
77945
+ //如果某个单元格的合并多行,且当前页最后一行不是单元格的最后合并行,则需要绘制此单元格
78244
77946
  this.paintLastLineMergeCrossCell(this._endRow, rowPaintHeight, tableRestHeight);
78245
77947
  this._dHeight = totalHeight;
78246
77948
  var y = this._dTop;
@@ -78794,6 +78496,10 @@ var DrawPageTable = /*#__PURE__*/function (_DrawRect) {
78794
78496
  this.removeDrawCellAfterRow(r);
78795
78497
  break;
78796
78498
  }
78499
+ if (pageRestHeight < this._table.drawTable.getRowStartLineMaxHeight(r)) {
78500
+ this.removeDrawCellAfterRow(r);
78501
+ break;
78502
+ }
78797
78503
  var rowFinished = true; //行是否绘制完成
78798
78504
  var isEmptyRow = true; //是否绘制了一个单元格
78799
78505
  for (var c = 0; c < this._table.colCount; c++) {
@@ -80755,12 +80461,6 @@ var DrawTable = /*#__PURE__*/function (_DrawRect) {
80755
80461
  if (this._table.rowInfos[r].rowProperty.isSpecifyHeight) {
80756
80462
  dHeight = rowPorpertyHeight;
80757
80463
  }
80758
- // if (this._table.rowInfos[r].heightFixed) {
80759
- // return;
80760
- // }
80761
- // let drawPageTable: DrawPageTable | undefined = undefined;
80762
- //2023-09-04注释 该属性没用
80763
- //if (!this._table.rowInfos[r].heightFixed) {
80764
80464
  for (var c = 0; c < this._table.colCount; c++) {
80765
80465
  var aCell = this._table.rows[r][c];
80766
80466
  if (aCell && aCell.cellProperty.align == _editor_dom_TableProperty__WEBPACK_IMPORTED_MODULE_15__/* .VAlign */ .TR.vabottom) {
@@ -80768,13 +80468,6 @@ var DrawTable = /*#__PURE__*/function (_DrawRect) {
80768
80468
  }
80769
80469
  if (aCell && aCell.rowSpan === 1 && aCell.drawCell.dHeight > dHeight) {
80770
80470
  dHeight = aCell.drawCell.dHeight;
80771
- // let nextValue = aCell.drawCell.drawPageCells.values().next();
80772
- // while (!nextValue.done) {
80773
- // drawPageTable = nextValue.value.parent as DrawPageTable;
80774
- // }
80775
- // drawPageTable =
80776
- // aCell.drawCell.drawPageCells[aCell.drawCell.drawPageCells.length - 1]
80777
- // .drawPageTable;
80778
80471
  } else if (!aCell) {
80779
80472
  var _this$_table$getMainC = this._table.getMainCell(r, c),
80780
80473
  _this$_table$getMainC2 = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this$_table$getMainC, 3),
@@ -80782,7 +80475,6 @@ var DrawTable = /*#__PURE__*/function (_DrawRect) {
80782
80475
  mr = _this$_table$getMainC2[1],
80783
80476
  mc = _this$_table$getMainC2[2];
80784
80477
  if (mr + mainCell.rowSpan - 1 === r && mc === c) {
80785
- var cell = mainCell;
80786
80478
  var aHeight = mainCell.drawCell.dHeight;
80787
80479
  for (var row = r - 1; row >= mr; row--) {
80788
80480
  aHeight -= this.table.rowInfos[row].rowHeight;
@@ -80793,36 +80485,22 @@ var DrawTable = /*#__PURE__*/function (_DrawRect) {
80793
80485
  }
80794
80486
  }
80795
80487
  }
80796
- //}
80797
80488
  if (dHeight !== this._table.rowInfos[r].rowHeight) {
80798
- //2023-09-04注释 该属性没用
80799
- //if (!this._table.rowInfos[r].heightFixed) {
80800
80489
  if (this._table.rowInfos[r].rowProperty.isSpecifyHeight) {
80801
- if (dHeight > rowPorpertyHeight) this._table.rowInfos[r].rowHeight = rowPorpertyHeight;else this._table.rowInfos[r].rowHeight = dHeight;
80802
- } else this._table.rowInfos[r].rowHeight = dHeight;
80803
- //}
80490
+ if (dHeight > rowPorpertyHeight) {
80491
+ this._table.rowInfos[r].rowHeight = rowPorpertyHeight;
80492
+ } else {
80493
+ this._table.rowInfos[r].rowHeight = dHeight;
80494
+ }
80495
+ } else {
80496
+ this._table.rowInfos[r].rowHeight = dHeight;
80497
+ }
80804
80498
  for (var _c = 0; _c < bottonAlignCell.length; _c++) {
80805
80499
  if (bottonAlignCell[_c]) {
80806
80500
  bottonAlignCell[_c].drawCell.needUpdate = true;
80807
80501
  }
80808
80502
  }
80809
80503
  }
80810
- // for (let c = 0; c < this._table.colCount; c++) {
80811
- // const aCell = this._table.rows[r][c];
80812
- // if (aCell) {
80813
- // aCell.drawCell.dHeight = dHeight;
80814
- // } else {
80815
- // const [mainCell, mr, mc] = this._table.getMainCell(r, c);
80816
- // let drawCellHeight = 0;
80817
- // for (let i = mr, end = mr + mainCell.rowSpan - 1; i <= end; i++) {
80818
- // drawCellHeight += this._table.rowInfos[i].rowHeight;
80819
- // }
80820
- // mainCell.drawCell.dHeight = drawCellHeight;
80821
- // }
80822
- // }
80823
- // if (!drawPageTable) {
80824
- // throw new Error("错误的绘制,无法返回单元格所在页的表格信息");
80825
- // }
80826
80504
  return dHeight;
80827
80505
  }
80828
80506
  }, {
@@ -81417,6 +81095,67 @@ var DrawTable = /*#__PURE__*/function (_DrawRect) {
81417
81095
  get: function get() {
81418
81096
  return this._dHeight;
81419
81097
  }
81098
+ /**
81099
+ *
81100
+ * @param r
81101
+ * @returns 获取指定行r中所有列中第一行的最大行高
81102
+ */
81103
+ }, {
81104
+ key: "getRowStartLineMaxHeight",
81105
+ value: function getRowStartLineMaxHeight(r) {
81106
+ var startRow = -1;
81107
+ var endRow = -1;
81108
+ var inSameRow = true;
81109
+ //判断所有行的起始行是否一样 并且结束行也是否一样
81110
+ for (var c = 0; c < this._table.colCount; c++) {
81111
+ var _this$_table$getMainC5 = this._table.getMainCell(r, c),
81112
+ _this$_table$getMainC6 = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this$_table$getMainC5, 3),
81113
+ cell = _this$_table$getMainC6[0],
81114
+ mr = _this$_table$getMainC6[1],
81115
+ mc = _this$_table$getMainC6[2];
81116
+ if (startRow == -1) {
81117
+ startRow = mr;
81118
+ }
81119
+ if (endRow == -1) {
81120
+ endRow = mr + cell.rowSpan - 1;
81121
+ }
81122
+ if (mr != startRow || endRow != mr + cell.rowSpan - 1) {
81123
+ inSameRow = false;
81124
+ return _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_17__/* .gDefaultRowHeight */ .dT;
81125
+ }
81126
+ }
81127
+ var maxRowHeight = 0;
81128
+ for (var _c2 = 0; _c2 < this._table.colCount; _c2++) {
81129
+ var _this$_table$getMainC7 = this._table.getMainCell(r, _c2),
81130
+ _this$_table$getMainC8 = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this$_table$getMainC7, 3),
81131
+ _cell = _this$_table$getMainC8[0],
81132
+ _mr = _this$_table$getMainC8[1],
81133
+ _mc = _this$_table$getMainC8[2];
81134
+ if (_cell && _mc === _c2) {
81135
+ var aHeight = _cell.drawCell.drawLines[0].dHeight;
81136
+ if (aHeight > maxRowHeight) {
81137
+ maxRowHeight = aHeight;
81138
+ }
81139
+ }
81140
+ }
81141
+ return maxRowHeight;
81142
+ }
81143
+ }, {
81144
+ key: "isFirstRowCanFit",
81145
+ value: function isFirstRowCanFit(restHeight) {
81146
+ var _this$table$getHeadRo = this.table.getHeadRowCountHeight(),
81147
+ _this$table$getHeadRo2 = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this$table$getHeadRo, 2),
81148
+ headCount = _this$table$getHeadRo2[0],
81149
+ headHeight = _this$table$getHeadRo2[1];
81150
+ var startRow = headCount;
81151
+ if (headCount < 0) {
81152
+ startRow = 0;
81153
+ }
81154
+ if (this.table.rowCount > headCount && headHeight + this.getRowStartLineMaxHeight(startRow) > restHeight) {
81155
+ return false;
81156
+ }
81157
+ return true;
81158
+ }
81420
81159
  }]);
81421
81160
  return DrawTable;
81422
81161
  }(_DrawRect__WEBPACK_IMPORTED_MODULE_21__/* .DrawRect */ .t);
@@ -85162,12 +84901,9 @@ var DrawTree = /*#__PURE__*/function () {
85162
84901
  }, {
85163
84902
  key: "onTick",
85164
84903
  value: function onTick(e) {
85165
- // if(!(e as any).paused) {
85166
- // console.log("Paused:", (e as any).paused, (e as any).delta);
85167
84904
  if (this._activePage && this._activePage.drawSelectLevel && this._activePage.drawSelectLevel.stage) {
85168
84905
  this._activePage.drawSelectLevel.stage.update(e);
85169
84906
  }
85170
- // }
85171
84907
  }
85172
84908
  }, {
85173
84909
  key: "deleteDLines",
@@ -85427,11 +85163,6 @@ var DrawTree = /*#__PURE__*/function () {
85427
85163
  var paraNode = dline.paragraphNode;
85428
85164
  var node = startNode;
85429
85165
  var aEndPath = endPath;
85430
- // let npEnd = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.findNodePositionByPath(endPath);
85431
- // if (!npEnd.node) {
85432
- // throw new Error(`错误的绘制节点${endPath}`);
85433
- // }
85434
- // const endParaNode=HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.getNodeParaNode(npEnd.node);
85435
85166
  var hoeditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
85436
85167
  var paraInfos = hoeditorFactory.docTree.getPathParagraphLastPath(endPath);
85437
85168
  var endParaNode = paraInfos[0];
@@ -85461,14 +85192,12 @@ var DrawTree = /*#__PURE__*/function () {
85461
85192
  }
85462
85193
  dline = node.drawlines[0];
85463
85194
  paraNode = node;
85464
- // inLineIndex = -1;
85465
85195
  if (node === npEnd.node) {
85466
85196
  break;
85467
85197
  }
85468
85198
  } else if (node instanceof TableNode/* TableNode */.Fh) {
85469
85199
  node.placeDNodeAfterDrawLine(paraNode, dline, aEndPath);
85470
85200
  dline = node.drawTable;
85471
- // inLineIndex = 0;
85472
85201
  } else {
85473
85202
  //放置时不包含第一个节点
85474
85203
  if (dline instanceof DrawTable/* DrawTable */.t) {
@@ -85484,11 +85213,7 @@ var DrawTree = /*#__PURE__*/function () {
85484
85213
  if (NodePosition/* NodePosition */.F.treePathCompare(aEndPath, hoeditorFactory.docTree.getNodeLastPath(node)) <= 0) {
85485
85214
  break;
85486
85215
  }
85487
- // if (node === npEnd.node) {
85488
- // break;
85489
- // }
85490
85216
  }
85491
-
85492
85217
  var nextNode = node.nextSibling();
85493
85218
  if (!nextNode) {
85494
85219
  if (node instanceof MarkNode/* MarkNode */.j) {
@@ -85499,10 +85224,7 @@ var DrawTree = /*#__PURE__*/function () {
85499
85224
  }
85500
85225
  node = nextNode;
85501
85226
  startChildIndex = 0;
85502
- // dline = paraNode.getLastDrawline();
85503
- // dline = dline.paragraphNode.getLastDrawline();
85504
85227
  }
85505
-
85506
85228
  if (dline instanceof DrawLine/* DrawLine */.a) {
85507
85229
  dline.fitLines();
85508
85230
  dline.paragraphNode.updateDrawLineStyle();
@@ -85521,7 +85243,8 @@ var DrawTree = /*#__PURE__*/function () {
85521
85243
  var aParagraph = paragraph;
85522
85244
  while (aParagraph) {
85523
85245
  //如paragraph在表格内更新表格高度
85524
- var area = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID).docTree.getParentRectNode(aParagraph);
85246
+ var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
85247
+ var area = hoEditorFactory.docTree.getParentRectNode(aParagraph);
85525
85248
  if (area && area instanceof CellNode/* CellNode */.D) {
85526
85249
  aParagraph = this.updateDrawAreaHeight(area);
85527
85250
  if (aParagraph) {
@@ -85541,10 +85264,6 @@ var DrawTree = /*#__PURE__*/function () {
85541
85264
  var canChangeHeight = true;
85542
85265
  var aCell = area;
85543
85266
  aCell.drawCell.updateHeight();
85544
- // const lastParagraph =
85545
- // aCell.drawCell.drawLines[aCell.drawCell.drawLines.length - 1]
85546
- // .paragraphNode;
85547
- // aCell.drawCell.docHeight = lastParagraph.dTop + lastParagraph.dHeight;
85548
85267
  var _aCell$table$getCellI = aCell.table.getCellInfos(aCell),
85549
85268
  _aCell$table$getCellI2 = (0,slicedToArray/* default */.Z)(_aCell$table$getCellI, 2),
85550
85269
  r = _aCell$table$getCellI2[0],
@@ -85576,11 +85295,6 @@ var DrawTree = /*#__PURE__*/function () {
85576
85295
  var aEndPath = endPath;
85577
85296
  var tables = new Array();
85578
85297
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
85579
- // let npEnd = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.findNodePositionByPath(endPath);
85580
- // if (!npEnd.node) {
85581
- // throw new Error(`错误的绘制节点${endPath}`);
85582
- // }
85583
- // const endParaNode=hoEditorFactory.docTree.getNodeParaNode(npEnd.node);
85584
85298
  var paraInfos = hoEditorFactory.docTree.getPathParagraphLastPath(endPath);
85585
85299
  var endParaNode = paraInfos[0];
85586
85300
  var paraEndPath = paraInfos[1];
@@ -85643,35 +85357,16 @@ var DrawTree = /*#__PURE__*/function () {
85643
85357
  }
85644
85358
  }
85645
85359
  }
85646
- if (NodePosition/* NodePosition */.F.treePathCompare(aEndPath, hoEditorFactory.docTree.getNodeLastPath(node)) <= 0) break;
85647
- // if (node === npEnd.node) {
85648
- // break;
85649
- // }
85360
+ if (NodePosition/* NodePosition */.F.treePathCompare(aEndPath, hoEditorFactory.docTree.getNodeLastPath(node)) <= 0) {
85361
+ break;
85362
+ }
85650
85363
  }
85651
- // dline = paraNode.getLastDrawline();
85652
- // dline = dline.paragraphNode.getLastDrawline();
85653
85364
  }
85654
-
85655
85365
  if (dline instanceof DrawLine/* DrawLine */.a) {
85656
85366
  dline.fitLines();
85657
85367
  dline.paragraphNode.updateDrawLineStyle();
85658
85368
  }
85659
85369
  this.updateTablesdHeight(tables);
85660
- // const arr = aEndPath.split("/");
85661
- // const endIndex = parseInt(arr[arr.length - 1]);
85662
- // if (node instanceof ParagraphNode) {
85663
- // (node as ParagraphNode).placeDNodeAfterDline(dlines, dline);
85664
- // } else {
85665
- // node?.placeDNode2DrawLine(
85666
- // dlines,
85667
- // paraNode,
85668
- // dline,
85669
- // index,
85670
- // 0,
85671
- // endIndex
85672
- // );
85673
- // }
85674
- // paraNode.getLastDline().update();
85675
85370
  endParaNode.dTop = this.getParagraphStartTop(endParaNode);
85676
85371
  endParaNode.updateDrawInfos();
85677
85372
  var lastParagraph = this.updateDrawAreaPos(endParaNode);
@@ -85695,19 +85390,6 @@ var DrawTree = /*#__PURE__*/function () {
85695
85390
  aline.parent.removeChild(aline);
85696
85391
  }
85697
85392
  }
85698
- // const npEnd = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.findNodePositionByPath(endPath);
85699
- // if (!npEnd.node) {
85700
- // throw new Error(`错误的绘制节点${endPath}`);
85701
- // } else {
85702
- // let aNode: BaseNode | null = npEnd.node;
85703
- // while (aNode && aNode !== dline.paragraphNode) {
85704
- // if (aNode instanceof ParagraphNode) {
85705
- // this.clearDrawParagraph(aNode as ParagraphNode);
85706
- // } else if (aNode instanceof TableNode) {
85707
- // (aNode as TableNode).drawTable.clearAllDrawLines();
85708
- // }
85709
- // aNode = aNode.previousLeaf();
85710
- // }
85711
85393
  if (dline instanceof DrawLine/* DrawLine */.a) {
85712
85394
  var paragraphNode = this.clearDrawParagraphAfterDline(dline.paragraphNode, dline, istartLineIndex, beforeChangePath);
85713
85395
  if (dline.drawItems[istartLineIndex] instanceof DrawTextNode/* DrawTextNode */.v) {
@@ -85719,52 +85401,6 @@ var DrawTree = /*#__PURE__*/function () {
85719
85401
  var lastParagraph = this.updateDrawAreaPos(dline.paragraphNode);
85720
85402
  this.updateDrawTreeHeight(lastParagraph);
85721
85403
  }
85722
- // /**
85723
- // *
85724
- // * @param drawLine 当前行
85725
- // * @returns 返回当前行的下一个行。
85726
- // */
85727
- // public getNextDrawLine(
85728
- // adomRange: DomRange,
85729
- // drawLine: DrawLine | DrawTable
85730
- // ): [Array<DrawLine | DrawTable> | null, DrawLine | null] {
85731
- // const [dcell, droots] = this.getDrawRootsByPath(
85732
- // drawLine.paragraphNode.getNodePath()
85733
- // );
85734
- // let retRoots: Array<DrawLine | DrawTable> | null = null;
85735
- // let dNextLine: DrawLine | DrawTable | null = null;
85736
- // const index = droots.indexOf(drawLine);
85737
- // if (index === droots.length - 1) {
85738
- // if (dcell) {
85739
- // const childNodes = dcell.cell.table.childNodes;
85740
- // const cellIndex = childNodes.indexOf(dcell.cell);
85741
- // if (cellIndex === childNodes.length - 1) {
85742
- // return this.getNextDrawLine(adomRange, dcell.cell.table.drawTable);
85743
- // } else {
85744
- // const dNextCell = (dcell.cell.table.childNodes[
85745
- // cellIndex + 1
85746
- // ] as CellNode).drawCell;
85747
- // retRoots = dNextCell.drawLines;
85748
- // dNextLine = dNextCell.drawLines[0];
85749
- // while (dNextLine instanceof DrawTable) {
85750
- // retRoots = ((dNextLine as DrawTable).table
85751
- // .childNodes[0] as CellNode).drawCell.drawLines;
85752
- // dNextLine = retRoots[0];
85753
- // }
85754
- // return [retRoots, dNextLine];
85755
- // }
85756
- // }
85757
- // return [null, null];
85758
- // }
85759
- // dNextLine = droots[index + 1];
85760
- // retRoots = droots;
85761
- // while (dNextLine instanceof DrawTable) {
85762
- // retRoots = ((dNextLine as DrawTable).table.childNodes[0] as CellNode)
85763
- // .drawCell.drawLines;
85764
- // dNextLine = retRoots[0];
85765
- // }
85766
- // return [retRoots, dNextLine];
85767
- // }
85768
85404
  /**
85769
85405
  * @author xyl
85770
85406
  * @param path 绘制路径
@@ -85884,12 +85520,6 @@ var DrawTree = /*#__PURE__*/function () {
85884
85520
  value: function onDocChanged(e) {
85885
85521
  //查找绘制前的绘制节点
85886
85522
  //绘制结束位置
85887
- // const endPara = hoEditorFactory.docTree.getNodeParaNode(npEnd.node);
85888
- // // const endPath = hoEditorFactory.docTree.getParaNodeLastPath(endPara);
85889
- // // const npEnd = hoEditorFactory.docTree.findNodePositionByPath(endPath);
85890
- // if (!npEnd.node) {
85891
- // throw new Error(`错误的绘制节点${e.afterChangePath}`);
85892
- // }
85893
85523
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
85894
85524
  try {
85895
85525
  //console.time("文档change事件");
@@ -85911,9 +85541,6 @@ var DrawTree = /*#__PURE__*/function () {
85911
85541
  if (startDrawPage) {
85912
85542
  startPageNo = startDrawPage.pageIndex;
85913
85543
  }
85914
- // const dlines = nextDrawLineInfos[0];
85915
- // const dline = nextDrawLineInfos[1];
85916
- // const inLineIndex = nextDrawLineInfos[2];
85917
85544
  var nextDrawNodeInfos = this.getNextDrawNode(e.beforeChangePath);
85918
85545
  var node = nextDrawNodeInfos[0];
85919
85546
  var startChildIndex = nextDrawNodeInfos[1];
@@ -85947,11 +85574,6 @@ var DrawTree = /*#__PURE__*/function () {
85947
85574
  // inLineIndex,
85948
85575
  node, startChildIndex + 1, e.afterChangePath);
85949
85576
  var endIndex = alines.indexOf(dendDrawLine);
85950
- // if (hoEditorFactory.isUseDrawingOptimization) {
85951
- // endIndex = alines.length - 1;
85952
- // }
85953
- // if (paragraphNode.parentNode === null) {
85954
- // const darea = this.getDrawA(dline);
85955
85577
  if (e.repaintImmediate) {
85956
85578
  if (!dArea) {
85957
85579
  return false;
@@ -85964,21 +85586,7 @@ var DrawTree = /*#__PURE__*/function () {
85964
85586
  if (dCell) {
85965
85587
  this.updateDrawFormular(dCell.cell);
85966
85588
  }
85967
- // if (dArea.rootPath == "main") {
85968
- // console.log("开始");
85969
- // let type = "";
85970
- // for (let i = 0; i < alines.length; i++) {
85971
- // if (alines[i] instanceof DrawLine) {
85972
- // type = "行";
85973
- // } else {
85974
- // type = "表格";
85975
- // }
85976
- // console.log(i, type, alines[i].y, alines[i].dHeight, alines[i].dTop);
85977
- // }
85978
- // console.log("结束");
85979
- // }
85980
85589
  }
85981
- // }
85982
85590
  } else if (e.action === DocTree/* DocAction */.gk.daModifyStyle) {
85983
85591
  if (e.oldDrawLines.length <= 0) {
85984
85592
  return false;
@@ -85998,8 +85606,6 @@ var DrawTree = /*#__PURE__*/function () {
85998
85606
  e.beforeChangePath, e.afterChangePath, e.needUpdateParaStyle);
85999
85607
  if (e.repaintImmediate) {
86000
85608
  dline = e.redrawStartPositon.drawRoots[e.redrawStartPositon.index];
86001
- // dendDrawLine =
86002
- // e.redrawStartPositon.drawRoots[e.redrawStartPositon.index];
86003
85609
  var _mainArea = hoEditorFactory.drawPageTree.getMainRootArea(startUpdateLine);
86004
85610
  if (!_mainArea) return false;
86005
85611
  _mainArea.changed = true;
@@ -86008,19 +85614,6 @@ var DrawTree = /*#__PURE__*/function () {
86008
85614
  drawTop = 0;
86009
85615
  }
86010
85616
  hoEditorFactory.drawPageTree.update(_mainArea, e.redrawStartPositon.drawRoots, drawTop, e.redrawStartPositon.index, e.redrawStartPositon.drawRoots.length - 1);
86011
- // if (mainArea.rootPath == "main") {
86012
- // console.log("开始");
86013
- // let type = "";
86014
- // for (let i = 0; i < e.redrawStartPositon.drawRoots.length; i++) {
86015
- // if (e.redrawStartPositon.drawRoots[i] instanceof DrawLine) {
86016
- // type = "行";
86017
- // } else {
86018
- // type = "表格";
86019
- // }
86020
- // console.log(i, type, e.redrawStartPositon.drawRoots[i].y, e.redrawStartPositon.drawRoots[i].dHeight, e.redrawStartPositon.drawRoots[i].dTop);
86021
- // }
86022
- // console.log("结束");
86023
- // }
86024
85617
  }
86025
85618
  } else if (e.action === DocTree/* DocAction */.gk.daParaStyleChange) {
86026
85619
  if (e.oldDrawLines.length <= 0) {
@@ -86066,21 +85659,6 @@ var DrawTree = /*#__PURE__*/function () {
86066
85659
  }
86067
85660
  var startDeleteLine = e.oldDrawTreeLines[0] instanceof DrawTable/* DrawTable */.t ? e.oldDrawTreeLines[0].drawPageTables[0] : e.oldDrawTreeLines[0];
86068
85661
  startUpdateLine = this.getDlineRootDrawNode(startDeleteLine);
86069
- // if (inLineIndex === -1 && dline instanceof DrawTable) {
86070
- // this.deleteDLines(dlines, iStartLineIndex, iendLineIndex);
86071
- // if (dlines.length === 0) {
86072
- // if (dCell) {
86073
- // dCell.clear();
86074
- // } else {
86075
- // const roots = hoEditorFactory.docTree.getPathRoots(
86076
- // e.afterChangePath
86077
- // );
86078
- // if (roots) {
86079
- // this.buildDrawTree(roots, dlines);
86080
- // }
86081
- // }
86082
- // }
86083
- // } else {
86084
85662
  var _tables = this.deleteDLines(e.oldDrawTreeLines, iStartLineIndex, iendLineIndex);
86085
85663
  if (iStartLineIndex !== 0) {
86086
85664
  paragraphNode = this.clearDrawParagraphAfterDline(dline.paragraphNode, dline, inLineIndex, e.beforeChangePath);
@@ -86088,24 +85666,11 @@ var DrawTree = /*#__PURE__*/function () {
86088
85666
  startChildIndex = -1;
86089
85667
  }
86090
85668
  if (dline instanceof DrawLine/* DrawLine */.a) dline.fitLines();
86091
- // }
86092
- // if (
86093
- // node instanceof ParagraphNode &&
86094
- // node.drootNodes.indexOf((node as ParagraphNode).drawlines[0]) >= 0
86095
- // ) {
86096
- // (node as ParagraphNode).dTop = this.getParagraphStartTop(
86097
- // node as ParagraphNode
86098
- // );
86099
- // (node as ParagraphNode).updateDrawInfos();
86100
- // } else {
86101
85669
  //后续行未删除部分,添加到当前行的尾部
86102
85670
  if (node && !(node instanceof ParagraphNode/* ParagraphNode */.C)) {
86103
- var endLine = this.drawDocInsert(paragraphNode, lineIndex,
86104
- // inLineIndex,
86105
- node, startChildIndex + 1, e.afterChangePath);
85671
+ var endLine = this.drawDocInsert(paragraphNode, lineIndex, node, startChildIndex + 1, e.afterChangePath);
86106
85672
  if (endLine instanceof DrawLine/* DrawLine */.a) endLine.fitLines();
86107
85673
  }
86108
- // }
86109
85674
  paragraphNode.updateDrawLineStyle();
86110
85675
  paragraphNode.updateDrawInfos();
86111
85676
  this.updateDrawAreaPos(paragraphNode);
@@ -86121,10 +85686,7 @@ var DrawTree = /*#__PURE__*/function () {
86121
85686
  }
86122
85687
  if (e.repaintImmediate) {
86123
85688
  var _mainArea3 = dArea;
86124
- if (dline.parent)
86125
- // dendDrawLine =
86126
- // e.redrawStartPositon.drawRoots[e.redrawStartPositon.index];
86127
- _mainArea3 = hoEditorFactory.drawPageTree.getMainRootArea(startUpdateLine);else if (dArea) {
85689
+ if (dline.parent) _mainArea3 = hoEditorFactory.drawPageTree.getMainRootArea(startUpdateLine);else if (dArea) {
86128
85690
  _mainArea3 = hoEditorFactory.drawPageTree.getMainRootArea(dArea);
86129
85691
  }
86130
85692
  if (_mainArea3) {
@@ -86139,13 +85701,6 @@ var DrawTree = /*#__PURE__*/function () {
86139
85701
  this.updateDrawFormular(dCell.cell);
86140
85702
  }
86141
85703
  }
86142
- // if (
86143
- // e.redrawEndPositon &&
86144
- // e.redrawEndPositon.drawRoots &&
86145
- // e.redrawEndPositon.drawRoots.length > 0
86146
- // ) {
86147
- // dendDrawLine = e.redrawEndPositon.drawRoots[e.redrawEndPositon.index];
86148
- // }
86149
85704
  } else if (e.action === DocTree/* DocAction */.gk.daInsertParagraphBeforeTab) {
86150
85705
  if (dCell) {
86151
85706
  dCell.needUpdate = true;
@@ -86246,9 +85801,6 @@ var DrawTree = /*#__PURE__*/function () {
86246
85801
  //toDo 需要修改所有区域的高度
86247
85802
  var lastParagraph = this.updateDrawAreaPos(paragraphNode);
86248
85803
  this.updateDrawTreeHeight(lastParagraph);
86249
- var _endIndex = 0;
86250
- // if (paragraphNode.parentNode === null) {
86251
- // const darea = this.getDrawA(dline);
86252
85804
  if (e.repaintImmediate) {
86253
85805
  if (!dArea) {
86254
85806
  return false;
@@ -86278,9 +85830,6 @@ var DrawTree = /*#__PURE__*/function () {
86278
85830
  //toDo 需要修改所有区域的高度
86279
85831
  var _lastParagraph = this.updateDrawAreaPos(paragraphNode);
86280
85832
  this.updateDrawTreeHeight(_lastParagraph);
86281
- var _endIndex2 = 0;
86282
- // if (paragraphNode.parentNode === null) {
86283
- // const darea = this.getDrawA(dline);
86284
85833
  if (e.repaintImmediate) {
86285
85834
  if (!dArea) {
86286
85835
  return false;
@@ -86293,67 +85842,6 @@ var DrawTree = /*#__PURE__*/function () {
86293
85842
  }
86294
85843
  }
86295
85844
  }
86296
- // if (dCell) {
86297
- // //如果表格高度改变 将在isCellRowHeightChanged中递归(需要考虑表格套表格)触发重绘
86298
- // const [
86299
- // changed,
86300
- // needRePaint,
86301
- // ] = dCell.cell.table.drawTable.isCellRowHeightChanged(dCell.cell);
86302
- // if (!changed) {
86303
- // const dPartCell = dCell.getDrawPageCellByPageIndex(startPageNo);
86304
- // const startIndex =
86305
- // dPartCell && dPartCell.startPgDline ? dPartCell.startPgDline : 0;
86306
- // let iRedrawEnd = dline.paragraphNode.drootNodes.indexOf(dendDrawLine);
86307
- // iRedrawEnd = iRedrawEnd >= startIndex ? iRedrawEnd : startIndex;
86308
- // hoEditorFactory.redrawManger.addRedrawRange(
86309
- // dCell,
86310
- // startPageNo,
86311
- // dCell.drawLines,
86312
- // startIndex,
86313
- // iRedrawEnd,
86314
- // dCell.drawLines.length - 1,
86315
- // e.afterChangePath
86316
- // );
86317
- // }
86318
- // } else
86319
- // {
86320
- // let pParagraphNode = hoEditorFactory.docTree.getParentRectNode(
86321
- // dline.paragraphNode
86322
- // );
86323
- // let dParent: DrawLine | DrawTable = dline;
86324
- // while (pParagraphNode && pParagraphNode instanceof CellNode) {
86325
- // dParent = pParagraphNode.table.drawTable;
86326
- // pParagraphNode = hoEditorFactory.docTree.getParentRectNode(
86327
- // pParagraphNode.table
86328
- // );
86329
- // }
86330
- // dline = dParent;
86331
- // let iRedrawStart = dline.paragraphNode.drootNodes.indexOf(dline);
86332
- // let iRedrawEnd = dline.paragraphNode.drootNodes.indexOf(dendDrawLine);
86333
- // iRedrawStart = iRedrawStart >= 0 ? iRedrawStart : 0;
86334
- // while (iRedrawStart > 0) {
86335
- // if (dline instanceof DrawTable) {
86336
- // const dPartTable = dline.getDrawTableByPage(startPageNo);
86337
- // if (dPartTable && dPartTable.stage) {
86338
- // break;
86339
- // }
86340
- // } else if (dline.stage) {
86341
- // break;
86342
- // }
86343
- // iRedrawStart--;
86344
- // dline = dline.paragraphNode.drootNodes[iRedrawStart];
86345
- // }
86346
- // iRedrawEnd = iRedrawEnd >= iRedrawStart ? iRedrawEnd : iRedrawStart;
86347
- // hoEditorFactory.redrawManger.addRedrawRange(
86348
- // dCell,
86349
- // startPageNo,
86350
- // dline.paragraphNode.drootNodes,
86351
- // iRedrawStart,
86352
- // iRedrawEnd,
86353
- // dline.paragraphNode.drootNodes.length - 1,
86354
- // e.afterChangePath
86355
- // );
86356
- // }
86357
85845
  } finally {
86358
85846
  this._inChanging = false;
86359
85847
  }
@@ -86373,7 +85861,6 @@ var DrawTree = /*#__PURE__*/function () {
86373
85861
  }
86374
85862
  }
86375
85863
  }
86376
- //console.timeEnd("文档change事件");
86377
85864
  return true;
86378
85865
  }
86379
85866
  }, {
@@ -86381,290 +85868,6 @@ var DrawTree = /*#__PURE__*/function () {
86381
85868
  value: function onDocChanging(e) {
86382
85869
  return true;
86383
85870
  }
86384
- //#region 添加批注(旧逻辑)
86385
- // public drawComments() {
86386
- // const comments = this.commentsMap;
86387
- // let i = 0;
86388
- // comments.forEach((value) => {
86389
- // i++;
86390
- // if (i > 2) {
86391
- // return;
86392
- // }
86393
- // const endDrawNode = value.eNode.drawNodes[0];
86394
- // const dline = this.getDrawLineByDNode(
86395
- // endDrawNode
86396
- // ); // 末尾标记节点所在行
86397
- // const stagePos = dline.localToGlobal(endDrawNode.x, endDrawNode.y); // 末尾标记节点的stage坐标
86398
- // const spX = stagePos.x / 2;
86399
- // const spY = stagePos.y / 2;
86400
- // //const commentY = spY;
86401
- // if (dline.stage) {
86402
- // this.removeComment(dline, value);
86403
- // const path = value.eNode.getNodePath();
86404
- // if (i === 1) {
86405
- // this.drawComment(dline, value, spX, spY, spY);
86406
- // }
86407
- // if (i === 2) {
86408
- // this.repaint(dline, value, path, spX, spY);
86409
- // }
86410
- // }
86411
- // });
86412
- // }
86413
- // public removeComment(dline: DrawLine | DrawTable, comment: Comment) {
86414
- // for (let i = dline.stage.children.length - 1; i >= 3; i--) {
86415
- // const child = dline.stage.children[i];
86416
- // if (child.name === comment.id) {
86417
- // dline.stage.children.splice(i, 1);
86418
- // }
86419
- // }
86420
- // dline.stage.update();
86421
- // }
86422
- // public repaint(
86423
- // dline: DrawLine | DrawTable,
86424
- // comment: Comment,
86425
- // nPath: string,
86426
- // spX: number,
86427
- // spY: number
86428
- // ) {
86429
- // const comments = this.commentsMap;
86430
- // const topComments = new Array<Comment>();
86431
- // const bottomComments = new Array<Comment>();
86432
- // const tempArr = new Array<Comment>();
86433
- // const getStagePos = (comment: Comment) => {
86434
- // const endDrawNode = comment.eNode.drawNodes[0];
86435
- // const dline = this.getDrawLineByDNode(
86436
- // endDrawNode
86437
- // ); // 末尾标记节点所在行
86438
- // const stagePos = dline.localToGlobal(endDrawNode.x, endDrawNode.y);
86439
- // //let y = 0;
86440
- // // for (let i = 3; i < dline.stage.children.length; i++) {
86441
- // // const child = dline.stage.children[i];
86442
- // // if (child instanceof createjs.Container && child.name === comment.id) {
86443
- // // y = child.y;
86444
- // // }
86445
- // // }
86446
- // //return [dline, stagePos.x / 2, stagePos.y / 2];
86447
- // return [dline, stagePos.x / 2, stagePos.y / 2];
86448
- // };
86449
- // let commentY = spY;
86450
- // comments.forEach((value) => {
86451
- // if (value.id !== comment.id) {
86452
- // tempArr.push(value);
86453
- // }
86454
- // });
86455
- // tempArr.forEach((value) => {
86456
- // const aPath = value.eNode.getNodePath();
86457
- // const result = NodePosition.treePathCompare(nPath, aPath);
86458
- // if (result > 0) {
86459
- // topComments.push(value);
86460
- // } else {
86461
- // bottomComments.push(value);
86462
- // }
86463
- // });
86464
- // if (topComments.length > 0) {
86465
- // let maxValue = getStagePos(topComments[0])[2] as number;
86466
- // let lHeight = topComments[0].lineHeight;
86467
- // for (let i = 1; i < topComments.length; i++) {
86468
- // const stageY = getStagePos(topComments[i])[2] as number;
86469
- // if (stageY > maxValue) {
86470
- // maxValue = stageY;
86471
- // lHeight = topComments[i].lineHeight;
86472
- // }
86473
- // }
86474
- // if (maxValue + lHeight + 5 > spY) {
86475
- // commentY = maxValue + lHeight + 5;
86476
- // }
86477
- // }
86478
- // this.drawComment(dline, comment, spX, spY, commentY);
86479
- // if (bottomComments.length > 0) {
86480
- // const repaintComment = (commentObj: Comment, commentY: number) => {
86481
- // const drawLine = getStagePos(commentObj)[0] as DrawLine | DrawTable;
86482
- // const nodeX = getStagePos(commentObj)[1] as number;
86483
- // const nodeY = getStagePos(commentObj)[2] as number;
86484
- // const arrIndex = bottomComments.indexOf(commentObj);
86485
- // bottomComments.splice(arrIndex, 1);
86486
- // if (commentY + commentObj.lineHeight + 5 > nodeY) {
86487
- // commentY = commentY + commentObj.lineHeight + 5;
86488
- // } else {
86489
- // commentY = nodeY;
86490
- // }
86491
- // this.removeComment(drawLine, commentObj);
86492
- // this.drawComment(drawLine, commentObj, nodeX, nodeY, commentY);
86493
- // if (bottomComments.length > 0) {
86494
- // let minValue = getStagePos(bottomComments[0])[2] as number;
86495
- // let tempComment = bottomComments[0];
86496
- // for (let j = 1; j < bottomComments.length; j++) {
86497
- // const stageY = getStagePos(bottomComments[j])[2] as number;
86498
- // if (stageY < minValue) {
86499
- // minValue = stageY;
86500
- // tempComment = bottomComments[j];
86501
- // }
86502
- // }
86503
- // repaintComment(tempComment, commentY);
86504
- // }
86505
- // };
86506
- // let minValue = getStagePos(bottomComments[0])[2] as number;
86507
- // let tempComment = bottomComments[0];
86508
- // for (let i = 1; i < bottomComments.length; i++) {
86509
- // const stageY = getStagePos(bottomComments[i])[2] as number;
86510
- // if (stageY < minValue) {
86511
- // minValue = stageY;
86512
- // tempComment = bottomComments[i];
86513
- // }
86514
- // }
86515
- // repaintComment(tempComment, commentY);
86516
- // }
86517
- // }
86518
- // public drawComment(
86519
- // dline: DrawLine | DrawTable,
86520
- // comment: Comment,
86521
- // nodeX: number,
86522
- // nodeY: number,
86523
- // commentY: number
86524
- // ) {
86525
- // const docWidth =
86526
- // hoEditorFactory.pageProperty.widthPixes -
86527
- // hoEditorFactory.pageProperty.rightMarginPixes;
86528
- // const commentWidth =
86529
- // hoEditorFactory.pageProperty.rightMarginPixes - 15;
86530
- // const container = new createjs.Container();
86531
- // container.x = docWidth + 15;
86532
- // container.y = commentY - comment.lineHeight / 2;
86533
- // container.name = comment.id;
86534
- // let nameTextShape: DrawSimpleText | null = null;
86535
- // let dateTextShape: DrawSimpleText | null = null;
86536
- // let commentTextShape: DrawSimpleText | null = null;
86537
- // // const creator = hoEditorFactory.docTree.userHistories[
86538
- // // comment.creatorIndex
86539
- // // ];
86540
- // // 批注人
86541
- // nameTextShape = new DrawSimpleText(
86542
- // comment.userName,
86543
- // "12px 微软雅黑",
86544
- // "#000"
86545
- // );
86546
- // nameTextShape.lineHeight = 20;
86547
- // nameTextShape.name = "creator";
86548
- // nameTextShape.x = 10;
86549
- // nameTextShape.y = 10;
86550
- // nameTextShape.alpha = 1;
86551
- // // 批注时间
86552
- // dateTextShape = new DrawSimpleText(comment.date, "12px 微软雅黑", "#333");
86553
- // dateTextShape.lineHeight = 20;
86554
- // dateTextShape.name = "time";
86555
- // dateTextShape.x = nameTextShape.getMeasuredWidth() + 30;
86556
- // dateTextShape.y = 10;
86557
- // dateTextShape.alpha = 1;
86558
- // // 批注内容
86559
- // const commentArr = comment.commentTextWarp(commentWidth, comment.text);
86560
- // const text = commentArr[0] as string;
86561
- // commentTextShape = new DrawSimpleText(text, "12px 微软雅黑", "#666");
86562
- // commentTextShape.lineWidth = commentWidth - 25;
86563
- // commentTextShape.lineHeight = 20;
86564
- // commentTextShape.name = "text";
86565
- // commentTextShape.x = 10;
86566
- // commentTextShape.y = dateTextShape.y + dateTextShape.getMeasuredHeight();
86567
- // commentTextShape.alpha = 1;
86568
- // //背景
86569
- // const backShape = new createjs.Shape();
86570
- // backShape.graphics
86571
- // .setStrokeDash([4, 1], 0)
86572
- // .setStrokeStyle(1)
86573
- // .beginStroke("rgba(255, 0, 0, 1)")
86574
- // .beginFill("#ffe5e5")
86575
- // .drawRoundRect(0, 0, commentWidth - 20, comment.lineHeight, 5);
86576
- // backShape.name = "back";
86577
- // backShape.alpha = 0.5;
86578
- // backShape.cache(0, 0, commentWidth - 20, comment.lineHeight, 5);
86579
- // //横线
86580
- // const horizontalLine = new createjs.Shape();
86581
- // horizontalLine.graphics
86582
- // .setStrokeDash([4, 1], 0)
86583
- // .setStrokeStyle(1)
86584
- // .beginStroke("rgba(255, 0, 0, 1)")
86585
- // .moveTo(nodeX, nodeY)
86586
- // .lineTo(docWidth, nodeY);
86587
- // horizontalLine.name = comment.id;
86588
- // horizontalLine.alpha = 0.5;
86589
- // //指向线
86590
- // const guideLine = new createjs.Shape();
86591
- // guideLine.graphics
86592
- // .setStrokeDash([4, 1], 0)
86593
- // .setStrokeStyle(1)
86594
- // .beginStroke("rgba(255, 0, 0, 1)")
86595
- // .moveTo(docWidth, nodeY)
86596
- // .lineTo(docWidth + 15, commentY - comment.lineHeight / 4);
86597
- // guideLine.name = comment.id;
86598
- // guideLine.alpha = 0.5;
86599
- // container.uncache();
86600
- // container.addChild(backShape);
86601
- // container.addChild(nameTextShape);
86602
- // container.addChild(dateTextShape);
86603
- // container.addChild(commentTextShape);
86604
- // backShape.addEventListener("mousedown", (e: any) =>
86605
- // this.onMouseDown(e, comment)
86606
- // );
86607
- // dline.stage.addChild(horizontalLine);
86608
- // dline.stage.addChild(guideLine);
86609
- // dline.stage.addChild(container);
86610
- // dline.stage.update();
86611
- // }
86612
- // public onMouseDown(e: any, comment: Comment) {
86613
- // this.curOnSelectedComment = comment;
86614
- // e.target.alpha = 1;
86615
- // const endDrawNode = comment.eNode.drawNodes[0];
86616
- // const dline = this.getDrawLineByDNode(
86617
- // endDrawNode
86618
- // ); // 末尾标记节点所在行
86619
- // for (let i = 3; i < dline.stage.children.length; i++) {
86620
- // const child = dline.stage.children[i];
86621
- // if (child instanceof createjs.Shape && child.name === comment.id) {
86622
- // child.alpha = 1;
86623
- // }
86624
- // }
86625
- // // dline.update();
86626
- // dline.stage.update();
86627
- // }
86628
- //#endregion
86629
- // /**
86630
- // * 根据路径,返回drawHeader实例
86631
- // * @param spath
86632
- // */
86633
- // public getHeaderByPath(spath: string): DrawHeader {
86634
- // const arr = spath.split("/");
86635
- // const index = parseInt(arr[1]);
86636
- // if (index > this.headerDNodes.length - 1) {
86637
- // //新的页眉,添加新的数据
86638
- // this.headerDNodes.push(new Array<DrawLine | DrawTable>());
86639
- // this.buildDrawTree(`${gHeaderPath}/${index}`);
86640
- // }
86641
- // const path = `${arr[0]}/${arr[1]}`;
86642
- // let item = this._headers.get(path);
86643
- // if (!item) {
86644
- // item = new DrawHeader(path); //, this.headerDNodes[index]);
86645
- // this._headers.set(path, item);
86646
- // }
86647
- // return item;
86648
- // }
86649
- // /**
86650
- // * 根据路径,返回DrawFooter实例
86651
- // * @param spath
86652
- // */
86653
- // public getFooterByPath(spath: string): DrawFooter {
86654
- // const arr = spath.split("/");
86655
- // const index = parseInt(arr[1]);
86656
- // if (index > this.footerDNodes.length - 1) {
86657
- // this.footerDNodes.push(new Array<DrawLine | DrawTable>());
86658
- // this.buildDrawTree(`${gFooterPath}/${index}`);
86659
- // }
86660
- // const path = `${arr[0]}/${arr[1]}`;
86661
- // let item = this._footers.get(path);
86662
- // if (!item) {
86663
- // item = new DrawFooter(path); //, this.footerDNodes[index]);
86664
- // this._footers.set(path, item);
86665
- // }
86666
- // return item;
86667
- // }
86668
85871
  }, {
86669
85872
  key: "onSelectChanged",
86670
85873
  value: function onSelectChanged(e) {
@@ -86672,31 +85875,14 @@ var DrawTree = /*#__PURE__*/function () {
86672
85875
  if (e.newRange.startPath === "" || e.newRange.endPath === "") {
86673
85876
  return false;
86674
85877
  }
86675
- // if (this._inChanging) {
86676
- // setTimeout(() => {
86677
- // this.onSelectChanged(e);
86678
- // }, 200);
86679
- // }
86680
- var startNP = hoEditorFactory.docTree.findNodePositionByPath(e.newRange.startPath);
86681
85878
  var endNp = hoEditorFactory.docTree.findNodePositionByPath(e.newRange.endPath);
86682
85879
  var pStartPoint = StagePosition/* StagePosition */.M.getStagePosByPath(this._hoEditorFactoryID, e.newRange.startPath);
86683
- // if (pStartPoint.dline instanceof DrawLine && !pStartPoint.dline.stage) {
86684
- // setTimeout(() => {
86685
- // this.onSelectChanged(e);
86686
- // }, 200);
86687
- // }
86688
85880
  var pEndPoint;
86689
85881
  if (e.newRange.endPath === e.newRange.startPath) {
86690
85882
  pEndPoint = pStartPoint;
86691
85883
  } else {
86692
85884
  pEndPoint = StagePosition/* StagePosition */.M.getStagePosByPath(this._hoEditorFactoryID, e.newRange.endPath);
86693
85885
  }
86694
- // if (pStartPoint.dline instanceof DrawLine && !pEndPoint.dline.stage) {
86695
- // setTimeout(() => {
86696
- // this.onSelectChanged(e);
86697
- // }, 200);
86698
- // }
86699
- //this._selectRange.clearAllSelectShape;
86700
85886
  this._selectRange.spStart = pStartPoint;
86701
85887
  this._selectRange.spEnd = pEndPoint;
86702
85888
  this.drawSelectRange();
@@ -86910,38 +86096,6 @@ var DrawTree = /*#__PURE__*/function () {
86910
86096
  }
86911
86097
  return [droots, path];
86912
86098
  }
86913
- // /**
86914
- // *
86915
- // * @param pageNo 页码
86916
- // * @returns 返回指定页对应的页眉文档路径
86917
- // */
86918
- // public getPageHeaderPath(pageNo: number): string {
86919
- // let ret = "";
86920
- // const dNodes = this.getHeaderDNodes(pageNo);
86921
- // if (dNodes) {
86922
- // const index = this._headerChildNodes.indexOf(dNodes);
86923
- // if (index >= 0) {
86924
- // ret = `${gHeaderPath}/${index}`;
86925
- // }
86926
- // }
86927
- // return ret;
86928
- // }
86929
- // /**
86930
- // *
86931
- // * @param pageNo 页码
86932
- // * @returns 返回指定页对应的页脚文档路径
86933
- // */
86934
- // public getPageFooterPath(pageNo: number): string {
86935
- // let ret = "";
86936
- // const dNodes = this.getFooterDNodes(pageNo);
86937
- // if (dNodes) {
86938
- // const index = this._footerChildNodes.indexOf(dNodes);
86939
- // if (index >= 0) {
86940
- // ret = `${gFooterPath}/${index}`;
86941
- // }
86942
- // }
86943
- // return ret;
86944
- // }
86945
86099
  /**
86946
86100
  * @author xyl
86947
86101
  * @param dPage 绘制页
@@ -86981,12 +86135,6 @@ var DrawTree = /*#__PURE__*/function () {
86981
86135
  if (lineIndex === 0) {
86982
86136
  selectStart = dLine.paragraphNode.getNodePath();
86983
86137
  } else {
86984
- //取上一行的最后一个绘制点
86985
- // console.log("line", lineIndex);
86986
- // console.log(
86987
- // "length",
86988
- // dLine.paragraphNode.drawlines[lineIndex - 1].drawItems.length
86989
- // );
86990
86138
  var dNode = dLine.paragraphNode.drawlines[lineIndex - 1].drawItems[dLine.paragraphNode.drawlines[lineIndex - 1].drawItems.length - 1];
86991
86139
  if ((0,IDrawInfos/* instanceOfIDrawInfos */.r)(dNode)) {
86992
86140
  var node = dNode.node;
@@ -87036,16 +86184,6 @@ var DrawTree = /*#__PURE__*/function () {
87036
86184
  dPage = hoEditorFactory.drawPageTree.getDrawPageByDNode(dPageTable);
87037
86185
  }
87038
86186
  }
87039
- // const drawPageTable = (dNode as DrawTable).drawPageTables.values().next()
87040
- // .value;
87041
- // if (drawPageTable instanceof DrawPageTable) {
87042
- // dNode = drawPageTable;
87043
- // const [dPage, x, y, aHeight] = drawPageTable.getPageTableStartPos();
87044
- // this._caret.height = aHeight;
87045
- // if (dPage.drawSelectLevel)
87046
- // return;
87047
- // }
87048
- // }
87049
86187
  var dline = this.getDrawLineByDNode(dNode);
87050
86188
  dPage = hoEditorFactory.drawPageTree.getDrawPageByDNode(dline);
87051
86189
  if (strPath.startsWith(DocTree/* gHeaderPath */.Yh) || strPath.startsWith(DocTree/* gFooterPath */.LE)) {
@@ -87091,7 +86229,6 @@ var DrawTree = /*#__PURE__*/function () {
87091
86229
  } else {
87092
86230
  this._caretTimeOutCount += 1;
87093
86231
  if (this._caretTimeOutCount > 5) {
87094
- // this.rebuildAllDrawLine();
87095
86232
  this._caretTimeOutCount = 0;
87096
86233
  return;
87097
86234
  } else setTimeout(function () {
@@ -87130,13 +86267,11 @@ var DrawTree = /*#__PURE__*/function () {
87130
86267
  }, {
87131
86268
  key: "moveCaretToDitem",
87132
86269
  value: function moveCaretToDitem(dPage, dLine, index) {
87133
- // this._caret.visible = true;
87134
86270
  var dParent = dLine.parent;
87135
86271
  while (dParent && !(dParent instanceof DrawArea/* DrawArea */.l)) {
87136
86272
  dParent = dParent.parent;
87137
86273
  }
87138
86274
  if (!dParent || !(dParent instanceof DrawArea/* DrawArea */.l)) {
87139
- // throw new Error(`错误的光标位置`);
87140
86275
  return;
87141
86276
  }
87142
86277
  var dPlace = dParent;
@@ -87155,7 +86290,6 @@ var DrawTree = /*#__PURE__*/function () {
87155
86290
  dest.x += dLine.dWidth / 2;
87156
86291
  }
87157
86292
  }
87158
- //this._caret.dLine = dLine;
87159
86293
  this._caret.height = dLine.dHeight + dLine.paragraphNode.combineParagraph.lineSpace;
87160
86294
  // 只读模式
87161
86295
  if (this._paintStatus !== PaintState.psReadOnly) {
@@ -87180,18 +86314,7 @@ var DrawTree = /*#__PURE__*/function () {
87180
86314
  }
87181
86315
  }
87182
86316
  var _dest = dLine.localToLocal(x + dNode.dWidth + aCharSpace - 1, 0, dPage.drawDocContainer);
87183
- // console.log(`dNode坐标x=${ dNode.x}宽度=${(dNode as DrawInfos).dWidth} 空白=${ (dNode as DrawInfos).charSpace} y=${dLine.y} ` );
87184
- // console.log(`dNode的变换后的坐标x=${dest.x} y=${dest.y}` );
87185
86317
  this._caret.height = dLine.dHeight + dLine.paragraphNode.combineParagraph.lineSpace;
87186
- // this._caret.dLine = dLine;
87187
- // if (dNode instanceof DrawTextNode) {
87188
- // this._caret.height =
87189
- // dNode.dHeight * dLine.paragraphNode.combineParagraph.lineSpace +
87190
- // dLine.paragraphNode.combineParagraph.lineSpace;
87191
- // } else {
87192
- // this._caret.height =
87193
- // dLine.dHeight + dLine.paragraphNode.combineParagraph.lineSpace;
87194
- // }
87195
86318
  if (this._paintStatus !== PaintState.psReadOnly) {
87196
86319
  if (dNode instanceof DrawSignNode/* DrawSignNode */.V) {
87197
86320
  this._caret.setStagePosition(_dest.x - dNode.dWidth, _dest.y);
@@ -87311,38 +86434,9 @@ var DrawTree = /*#__PURE__*/function () {
87311
86434
  }, {
87312
86435
  key: "clearAllPage",
87313
86436
  value: function clearAllPage() {
87314
- // this._activePage = null;
87315
86437
  for (var i = 0; i < this._drawPages.length; i++) {
87316
86438
  this._drawPages[i].clear();
87317
- // if (this._paintStatus === PaintState.psPreview) {
87318
- // const dpage = this._drawPages[i];
87319
- // if (dpage && dpage.drawDomLevel && dpage.drawSelectLevel) {
87320
- // if (
87321
- // this.paintStatus !== PaintState.psPreview
87322
- // ) {
87323
- // dpage.drawSelectLevel.stage = new createjs.StageGL(
87324
- // dpage.drawSelectLevel.selectCanvas,
87325
- // {
87326
- // transparent: true,
87327
- // }
87328
- // );
87329
- // dpage.drawDomLevel.stage = new createjs.StageGL(
87330
- // dpage.drawDomLevel.canvas
87331
- // );
87332
- // (dpage.drawDomLevel.stage as any).setClearColor("#ffffff");
87333
- // } else {
87334
- // dpage.drawSelectLevel.stage = new createjs.Stage(
87335
- // dpage.drawSelectLevel.selectCanvas
87336
- // );
87337
- // dpage.drawDomLevel.stage = new createjs.Stage(
87338
- // dpage.drawDomLevel.canvas
87339
- // );
87340
- // }
87341
- // dpage.init(dpage.drawDomLevel, dpage.drawSelectLevel);
87342
- // }
87343
- // }
87344
86439
  }
87345
-
87346
86440
  this._drawPages.length = 0;
87347
86441
  }
87348
86442
  // 清理绘制树
@@ -87427,27 +86521,10 @@ var DrawTree = /*#__PURE__*/function () {
87427
86521
  return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee$(_context) {
87428
86522
  while (1) switch (_context.prev = _context.next) {
87429
86523
  case 0:
87430
- hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID); // const [dCell, dlines] = this.getDrawRootsByPath(strPath);
87431
- // if (!dlines) {
87432
- // console.log("无法根据文档路径找到绘制树:" + strPath);
87433
- // return;
87434
- // }
86524
+ hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
87435
86525
  pageIndex = 0;
87436
86526
  this.clearDrawContainer(dlines);
87437
86527
  this.initAreaFirstNode(nodes, dlines);
87438
- // const np = hoEditorFactory.docTree.findNodePositionByPath(strPath);
87439
- // if (np) {
87440
- // if (!np.node) {
87441
- // console.log("无法根据文档路径找到文档树:" + strPath);
87442
- // return;
87443
- // } else
87444
- // (nodes[0] as ParagraphNode).node2DrawNode();
87445
- // const strPath = nodes[0].getNodePath();
87446
- // const drawArea = hoEditorFactory.drawPageTree.getFirstDrawArea(
87447
- // strPath
87448
- // );
87449
- // dlines.push((nodes[0] as ParagraphNode).drawlines[0]);
87450
- // drawArea.addChild((nodes[0] as ParagraphNode).drawlines[0]);
87451
86528
  dcChangeEvent = new NodeChangeEvent/* NodeChangeEvent */.G(this._hoEditorFactoryID, DocTree/* DocAction */.gk.daInsert, nodes[0].getNodePath(),
87452
86529
  //"main/0",
87453
86530
  hoEditorFactory.docTree.getNodeLastPath(nodes[nodes.length - 1]));
@@ -87463,15 +86540,7 @@ var DrawTree = /*#__PURE__*/function () {
87463
86540
  return _buildDrawTree.apply(this, arguments);
87464
86541
  }
87465
86542
  return buildDrawTree;
87466
- }() // public fullRePaint() {
87467
- // return;
87468
- // }
87469
- // public updateByRange() {
87470
- // return;
87471
- // }
87472
- // public updateDrawtreeRange(range: DomRange): void {
87473
- // return;
87474
- // }
86543
+ }()
87475
86544
  /**
87476
86545
  * @author xyl
87477
86546
  * @param nodePath 树节点路径
@@ -87510,10 +86579,6 @@ var DrawTree = /*#__PURE__*/function () {
87510
86579
  value: function getDNodeByPath(strPath) {
87511
86580
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
87512
86581
  var np = hoEditorFactory.docTree.findNodePositionByPath(strPath);
87513
- // const roots= this.getDrawRootsByPath(dPath);
87514
- // const darr = dPath.split("/");
87515
- // let istart=1;
87516
- // let proots: createjs.DisplayObject[]|null =roots;
87517
86582
  if (np && np.node) {
87518
86583
  if (np.childIndex >= 0) {
87519
86584
  if (np.node instanceof TextNode/* TextNode */.R) {
@@ -87577,78 +86642,6 @@ var DrawTree = /*#__PURE__*/function () {
87577
86642
  }
87578
86643
  return ret;
87579
86644
  }
87580
- // public updateDrawTree(range: DomRange): boolean {
87581
- // return false;
87582
- // }
87583
- // //是否能放入此方框
87584
- // public canFit(
87585
- // drawObj: createjs.DisplayObject,
87586
- // x: number,
87587
- // y: number,
87588
- // arect: createjs.Rectangle
87589
- // ): boolean {
87590
- // const abound = drawObj.getBounds();
87591
- // return arect.contains(x, y, abound.width, abound.height);
87592
- // }
87593
- // //放入方框
87594
- // public addToRect(
87595
- // drawObj: createjs.DisplayObject,
87596
- // x: number,
87597
- // y: number,
87598
- // arect: createjs.Rectangle
87599
- // ): createjs.Rectangle {
87600
- // const abound = drawObj.getBounds();
87601
- // return arect.union(
87602
- // new createjs.Rectangle(x, y, abound.width, abound.height)
87603
- // );
87604
- // }
87605
- // public getClickedPosition(
87606
- // dPage: DrawPage,
87607
- // stage: createjs.Stage,
87608
- // x: number,
87609
- // y: number,
87610
- // stageX: number,
87611
- // stageY: number
87612
- // ) {
87613
- // const roots = this.getDrawNodesByPos(dPage, x, y);
87614
- // if (!roots) {
87615
- // return;
87616
- // } else if (roots.length === 0) {
87617
- // return;
87618
- // } else {
87619
- // const dLine = roots[roots.length - 1];
87620
- // let arect: createjs.Rectangle;
87621
- // if (dLine.dTop + dLine.dHeight < y) {
87622
- // if (dLine.drawItems.length > 0) {
87623
- // arect = dLine.drawItems[dLine.drawItems.length - 1].getBounds();
87624
- // stageX = arect.x + arect.width + 1;
87625
- // stageY = arect.y;
87626
- // } else {
87627
- // arect = dLine.getBounds();
87628
- // stageX = arect.x;
87629
- // stageY = arect.y;
87630
- // }
87631
- // } else {
87632
- // const dobj = stage.getObjectUnderPoint(stageX, stageY, 0);
87633
- // arect = dobj.getBounds();
87634
- // stageX = arect.x + arect.width + 1;
87635
- // stageY = arect.y;
87636
- // }
87637
- // }
87638
- // }
87639
- // public paintItem(obj:BaseNode , pos: PaintPosition ): PaintPosition{
87640
- // }
87641
- // //完全重绘
87642
- // public fullDraw(): void {
87643
- // createjs.Ticker.paused=true;
87644
- // // this.clearAllPage();
87645
- // // let pageIndex=0;
87646
- // let dPage= this.drawPages[pageIndex];
87647
- // let paintPosition= new PaintPosition()
87648
- // for (let i=0;i<this.__docTree.nodes.length;i++){
87649
- // this.paintItem(this.__docTree.nodes[i])
87650
- // }
87651
- // }
87652
86645
  //激活页
87653
86646
  }, {
87654
86647
  key: "getLevel",
@@ -87664,27 +86657,6 @@ var DrawTree = /*#__PURE__*/function () {
87664
86657
  } while (pnode !== null);
87665
86658
  return iret;
87666
86659
  }
87667
- // public addNewParagraph(dNode: DrawParagraph): DrawParagraph{
87668
- // let pdNode= dNode.parentDNode;
87669
- // let ret: DrawParagraph;
87670
- // }
87671
- // }
87672
- // /**
87673
- // * @author xyl
87674
- // * @param startPath 重绘起始位置
87675
- // * @param endPath //重绘结束位置
87676
- // * @returns 获取重绘范围
87677
- // */
87678
- // public updateRedrawRange(startPath: NodePath,endPath: NodePath){
87679
- // if (!this._redrawRange){
87680
- // const start= new PaintPosition(this,startPath);
87681
- // const end= new PaintPosition(this,endPath);
87682
- // this._redrawRange=new PaintRange(this,start,end);
87683
- // } else {
87684
- // this._redrawRange.startPos.dPath=startPath;
87685
- // this._redrawRange.endPos.dPath=endPath
87686
- // }
87687
- // }
87688
86660
  }, {
87689
86661
  key: "getDrawLineByDNode",
87690
86662
  value: function getDrawLineByDNode(dNode) {
@@ -87701,7 +86673,6 @@ var DrawTree = /*#__PURE__*/function () {
87701
86673
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
87702
86674
  var dLine = hoEditorFactory.docTree.getNodeParaNode(dNode.node).getLastDrawline();
87703
86675
  return dLine;
87704
- // throw new Error(`未找到路径${((dNode as unknown) as DrawInfos).node.getNodePath()}的绘制行`)
87705
86676
  }
87706
86677
  /**
87707
86678
  * @author xyl
@@ -87732,27 +86703,7 @@ var DrawTree = /*#__PURE__*/function () {
87732
86703
  var hoeditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
87733
86704
  var prevPara = hoeditorFactory.docTree.getSameRectPrevParanode(paraNode);
87734
86705
  var dTop = 0;
87735
- // const pNode = paraNode.parentNode;
87736
86706
  if (!prevPara || hoeditorFactory.drawTree.paintStatus != PaintState.psDesign && prevPara.customProperty && prevPara.customProperty.hidden == "true") {
87737
- // if (pNode) {
87738
- // if (
87739
- // pNode instanceof CellNode &&
87740
- // (pNode as CellNode).childNodes.length > 0
87741
- // ) {
87742
- // const cell = pNode as CellNode;
87743
- // const rowIndex = cell.childNodes.indexOf();
87744
- // dTop = cell.table.rowInfos[rowIndex].rowBaseDTop;
87745
- // } else if (pNode instanceof TextInputFieldNode) {
87746
- // const snode = pNode as TextInputFieldNode;
87747
- // //TODO:后面添加属性后这里再做更新
87748
- // const lineindex = 0;
87749
- // dTop = 0;
87750
- // } else {
87751
- // throw new Error(
87752
- // "错误的文档结构,文档与区域节点,需要以段落为起始节点"
87753
- // );
87754
- // }
87755
- // }
87756
86707
  dTop = paraNode.combineParagraph.topMarginPixes;
87757
86708
  }
87758
86709
  //存在上一个同区域段落节点
@@ -87790,9 +86741,6 @@ var DrawTree = /*#__PURE__*/function () {
87790
86741
  } else {
87791
86742
  //页的起始段茖
87792
86743
  var dpageIndex = pageNo;
87793
- // if (!paraNode.rootPath.startsWith(gMainPath) && this._activePage) {
87794
- // dpageIndex = this._activePage.pageIndex;
87795
- // }
87796
86744
  return new PagePaintPosition/* PagePaintPosition */.O(this._hoEditorFactoryID, dpageIndex, paraNode.combineParagraph.leftMarginPixes, paraNode.combineParagraph.topMarginPixes);
87797
86745
  }
87798
86746
  } else {
@@ -87830,8 +86778,6 @@ var DrawTree = /*#__PURE__*/function () {
87830
86778
  key: "addPage",
87831
86779
  value: function addPage() {
87832
86780
  var dpage = new DrawPage(this._hoEditorFactoryID, this._drawPages.length //,
87833
- //HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree,
87834
- //this
87835
86781
  );
87836
86782
 
87837
86783
  this._drawPages.push(dpage);
@@ -87851,14 +86797,6 @@ var DrawTree = /*#__PURE__*/function () {
87851
86797
  //将拉置排序
87852
86798
  var aRange = this._selectRange.normalize();
87853
86799
  this._caret.visible = false;
87854
- // const [dStartCell, startRoots] = this.getDrawRootsByPath(
87855
- // aRange.spStart.path
87856
- // );
87857
- // const [dEndCell, endRoots] = this.getDrawRootsByPath(
87858
- // aRange.spEnd.path
87859
- // );
87860
- // const istart = roots.indexOf(aRange.spStart.dline);
87861
- // const iend = roots.indexOf(aRange.spEnd.dline);
87862
86800
  aRange.clearAllSelectShape();
87863
86801
  if (aRange.spStart.path.indexOf('-') > 0 || aRange.spEnd.path.indexOf('-') > 0) {
87864
86802
  return;
@@ -87871,22 +86809,14 @@ var DrawTree = /*#__PURE__*/function () {
87871
86809
  return;
87872
86810
  }
87873
86811
  var arrDrawDlines = new SelectRange/* SelectRange */.E(this._hoEditorFactoryID).getRangeDrawLines(aRange.spStart.path, aRange.spEnd.path, false);
87874
- // const adomRange = new DomRange(
87875
- // this._hoEditorFactory,
87876
- // aRange.spStart.path,
87877
- // aRange.spEnd.path
87878
- // );
87879
86812
  var bInSameRect = NodePosition/* NodePosition */.F.pathInSameRect(this._hoEditorFactoryID, aRange.spStart.path, aRange.spEnd.path);
87880
86813
  //选区变化后,删除不在选区内的绘制块内容
87881
- // const shapeMap = aRange.clearNotInRangeShape(aRange, istart, iend);
87882
86814
  var dPage = aRange.spStart.page;
87883
86815
  var dStartDline = aRange.spStart.dline;
87884
86816
  var istart = 0;
87885
- if (dStartDline instanceof DrawLine/* DrawLine */.a) istart = arrDrawDlines.indexOf(dStartDline);
87886
- // const [dcell, droots] = this.getDrawRootsByPath(aRange.spStart.path);
87887
- // let arrDrawDlines: Array<DrawLine | DrawTable> = new Array<
87888
- // DrawLine | DrawTable
87889
- // >();
86817
+ if (dStartDline instanceof DrawLine/* DrawLine */.a) {
86818
+ istart = arrDrawDlines.indexOf(dStartDline);
86819
+ }
87890
86820
  for (var i = istart; i < arrDrawDlines.length; i++) {
87891
86821
  var left = 0;
87892
86822
  var dnextDline = arrDrawDlines[i];
@@ -87895,7 +86825,6 @@ var DrawTree = /*#__PURE__*/function () {
87895
86825
  }
87896
86826
  var right = 1 + dnextDline.paragraphNode.combineParagraph.charSpace;
87897
86827
  dPage = hoeditorfacotry.drawPageTree.getDrawPageByDNode(dnextDline);
87898
- // const idItemStart = nextRoots.indexOf(dnextDline);
87899
86828
  //处理开始行的部分选中
87900
86829
  if (dnextDline === aRange.spStart.dline && aRange.spStart.index >= 0) {
87901
86830
  var ditem = dnextDline.drawItems[aRange.spStart.index];
@@ -87907,7 +86836,6 @@ var DrawTree = /*#__PURE__*/function () {
87907
86836
  left = ditem.x + ditem.dWidth + dnextDline.charSpace;
87908
86837
  }
87909
86838
  }
87910
- // if (!dPage) dPage = this.getDrawPageByDomStage(dnextDline.stage);
87911
86839
  //处理结束行的部分选中
87912
86840
  if (dnextDline === aRange.spEnd.dline) {
87913
86841
  if (aRange.spEnd.index >= 0) {
@@ -87928,16 +86856,6 @@ var DrawTree = /*#__PURE__*/function () {
87928
86856
  right = _ditem2.x + _ditem2.dWidth + dnextDline.charSpace;
87929
86857
  }
87930
86858
  }
87931
- // if (shapeMap.has(i) && shapeMap.get(i)) {
87932
- // const shape = shapeMap.get(i);
87933
- // if (shape) {
87934
- // shape.startIndex = idItemStart;
87935
- // shape.endIndex = idItemEnd;
87936
- // if (shape.bChanged && dPage && dPage.drawSelectLevel) {
87937
- // shape.updateShape();
87938
- // }
87939
- // }
87940
- // } else {
87941
86859
  if (dPage && dPage.selectContainer) {
87942
86860
  var shape = new DrawSelect(this._hoEditorFactoryID, dPage.pageIndex, dnextDline, left, right, bInSameRect, aRange.spStart.dline.paragraphNode.parentNode, aRange.spEnd.dline.paragraphNode.parentNode, "blue");
87943
86861
  shape.name = "select";
@@ -87948,27 +86866,12 @@ var DrawTree = /*#__PURE__*/function () {
87948
86866
  }
87949
86867
  this.selectRange.addSelectShape(shape);
87950
86868
  }
87951
- // }
87952
- // if (dnextDline === aRange.spEnd.dline) {
87953
- // break;
87954
- // }
87955
- // const oldDline: DrawLine | DrawTable = dnextDline;
87956
86869
  }
87957
-
87958
86870
  for (var j = dPages.length - 1; j >= 0; j--) {
87959
86871
  var aPage = dPages[j];
87960
86872
  if (aPage && aPage.drawSelectLevel && aPage.drawSelectLevel.stage) aPage.drawSelectLevel.stage.update();
87961
86873
  }
87962
86874
  }
87963
- //function
87964
- // public insertNode;
87965
- // public updateNode;x
87966
- // public addNode;
87967
- // public selectNode
87968
- // public getNextSibling;
87969
- // public getPrevSibling;
87970
- // public removeNode;
87971
- // public draw;
87972
86875
  }
87973
86876
  }, {
87974
86877
  key: "drawMultiCustomRange",
@@ -88026,7 +86929,6 @@ var DrawTree = /*#__PURE__*/function () {
88026
86929
  left = ditem.x + ditem.dWidth + dnextDline.charSpace;
88027
86930
  }
88028
86931
  }
88029
- // if (!dPage) dPage = this.getDrawPageByDomStage(dnextDline.stage);
88030
86932
  //处理结束行的部分选中
88031
86933
  if (dnextDline === aRange.spEnd.dline) {
88032
86934
  if (aRange.spEnd.index >= 0) {
@@ -88050,8 +86952,6 @@ var DrawTree = /*#__PURE__*/function () {
88050
86952
  var color = hoeditorfacotry.option.getColorByLevel(15);
88051
86953
  if (dPage && dPage.selectContainer) {
88052
86954
  var shape = new DrawSelect(this._hoEditorFactoryID, dPage.pageIndex, dnextDline, left, right, bInSameRect, aRange.spStart.dline.paragraphNode.parentNode, aRange.spEnd.dline.paragraphNode.parentNode, color, true);
88053
- //shape.name = "select";
88054
- //shape.alpha = 0.3;
88055
86955
  dPage.selectContainer.addChild(shape);
88056
86956
  if (dPages.indexOf(dPage) < 0) {
88057
86957
  dPages.push(dPage);
@@ -88065,15 +86965,6 @@ var DrawTree = /*#__PURE__*/function () {
88065
86965
  if (aPage && aPage.drawSelectLevel && aPage.drawSelectLevel.stage) aPage.drawSelectLevel.stage.update();
88066
86966
  }
88067
86967
  }
88068
- //function
88069
- // public insertNode;
88070
- // public updateNode;x
88071
- // public addNode;
88072
- // public selectNode
88073
- // public getNextSibling;
88074
- // public getPrevSibling;
88075
- // public removeNode;
88076
- // public draw;
88077
86968
  }
88078
86969
  }, {
88079
86970
  key: "insertDline",
@@ -88141,126 +87032,6 @@ var DrawTree = /*#__PURE__*/function () {
88141
87032
  }
88142
87033
  }, listDrawLineByPathRange);
88143
87034
  })
88144
- /*
88145
- public addEventForNode(dline: DrawLine, node: BaseNode) {
88146
- const drawSelectLevel = (this.activePage
88147
- ?.drawSelectLevel as unknown) as DrawSelectLevel;
88148
- if (node instanceof RadioAndCheckBoxNode) {
88149
- if (drawSelectLevel) {
88150
- if (drawSelectLevel.shapesColor.get(node.id)) {
88151
- return;
88152
- }
88153
- }
88154
- }
88155
- this.drawBackcolor(dline, node);
88156
- }
88157
- public drawBackcolor(dline: DrawLine, node: BaseNode) {
88158
- const drawSelectLevel = (this.activePage
88159
- ?.drawSelectLevel as unknown) as DrawSelectLevel;
88160
- const dPage = this.activePage;
88161
- const drawDomLevel = (this.activePage
88162
- ?.drawDomLevel as unknown) as DrawDomLevel;
88163
- const bColor = new createjs.Shape();
88164
- if (drawSelectLevel && drawDomLevel && dPage) {
88165
- if (node instanceof RadioAndCheckBoxNode) {
88166
- const drawNode = node.drawNodes[0] as DrawRadioAndCheckBox;
88167
- const stagePt = dPage.drawMainDoc.localToGlobal(drawNode.x, dline.y);
88168
- const localPt = drawSelectLevel.stage.globalToLocal(
88169
- stagePt.x,
88170
- stagePt.y
88171
- );
88172
- bColor.y = localPt.y;
88173
- bColor.graphics
88174
- .beginFill("#ADD8E6")
88175
- .drawRect(
88176
- localPt.x,
88177
- dline.dHeight / 4,
88178
- drawNode.dWidth,
88179
- drawNode.dHeight
88180
- );
88181
- bColor.alpha = 0.01;
88182
- drawSelectLevel.stage.addChild(bColor);
88183
- drawSelectLevel.shapesColor.set(node.id, bColor);
88184
- // bColor.on("click", (aevent: any) => {
88185
- // if (aevent.nativeEvent.button === 0) {
88186
- // const nodeClickEvent = new NodeClickEvent(node, "click");
88187
- // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.nodeClick(nodeClickEvent);
88188
- // }
88189
- // });
88190
- }
88191
- const mouseOverEvent = new NodeMouseOverEvent(node, bColor);
88192
- //this.nodeMouseOver(mouseOverEvent);
88193
- const mouseOutEvent = new NodeMouseOutEvent(node, bColor);
88194
- this.onMouseOut(mouseOutEvent);
88195
- }
88196
- }
88197
- public onMouseOver(e: NodeMouseOverEvent): boolean {
88198
- e.selectShape.on("mouseover", (aevent: any) => {
88199
- if (e.node instanceof RadioAndCheckBoxNode) {
88200
- const drawSelectLevel = (this.activePage
88201
- ?.drawSelectLevel as unknown) as DrawSelectLevel;
88202
- const node = e.node;
88203
- aevent.target.alpha = 0.4;
88204
- const boxsMap = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.radioAndCheckBoxsMap;
88205
- if (boxsMap.size > 1) {
88206
- boxsMap.forEach((value, key) => {
88207
- if (
88208
- value.id !== node.id &&
88209
- node.controlStyle === value.controlStyle &&
88210
- node.groupName === value.groupName &&
88211
- node.groupName.length > 0
88212
- ) {
88213
- const shape = drawSelectLevel.shapesColor.get(value.id);
88214
- if (shape && shape.alpha !== 0.4) {
88215
- shape.alpha = 0.4;
88216
- }
88217
- }
88218
- });
88219
- }
88220
- }
88221
- });
88222
- return true;
88223
- }
88224
- public onMouseOut(e: NodeMouseOutEvent): boolean {
88225
- e.selectShape.on("mouseout", (aevent: any) => {
88226
- if (e.node instanceof RadioAndCheckBoxNode) {
88227
- const drawSelectLevel = (this.activePage
88228
- ?.drawSelectLevel as unknown) as DrawSelectLevel;
88229
- const radioAndCheckBoxsMap = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree
88230
- .radioAndCheckBoxsMap;
88231
- aevent.target.alpha = 0.01;
88232
- if (radioAndCheckBoxsMap.size > 1) {
88233
- drawSelectLevel.shapesColor.forEach((value, key) => {
88234
- if (value.alpha !== 0.01) {
88235
- value.alpha = 0.01;
88236
- }
88237
- });
88238
- }
88239
- }
88240
- });
88241
- return true;
88242
- }
88243
- public repaintSelectShape() {
88244
- const drawSelectLevel = (this.activePage
88245
- ?.drawSelectLevel as unknown) as DrawSelectLevel;
88246
- const selectShapes = drawSelectLevel?.shapesColor;
88247
- const boxsMap = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.radioAndCheckBoxsMap;
88248
- if (selectShapes) {
88249
- if (selectShapes.size > 0) {
88250
- selectShapes.forEach((value, key) => {
88251
- selectShapes.delete(key);
88252
- this.activePage?.drawSelectLevel?.stage.removeChild(value);
88253
- });
88254
- }
88255
- boxsMap.forEach((value, key) => {
88256
- const path = value.getNodePath();
88257
- const dline = this.getDlineByPath(path);
88258
- if (dline) this.drawBackcolor(dline, value);
88259
- });
88260
- }
88261
- }
88262
-
88263
- */
88264
87035
  }, {
88265
87036
  key: "updateDlineLeftTop",
88266
87037
  value: function updateDlineLeftTop(hoEditorFactory, dline) {
@@ -88307,9 +87078,7 @@ var DrawTree = /*#__PURE__*/function () {
88307
87078
  _dline3.drawPageTables[0].y = hoEditorFactory.firstPageStartTop;
88308
87079
  } else {
88309
87080
  _dline3.dTop = hoEditorFactory.firstPageStartTop;
88310
- // dline.y = hoEditorFactory.firstPageStartTop;
88311
87081
  }
88312
-
88313
87082
  this.updateDlineLeftTop(hoEditorFactory, _dline3);
88314
87083
  }
88315
87084
  }
@@ -88353,8 +87122,6 @@ var DrawTree = /*#__PURE__*/function () {
88353
87122
  while (1) switch (_context3.prev = _context3.next) {
88354
87123
  case 0:
88355
87124
  moveCaret = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : true;
88356
- // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawPageTree.clear;
88357
- // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawPageTree.initDoc();
88358
87125
  hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
88359
87126
  if (hoEditorFactory.firstPageStartTop > 0) {
88360
87127
  this.drawPages[0].storeDrawHeader.visible = false;
@@ -88603,7 +87370,6 @@ var DrawTree = /*#__PURE__*/function () {
88603
87370
  key: "updatePageCountNodes",
88604
87371
  value: function updatePageCountNodes() {
88605
87372
  var _this4 = this;
88606
- // const pageCount = this.drawPages.length;
88607
87373
  var hoeditfactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
88608
87374
  this.pageCountNodes.forEach(function (value, key) {
88609
87375
  value.drawNodes[0].updatePaint();
@@ -88613,66 +87379,14 @@ var DrawTree = /*#__PURE__*/function () {
88613
87379
  hoeditfactory.subDocManger.updateAllSameSubDoc(dArea.index, dArea.hftType, false, false);
88614
87380
  }
88615
87381
  }
88616
- // value.text = this.drawPages.length.toStri
88617
- // const strText = value.getPageNumText(pageCount, false);
88618
- // (value.drawNodes[0] as DrawPageCountNode).updatePageCount(strText);
88619
- // if (value.rootPath.startsWith("main")) {
88620
- // if (value.drawNodes[0].stage) {
88621
- // const dPage = this.getDrawPageByDomStage(value.drawNodes[0].stage);
88622
- // // this.removePageMarkDrawNode(value);
88623
- // // if (dPage) this.drawAPageMark(dPage, value);
88624
- // }
88625
- // } else {
88626
- // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).subDocManger.updateAPageMark(value);
88627
- // }
88628
87382
  });
88629
- // this.pageNumNodes.forEach((value, key) => {
88630
- // const drawNode = value.drawNodes[0];
88631
- // const drawPage = this.getDrawPageByDomStage(drawNode.stage);
88632
- // if (drawPage) {
88633
- // if (value.rootPath.startsWith("main")) {
88634
- // this.drawAPageMark(value);
88635
- // } else {
88636
- // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).subDocManger.updateAPageMark(value);
88637
- // }
88638
- // }
88639
- // });
88640
87383
  }
88641
- // public removeaPageMark(pageMarkNode: PageNumNode | PageCountNode) {
88642
- // const path = pageMarkNode.getNodePath();
88643
- // if (path.startsWith("main")) {
88644
- // this.removePageMarkDrawNode(pageMarkNode);
88645
- // } else {
88646
- // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).subDocManger.removeAPageMark(pageMarkNode);
88647
- // }
88648
- // }
88649
- // private drawAPageMark(
88650
- // dPage: DrawPage,
88651
- // pageMarkNode: PageNumNode | PageCountNode
88652
- // ) {
88653
- // //this.removePageMarkDrawNode(pageMarkNode);
88654
- // // const dNode = pageMarkNode.drawNodes[0];
88655
- // if (dPage && dPage.drawDomLevel) {
88656
- // const dPageMarkNode = DrawPageMarkNode.paintMarkNode(
88657
- // this._hoEditorFactory,
88658
- // pageMarkNode,
88659
- // dPage,
88660
- // dPage.drawMainDoc
88661
- // );
88662
- // this._drawPageMarks.push(dPageMarkNode);
88663
- // dPage.drawDomLevel.stage.addChild(dPageMarkNode);
88664
- // dPage.drawDomLevel.stage.update();
88665
- // // dNode.stage.update();
88666
- // }
88667
- // }
88668
87384
  }, {
88669
87385
  key: "repaintPageMarkNodes",
88670
87386
  value: function repaintPageMarkNodes(dPage, strPath) {
88671
87387
  var arrNodes = this.getSubDocPageMarkNodes(strPath);
88672
87388
  for (var i = arrNodes.length - 1; i >= 0; i--) {
88673
87389
  arrNodes[i].drawNodes[0].updatePaint();
88674
- // this.removePageMarkDrawNode(arrNodes[i]);
88675
- // this.drawAPageMark(dPage, arrNodes[i]);
88676
87390
  }
88677
87391
  }
88678
87392
  }, {
@@ -88691,23 +87405,6 @@ var DrawTree = /*#__PURE__*/function () {
88691
87405
  });
88692
87406
  return ret;
88693
87407
  }
88694
- // public removeaPageMark(pageMarkNode: PageNumNode | PageCountNode) {
88695
- // const path = pageMarkNode.getNodePath();
88696
- // if (path.startsWith("main")) {
88697
- // this.removePageMarkDrawNode(pageMarkNode);
88698
- // } else {
88699
- // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).subDocManger.removeADrawPageMark(pageMarkNode);
88700
- // }
88701
- // }
88702
- // public removePageMarkDrawNode(pageMarkNode: PageNumNode | PageCountNode) {
88703
- // for (let i = pageMarkNode.length - 1; i >= 0; i--) {
88704
- // const dNode = this._drawPageMarks[i];
88705
- // if (dNode.node == pageMarkNode) {
88706
- // dNode.stage.removeChild(dNode);
88707
- // this._drawPageMarks.splice(i, 1);
88708
- // }
88709
- // }
88710
- // }
88711
87408
  }, {
88712
87409
  key: "clear",
88713
87410
  value: function clear(dlines) {
@@ -88729,11 +87426,11 @@ var DrawTree = /*#__PURE__*/function () {
88729
87426
  dline.uncache();
88730
87427
  for (var _i2 = 0; _i2 < dline.drawItems.length - 1; _i2++) {
88731
87428
  dline.drawItems[_i2].removeAllEventListeners();
88732
- if (dline.drawItems[_i2] instanceof DrawContainer/* DrawContainer */.H) dline.drawItems[_i2].removeAllChildren();
87429
+ if (dline.drawItems[_i2] instanceof DrawContainer/* DrawContainer */.H) {
87430
+ dline.drawItems[_i2].removeAllChildren();
87431
+ }
88733
87432
  dline.drawItems[_i2].drawItems.length = 0;
88734
- // this.removeChild(this._drawItems[i]);
88735
87433
  }
88736
-
88737
87434
  dline.removeAllChildren();
88738
87435
  dline.drawItems.length = 0;
88739
87436
  }
@@ -88766,21 +87463,6 @@ var DrawTree = /*#__PURE__*/function () {
88766
87463
  this._pageNumNodes = new Map();
88767
87464
  this._pageCountNodes = new Map();
88768
87465
  this._errorsMap = new Map();
88769
- // this._drawPageMarks = [];
88770
- // const drawObjet = this.getDNodeByPath("main/0");
88771
- // if (drawObjet instanceof DrawTable) {
88772
- // const drawPageTable = drawObjet.getDrawTableByPageIndex(
88773
- // 0
88774
- // ) as DrawPageTable;
88775
- // if (drawPageTable) {
88776
- // drawPageTable.stage.children.splice(
88777
- // 3,
88778
- // drawPageTable.stage.children.length - 1
88779
- // );
88780
- // }
88781
- // } else {
88782
- // drawObjet.stage.children.splice(3, drawObjet.stage.children.length - 1); //去掉画的批注
88783
- // }
88784
87466
  this._drawPages.splice(0, this._drawPages.length);
88785
87467
  if (this._drawPageCount) {
88786
87468
  this._drawPageCount.count = 0;
@@ -88810,9 +87492,6 @@ var DrawTree = /*#__PURE__*/function () {
88810
87492
  for (var c = 0; c < tb.colCount; c++) {
88811
87493
  var cell = tb.rows[r][c];
88812
87494
  if (cell && cell.drawCell.needUpdate) {
88813
- // const lastDline =
88814
- // cell.drawCell.drawLines[cell.drawCell.drawLines.length - 1];
88815
- // cell.drawCell.docHeight = lastDline.dHeight + lastDline.dTop;
88816
87495
  cell.drawCell.updateHeight();
88817
87496
  var row = r;
88818
87497
  if (cell.rowSpan > 1) {
@@ -88838,9 +87517,7 @@ var DrawTree = /*#__PURE__*/function () {
88838
87517
  _hoEditorFactory$subD2 = (0,slicedToArray/* default */.Z)(_hoEditorFactory$subD, 2),
88839
87518
  headerIndex = _hoEditorFactory$subD2[0],
88840
87519
  dRoots = _hoEditorFactory$subD2[1];
88841
- // const dAreaIndex=hoEditorFactory.subDocManger.getHeaderIndexByRoots(dRoots);
88842
87520
  hoEditorFactory.subDocManger.copySubDocToPages(hoEditorFactory.drawPageTree.drawHeaders[headerIndex], pageIndex, SubDocManger/* HeaderFooterType */.pi.hftHead);
88843
- // this.subDocManger.paintSubDoc(pageIndex, HeaderFooterType.hftHead);
88844
87521
  }
88845
87522
  }, {
88846
87523
  key: "paintFooter",
@@ -88850,9 +87527,7 @@ var DrawTree = /*#__PURE__*/function () {
88850
87527
  _hoEditorFactory$subD4 = (0,slicedToArray/* default */.Z)(_hoEditorFactory$subD3, 2),
88851
87528
  footerIndex = _hoEditorFactory$subD4[0],
88852
87529
  dRoots = _hoEditorFactory$subD4[1];
88853
- // const dAreaIndex=hoEditorFactory.subDocManger.getFooterIndexByRoots(dRoots);
88854
87530
  hoEditorFactory.subDocManger.copySubDocToPages(hoEditorFactory.drawPageTree.drawFooters[footerIndex], pageIndex, SubDocManger/* HeaderFooterType */.pi.hftFoot);
88855
- // this.subDocManger.paintSubDoc(pageIndex, HeaderFooterType.hftFoot);
88856
87531
  }
88857
87532
  }, {
88858
87533
  key: "updateDrawFormular",
@@ -88862,7 +87537,6 @@ var DrawTree = /*#__PURE__*/function () {
88862
87537
  var pnode = value.getParentCell();
88863
87538
  if (cell.table == pnode.table) {
88864
87539
  if (value.formularType === TableFormula/* FormularType */.a.ftSum || value.formularType === TableFormula/* FormularType */.a.ftFormular || value.formularType === TableFormula/* FormularType */.a.ftBMI || value.formularType === TableFormula/* FormularType */.a.ftLaborProcess || value.formularType === TableFormula/* FormularType */.a.ftExpectedBirthDate || value.formularType === TableFormula/* FormularType */.a.ftPregnantWeeks || value.formularType === TableFormula/* FormularType */.a.ftScoreMapping || value.formularType === TableFormula/* FormularType */.a.ftBodySurfaceArea || value.formularType === TableFormula/* FormularType */.a.ftCalcDays || value.formularType === TableFormula/* FormularType */.a.ftCalcTime || value.formularType === TableFormula/* FormularType */.a.ftIdealWeight || value.formularType === TableFormula/* FormularType */.a.ftISS) {
88865
- //const str = value.formulaStr;
88866
87540
  value.updateResult();
88867
87541
  value.getParentCell().drawCell.needUpdate = true;
88868
87542
  isNeedUpdate = true;
@@ -169823,7 +168497,7 @@ var map = {
169823
168497
  "./dateDialog/DateDialog.vue": 14581,
169824
168498
  "./delimiter/Delimiter.vue": 93230,
169825
168499
  "./expressionForm/ExpressionForm.vue": 30852,
169826
- "./findReplace/FindReplace.vue": 98064,
168500
+ "./findReplace/FindReplace.vue": 33693,
169827
168501
  "./gestation/Gestation.vue": 20329,
169828
168502
  "./hoprint/HoPrint.vue": 79228,
169829
168503
  "./listsource/ListSource.vue": 30685,
@@ -208189,7 +206863,6 @@ var DrawSelectLevel = /*#__PURE__*/function () {
208189
206863
  if (hoeditorfactory.drawTree.selectRange.beginRangeSelect && (parseInt(aevent.nativeEvent.buttons) && 1) === 1) {
208190
206864
  var _hoeditorfactory$draw2;
208191
206865
  if ((_hoeditorfactory$draw2 = hoeditorfactory.drawTree.activePage) !== null && _hoeditorfactory$draw2 !== void 0 && _hoeditorfactory$draw2.activeDrawRect.rootPath.startsWith(DocTree/* gMainPath */.d9) && hoeditorfactory.drawTree.activePage !== dPage) {
208192
- // hoeditorfactory.drawTree.activePage?.drawSelectLevel?.stage.update();
208193
206866
  hoeditorfactory.drawTree.activePage = dPage;
208194
206867
  }
208195
206868
  var endPos = hoeditorfactory.drawTree.getStagePosition(dPage, dPage.activeDrawRect, aevent.stageX, aevent.stageY);
@@ -210476,7 +209149,7 @@ var TextNode = __webpack_require__(27198);
210476
209149
  // EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
210477
209150
  var ParagraphNode = __webpack_require__(67945);
210478
209151
  ;// CONCATENATED MODULE: ./src/components/version.ts
210479
- /* harmony default export */ var version = ('3.1.166');
209152
+ /* harmony default export */ var version = ('3.1.167');
210480
209153
  // EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
210481
209154
  var PoperTipText = __webpack_require__(84531);
210482
209155
  ;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
@@ -211587,7 +210260,6 @@ var DrawPageTable = __webpack_require__(15694);
211587
210260
 
211588
210261
 
211589
210262
 
211590
-
211591
210263
 
211592
210264
 
211593
210265
  var NeedDrawPageInfo = /*#__PURE__*/function () {
@@ -211921,21 +210593,12 @@ var DrawPageTree = /*#__PURE__*/function () {
211921
210593
  if (drawArea.allowAcrossPage) restHeight = drawArea.maxHeight - dTop;
211922
210594
  }
211923
210595
  // 判断是否已经满页
211924
- if (dline instanceof DrawTable/* DrawTable */.t && restHeight < hoEditorFactory.defaultLineHeight || dline instanceof DrawLine/* DrawLine */.a && restHeight < dline.dHeight && dTop > 0) {
210596
+ if (dline instanceof DrawTable/* DrawTable */.t && (restHeight < hoEditorFactory.defaultLineHeight || !dline.isFirstRowCanFit(restHeight)) || dline instanceof DrawLine/* DrawLine */.a && restHeight < dline.dHeight && dTop > 0) {
211925
210597
  if (dline instanceof DrawLine/* DrawLine */.a && restHeight >= hoEditorFactory.defaultLineHeight) {
211926
210598
  if (drawArea.contains(dline)) {
211927
210599
  drawArea.removeChild(dline);
211928
210600
  }
211929
210601
  }
211930
- // bIsFull = true;
211931
- // if (drawArea instanceof DrawPageCell) {
211932
- // // const mainArea= this.getMainRootArea(drawArea);
211933
- // // if (mainArea){
211934
- // // const nextArea= this.getNextDrawArea(mainArea);
211935
- // // hoEditorFactory.drawTree.getDrawRootsByPath(drawArea.cell.table.getNodePath());
211936
- // // this.update(mainArea,,)
211937
- // // }
211938
- // }
211939
210602
  if (drawArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
211940
210603
  //当前已经満页,绘制批注页码等信息
211941
210604
  this.afterAreaFinishPaint(drawArea);
@@ -211956,15 +210619,9 @@ var DrawPageTree = /*#__PURE__*/function () {
211956
210619
  if (drawArea.allowAcrossPage) {
211957
210620
  restHeight = drawArea.maxHeight - dTop;
211958
210621
  }
211959
- /*绘制优化
211960
- //if (!isNew && hoEditorFactory.isUseDrawingOptimization) {
211961
- if (hoEditorFactory.isUseDrawingOptimization) {
211962
- break;
211963
- }
211964
- */
211965
210622
  }
211966
210623
  }
211967
- //当前行不会触发满页,正常绘制
210624
+ //当前行不会触发满页,正常绘制
211968
210625
  var _dobj = dRoots[nextLine];
211969
210626
  var cbParagraph = _dobj.paragraphNode.combineParagraph;
211970
210627
  if (_dobj instanceof DrawTable/* DrawTable */.t) {
@@ -211990,8 +210647,6 @@ var DrawPageTree = /*#__PURE__*/function () {
211990
210647
  if (drawArea.allowAcrossPage) restHeight = drawArea.maxHeight - dTop;
211991
210648
  if (restHeight < TableNode/* gDefaultRowHeight */.dT && drawArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
211992
210649
  drawArea.endDline = nextLine - 1;
211993
- // drawArea.stage.update();
211994
- // this.updateDrawPage(drawArea.pageIndex);
211995
210650
  this._startNeedUpdatePage = Math.min(drawArea.pageIndex, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
211996
210651
  this._endNeedUpdatePage = Math.max(drawArea.pageIndex, this._endNeedUpdatePage);
211997
210652
  pageIsFull.set(drawArea.index, true);
@@ -212014,7 +210669,6 @@ var DrawPageTree = /*#__PURE__*/function () {
212014
210669
  if (drawArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
212015
210670
  this._startNeedUpdatePage = Math.min(drawArea.pageIndex, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
212016
210671
  this._endNeedUpdatePage = Math.max(drawArea.pageIndex, this._endNeedUpdatePage);
212017
- // drawArea.stage.update();
212018
210672
  drawArea = this.getNextDrawArea(drawArea)[0];
212019
210673
  dTop = 0;
212020
210674
  if (drawArea.allowAcrossPage) {
@@ -212031,12 +210685,10 @@ var DrawPageTree = /*#__PURE__*/function () {
212031
210685
  restHeight -= cbParagraph.lineSpace;
212032
210686
  }
212033
210687
  } else {
212034
- //普通行绘制,检查是否满页,満页后需要新起一页绘制
210688
+ //普通行绘制,检查是否满页,満页后需要新起一页绘制
212035
210689
  if (_dobj.dHeight > restHeight && dTop > 0) {
212036
210690
  if (drawArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
212037
210691
  drawArea.endDline = nextLine - 1;
212038
- // drawArea.stage.update();
212039
- // this.updateDrawPage(drawArea.pageIndex);
212040
210692
  this._startNeedUpdatePage = Math.min(drawArea.pageIndex, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
212041
210693
  this._endNeedUpdatePage = Math.max(drawArea.pageIndex, this._endNeedUpdatePage);
212042
210694
  pageIsFull.set(drawArea.index, true);
@@ -212054,7 +210706,6 @@ var DrawPageTree = /*#__PURE__*/function () {
212054
210706
  }
212055
210707
  drawArea.addChild(_dobj);
212056
210708
  _dobj.y = dTop;
212057
- // dobj.x = cbParagraph.leftMarginPixes;
212058
210709
  }
212059
210710
  //修改下一行的绘制起始位置
212060
210711
  dTop = _dobj.y + _dobj.dHeight + _dobj.paragraphNode.combineParagraph.lineSpace;
@@ -212063,9 +210714,6 @@ var DrawPageTree = /*#__PURE__*/function () {
212063
210714
  }
212064
210715
  if (nextLine >= endLine) break;else nextLine += 1;
212065
210716
  }
212066
- // if (mainArea.stage) {
212067
- // mainArea.stage.update();
212068
- // }
212069
210717
  var mainIndex = Math.min(nextLine, endLine, startUpdateLine);
212070
210718
  //绘制完成,清理多出来的绘制页
212071
210719
  if (drawArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$ && mainIndex === dRoots.length - 1) {
@@ -212075,7 +210723,6 @@ var DrawPageTree = /*#__PURE__*/function () {
212075
210723
  this._drawMainDocs.splice(areaIndex + 1, this._drawMainDocs.length);
212076
210724
  hoEditorFactory.drawTree.drawPageCount.count = hoEditorFactory.drawTree.drawPages.length;
212077
210725
  this.afterAreaFinishPaint(drawArea);
212078
- // drawArea.stage.update();
212079
210726
  this._startNeedUpdatePage = Math.min(drawArea.pageIndex, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
212080
210727
  this._endNeedUpdatePage = Math.max(drawArea.pageIndex, this._endNeedUpdatePage);
212081
210728
  if (hoEditorFactory.drawTree.drawPages.length !== this._oldPageCount) {
@@ -212084,23 +210731,6 @@ var DrawPageTree = /*#__PURE__*/function () {
212084
210731
  }
212085
210732
  return;
212086
210733
  }
212087
- //页眉页脚绘制完毕
212088
- //2023-12-28日注释 处理首行有日期更新重叠
212089
- // if (
212090
- // drawArea === mainArea &&
212091
- // nextLine === this.drawMainDocs.length - 1 &&
212092
- // startUpdateLine === nextLine
212093
- // ) {
212094
- // this.afterAreaFinishPaint(drawArea);
212095
- // this._startNeedUpdatePage = Math.min(drawArea.index, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
212096
- // this._endNeedUpdatePage = Math.max(drawArea.index, this._endNeedUpdatePage);
212097
- // if (hoEditorFactory.drawTree.drawPages.length !== this._oldPageCount) {
212098
- // this._oldPageCount = 0;
212099
- // hoEditorFactory.drawTree.updatePageCountNodes();
212100
- // }
212101
- // // drawArea.stage.update();
212102
- // return;
212103
- // }
212104
210734
  var dobj = dRoots[mainIndex];
212105
210735
  var startDrawLine;
212106
210736
  var redrawPostion = hoEditorFactory.drawTree.getDlineDrawRootLists(dobj)[0];
@@ -212134,22 +210764,12 @@ var DrawPageTree = /*#__PURE__*/function () {
212134
210764
  //对于新插入的内容绘制完成后(一直到最后一个插入的段落结束),后续的段落需要进行移动位置,则调用update
212135
210765
  this.update(mainArea, dMainRoots, drawTop, mainIndex, mainIndex, true);
212136
210766
  } finally {
212137
- // const iendDraw= hoEditorFactory.drawTree.inViewPages[hoEditorFactory.drawTree.inViewPages.length-1];
212138
- // const istartDraw=hoEditorFactory.drawTree.inViewPages[0];
212139
- // for (let i = iendDraw; i >= istartDraw; i--) {
212140
210767
  hoEditorFactory.drawTree.inViewPages.forEach(function (i) {
212141
210768
  _this.updateDrawPage(i);
212142
210769
  });
212143
- // }
212144
- // for (let i = this._endNeedUpdatePage; i >= this._startNeedUpdatePage; i--) {
212145
- // this.updateDrawPage(i);
212146
- // }
212147
210770
  this._startNeedUpdatePage = -1;
212148
210771
  this._endNeedUpdatePage = -1;
212149
210772
  }
212150
- // if (HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.paintStatus === PaintState.psReview) {
212151
- // drawArea.drawComments();
212152
- // }
212153
210773
  }
212154
210774
  }, {
212155
210775
  key: "paintDrawPageCell",
@@ -212212,33 +210832,14 @@ var DrawPageTree = /*#__PURE__*/function () {
212212
210832
  nextLine += 1;
212213
210833
  continue;
212214
210834
  }
212215
- if (dline instanceof DrawTable/* DrawTable */.t && restHeight < hoEditorFactory.defaultLineHeight || dline instanceof DrawLine/* DrawLine */.a && restHeight < dline.dHeight) {
210835
+ if (dline instanceof DrawTable/* DrawTable */.t && (restHeight < hoEditorFactory.defaultLineHeight || !dline.isFirstRowCanFit(restHeight)) || dline instanceof DrawLine/* DrawLine */.a && restHeight < dline.dHeight) {
212216
210836
  if (dline instanceof DrawLine/* DrawLine */.a && restHeight >= hoEditorFactory.defaultLineHeight) {
212217
210837
  if (drawArea.contains(dline)) {
212218
210838
  drawArea.removeChild(dline);
212219
210839
  }
212220
210840
  }
212221
210841
  bIsFull = true;
212222
- // if (drawArea instanceof DrawPageCell) {
212223
- // // const mainArea= this.getMainRootArea(drawArea);
212224
- // // if (mainArea){
212225
- // // const nextArea= this.getNextDrawArea(mainArea);
212226
- // // hoEditorFactory.drawTree.getDrawRootsByPath(drawArea.cell.table.getNodePath());
212227
- // // this.update(mainArea,,)
212228
- // // }
212229
- // }
212230
- // if (drawArea instanceof DrawPageMainDoc) {
212231
- // this.afterAreaFinishPaint(drawArea);
212232
- // if (drawArea.stage) {
212233
- // this.updateStage(drawArea.stage);
212234
- // }
212235
- // drawArea = this.getNextDrawArea(drawArea);
212236
- // dTop = 0;
212237
- // if (drawArea.allowAcrossPage)
212238
- // restHeight = drawArea.maxHeight - dTop;
212239
- // }
212240
210842
  }
212241
-
212242
210843
  var _dobj2 = dRoots[nextLine];
212243
210844
  var cbParagraph = _dobj2.paragraphNode.combineParagraph;
212244
210845
  if (_dobj2 instanceof DrawTable/* DrawTable */.t) {
@@ -212291,49 +210892,14 @@ var DrawPageTree = /*#__PURE__*/function () {
212291
210892
  if (nextLine > startLine || nextLine === startLine && !drawArea.contains(_dobj2)) {
212292
210893
  drawArea.addChild(_dobj2);
212293
210894
  _dobj2.y = dTop;
212294
- //dobj.x = cbParagraph.leftMarginPixes;
212295
210895
  }
212296
-
212297
210896
  dTop = _dobj2.y + _dobj2.dHeight + _dobj2.paragraphNode.combineParagraph.lineSpace;
212298
210897
  if (drawArea.allowAcrossPage && mainArea.allowAcrossPage) restHeight = drawArea.maxHeight - dTop;
212299
210898
  }
212300
210899
  if (nextLine >= endLine) break;else nextLine += 1;
212301
210900
  }
212302
- // if (mainArea.stage) {
212303
- // mainArea.stage.update();
212304
- // }
212305
210901
  var mainIndex = Math.min(nextLine, endLine, startUpdateLine);
212306
210902
  //正文绘制完毕 最后一行不需要执行更新
212307
- // if (
212308
- // drawArea instanceof DrawPageMainDoc &&
212309
- // mainIndex === dRoots.length - 1
212310
- // ) {
212311
- // const areaIndex = this._drawMainDocs.indexOf(drawArea);
212312
- // this._drawMainDocs.splice(areaIndex + 1, this._drawMainDocs.length);
212313
- // hoEditorFactory.drawTree.drawPages.splice(
212314
- // areaIndex + 1,
212315
- // this._drawMainDocs.length
212316
- // );
212317
- // this.afterAreaFinishPaint(drawArea);
212318
- // if (drawArea.stage) {
212319
- // // drawArea.stage.update();
212320
- // this.updateStage(drawArea.stage);
212321
- // }
212322
- // return;
212323
- // }
212324
- // //页眉页脚绘制完毕
212325
- // if (
212326
- // drawArea === mainArea &&
212327
- // nextLine === this.drawMainDocs.length - 1 &&
212328
- // startUpdateLine === nextLine
212329
- // ) {
212330
- // this.afterAreaFinishPaint(drawArea);
212331
- // if (drawArea.stage) {
212332
- // this.updateStage(drawArea.stage);
212333
- // // drawArea.stage.update();
212334
- // }
212335
- // return;
212336
- // }
212337
210903
  var dobj = dRoots[mainIndex];
212338
210904
  var startDrawLine;
212339
210905
  var redrawPostion = hoEditorFactory.drawTree.getDlineDrawRootLists(dobj)[0];
@@ -212358,7 +210924,9 @@ var DrawPageTree = /*#__PURE__*/function () {
212358
210924
  startDrawLine = dobj;
212359
210925
  }
212360
210926
  var drawTop = startDrawLine.y;
212361
- if (startDrawLine instanceof DrawPageTable/* DrawPageTable */.ox && !mainArea.contains(startDrawLine)) drawTop = 0;
210927
+ if (startDrawLine instanceof DrawPageTable/* DrawPageTable */.ox && !mainArea.contains(startDrawLine)) {
210928
+ drawTop = 0;
210929
+ }
212362
210930
  this.update(mainArea, dMainRoots, drawTop, mainIndex, mainIndex);
212363
210931
  } finally {
212364
210932
  if (hoEditorFactory.drawTree.drawPages.length !== pageCount) {
@@ -212376,8 +210944,6 @@ var DrawPageTree = /*#__PURE__*/function () {
212376
210944
  if (!drawArea) {
212377
210945
  return;
212378
210946
  }
212379
- var startPaintWithUpdate = this._startNeedUpdatePage === -1 && this._endNeedUpdatePage === -1;
212380
- var imaxViewPage = Math.max.apply(Math, (0,esm_toConsumableArray/* default */.Z)(hoEditorFactory.drawTree.inViewPages).concat([this._drawMainDocs.length - 1]));
212381
210947
  try {
212382
210948
  if (this._oldPageCount === 0) {
212383
210949
  this._oldPageCount = hoEditorFactory.drawTree.drawPages.length;
@@ -212466,54 +211032,12 @@ var DrawPageTree = /*#__PURE__*/function () {
212466
211032
  if (this._oldPageCount !== hoEditorFactory.drawTree.drawPages.length) {
212467
211033
  hoEditorFactory.drawTree.updatePageCountNodes();
212468
211034
  }
212469
- // if (startPaintWithUpdate) {
212470
- // for (let i = this._endNeedUpdatePage; i >= this._startNeedUpdatePage; i--) {
212471
- // this.updateDrawPage(i);
212472
- // }
212473
- // const iendDraw= hoEditorFactory.drawTree.inViewPages[hoEditorFactory.drawTree.inViewPages.length-1];
212474
- // const istartDraw=hoEditorFactory.drawTree.inViewPages[0];
212475
- // for (let i = iendDraw; i >= istartDraw; i--) {
212476
- // this.updateDrawPage(i);
212477
- // }
212478
- // this._startNeedUpdatePage = -1;
212479
- // this._endNeedUpdatePage = -1;
212480
211035
  if (!callFromPaint) {
212481
211036
  hoEditorFactory.drawTree.inViewPages.forEach(function (i) {
212482
211037
  _this2.updateDrawPage(i);
212483
211038
  });
212484
211039
  }
212485
- // }
212486
211040
  }
212487
- // if (hoEditorFactory.drawTree.paintStatus === PaintState.psReview) {
212488
- // drawArea.drawComments();
212489
- // }
212490
- // if (drawArea) {
212491
- // const areaIndex=
212492
- // for (let i = startLine + 1; i <= endLine; i++) {
212493
- // if (restHeight < hoEditorFactory.defaultLineHeight) {
212494
- // drawArea = this.getNextDarea(drawArea);
212495
- // dTop = drawArea.docHeight;
212496
- // restHeight = drawArea.maxHeight - dTop;
212497
- // }
212498
- // const dobj = dRoots[i];
212499
- // const cbParagraph = dobj.paragraphNode.combineParagraph;
212500
- // if (dobj instanceof DrawTable) {
212501
- // for (let j = 0; j < dobj.drawPageTables.length; j++) {
212502
- // const dPageTable = dobj.drawPageTables[j];
212503
- // dPageTable.update(drawArea);
212504
- // }
212505
- // } else {
212506
- // if (dobj.dHeight > restHeight && dTop > 0) {
212507
- // drawArea = this.getNextDarea(drawArea);
212508
- // dTop = 0;
212509
- // restHeight = drawArea.maxHeight - dTop;
212510
- // }
212511
- // drawArea.addChild(dobj);
212512
- // dobj.y = dTop;
212513
- // dobj.x = cbParagraph.leftMarginPixes;
212514
- // }
212515
- // }
212516
- // }
212517
211041
  }
212518
211042
  }, {
212519
211043
  key: "calcMainDocPosition",
@@ -241191,7 +239715,7 @@ var HoFooter_component = (0,componentNormalizer/* default */.Z)(
241191
239715
  // EXTERNAL MODULE: ./src/components/controls/ControlModal.vue + 3 modules
241192
239716
  var ControlModal = __webpack_require__(10597);
241193
239717
  // EXTERNAL MODULE: ./src/components/controls/findReplace/FindReplace.vue + 5 modules
241194
- var FindReplace = __webpack_require__(98064);
239718
+ var FindReplace = __webpack_require__(33693);
241195
239719
  ;// CONCATENATED MODULE: ./src/components/controls/findReplace/index.ts
241196
239720
 
241197
239721
  /* harmony default export */ var findReplace = (FindReplace["default"]);