hoeditor-web 3.1.159 → 3.1.161

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.
@@ -56330,7 +56330,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56330
56330
  value: function getParagraphLeftWidth() {
56331
56331
  //如果父文档节点派生于rectNode(用于表格基类),则取
56332
56332
  var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_20__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
56333
- var pNode = this._parentNode;
56334
56333
  var aLeft;
56335
56334
  var aWidth;
56336
56335
  var bRectAlign = false;
@@ -56346,11 +56345,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56346
56345
  aWidth = aWidth - aLeft - hoEditorFactory.unitConvert.mmConversionPx(pRectNode.cellProperty.cellInnerMargin[3] * 10, true);
56347
56346
  bRectAlign = true;
56348
56347
  }
56349
- // aLeft = this._combineParagraph.leftMarginPixes;
56350
- // aWidth =
56351
- // pRectNode.width -
56352
- // this._combineParagraph.leftMarginPixes -
56353
- // this._combineParagraph.rightMarginPixes;
56354
56348
  } else {
56355
56349
  aLeft = 0;
56356
56350
  aWidth = hoEditorFactory.pageProperty.widthPixes - hoEditorFactory.pageProperty.leftMarginPixes - hoEditorFactory.pageProperty.rightMarginPixes;
@@ -56381,10 +56375,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56381
56375
  key: "getParentLeftWidthNode",
56382
56376
  value: function getParentLeftWidthNode() {
56383
56377
  var pNode = this.parentNode;
56384
- //let para = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.paragraphs[this._paraNo];
56385
- // if (!para) {
56386
- // para = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.paragraphs[0];
56387
- // }
56388
56378
  while (pNode) {
56389
56379
  if (pNode instanceof _RectNode__WEBPACK_IMPORTED_MODULE_15__/* .RectNode */ .z) {
56390
56380
  return pNode;
@@ -56438,10 +56428,13 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56438
56428
  var paragraphWidth = leftTopInfos[1];
56439
56429
  var index = this._drawLines.length;
56440
56430
  if (index > 0) {
56441
- var prevLine = this._drawLines[index - 1];
56442
- prevLine.x = this.combineParagraph.leftMarginPixes + ileft;
56443
- prevLine.dWidth = paragraphWidth - this.combineParagraph.leftMarginPixes - this.combineParagraph.rightMarginPixes;
56444
- if (prevLine instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_16__/* .DrawLine */ .a) prevLine.updateLineStyle();
56431
+ // const prevLine = this._drawLines[index - 1];
56432
+ // console.log(prevLine, leftTopInfos);
56433
+ // prevLine.x = this.combineParagraph.leftMarginPixes + ileft;
56434
+ // prevLine.dWidth = paragraphWidth - this.combineParagraph.leftMarginPixes - this.combineParagraph.rightMarginPixes;
56435
+ // if (prevLine instanceof DrawLine) {
56436
+ // prevLine.updateLineStyle();
56437
+ // }
56445
56438
  }
56446
56439
  var aline = new _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_16__/* .DrawLine */ .a(this._rootPath, this, index, paragraphWidth);
56447
56440
  aline.dTop = itop;
@@ -56451,6 +56444,7 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56451
56444
  aline.dWidth = paragraphWidth - this.combineParagraph.leftMarginPixes - this.combineParagraph.rightMarginPixes;
56452
56445
  this._drawLines.push(aline);
56453
56446
  var rootIndex = this.drootNodes.indexOf(this._drawLines[0]) + this._drawLines.length - 1;
56447
+ // console.log(aline, rootIndex, ileft, this, '----');
56454
56448
  this.drootNodes.splice(rootIndex, 0, aline);
56455
56449
  this._dHeight = this._dHeight + aline.dHeight;
56456
56450
  return aline;
@@ -56517,37 +56511,15 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56517
56511
  this._dTop = itop;
56518
56512
  aline.dLeft = ileft;
56519
56513
  aline.dTop = itop;
56520
- aline.x = this.combineParagraph.leftMarginPixes;
56521
- aline.x += ileft;
56514
+ aline.x = this.combineParagraph.leftMarginPixes + ileft;
56522
56515
  aline.dWidth = paragraphWidth - this.combineParagraph.leftMarginPixes - this.combineParagraph.rightMarginPixes;
56523
- // for (let i=nodes.indexOf(this)+1;i<nodes.length-1;i++){
56524
- // if (nodes[i] instanceof ParagraphNode){
56525
- // break;
56526
- // }
56527
- // nodes[i].node2DrawNode(drawTree,dParagraphNodes,aline);
56528
- // for (let j=0;j<aDrawItems.length;j++){
56529
- // if(aDrawItems[j].children.length>0 ){
56530
- // if (aline.restWidth>=aDrawItems[j].getBounds().width){
56531
- // aline.appendItem(aDrawItems[i]);
56532
- // }else {
56533
- // dParagraph.appendLine(aline);
56534
- // aline=new DrawLine(dParagraph,0,dParagraph.height+1,paragraphWidth);
56535
- // aline.appendItem(aDrawItems[i]);
56536
- // }
56537
- // }
56538
- // }
56539
- // return dParagraph;
56540
56516
  }
56541
56517
  }, {
56542
56518
  key: "placeDNodeAfterDline",
56543
56519
  value: function placeDNodeAfterDline(dline) {
56544
- // if (this.drootNodes.length === 0) {
56545
- // this.drootNodes.push(this.drawlines[0]);
56546
- // }
56547
56520
  if (dline) {
56548
56521
  var dTop = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_20__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getParagraphStartTop(this);
56549
56522
  this.placeDNodeAfterDTop(dTop, dline);
56550
- // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.insertDline(droots,index+1,this._drawLines[0]);
56551
56523
  }
56552
56524
  }
56553
56525
  }, {
@@ -56578,12 +56550,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56578
56550
  this.drootNodes.push(this._drawLines[0]);
56579
56551
  } else this.drootNodes.splice(index + 1, 0, this._drawLines[0]);
56580
56552
  }
56581
- // public add2DrawTree(dRoots: DrawLine[]){
56582
- // if (this._drawLines.length===0){
56583
- // this.node2DrawNode();
56584
- // }
56585
- // dRoots.push(this._drawLines[0]);
56586
- // }
56587
56553
  }, {
56588
56554
  key: "dTop",
56589
56555
  get: function get() {
@@ -56631,14 +56597,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56631
56597
  set: function set(value) {
56632
56598
  this._docId = value;
56633
56599
  }
56634
- // get lineDeleted(){
56635
- // return this._lineDeleted;
56636
- // }
56637
- // set lineDeleted(value: boolean){
56638
- // if (value!==this._lineDeleted){
56639
- // this._lineDeleted=value;
56640
- // }
56641
- // }
56642
56600
  }, {
56643
56601
  key: "isInCell",
56644
56602
  value: function isInCell() {
@@ -56652,7 +56610,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56652
56610
  }, {
56653
56611
  key: "adjustNextDline",
56654
56612
  value: function adjustNextDline(dline, index) {
56655
- var droots = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_20__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.getDrawRootsByPath(dline.rootPath);
56656
56613
  var dNextLine = this.getNextDline(dline);
56657
56614
  for (var i = index; i < dline.drawItems.length; i++) {
56658
56615
  dNextLine.addChildAt(i - index, dline.drawItems[i]);
@@ -56663,39 +56620,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56663
56620
  key: "getParagraphLastNodePath",
56664
56621
  value: function getParagraphLastNodePath() {
56665
56622
  return _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_20__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID).docTree.getParaNodeLastPath(this);
56666
- // return this.getParagraphLastNode().getNodePath()
56667
- // const pNode = this._parentNode;
56668
- // if (pNode) {
56669
- // const index = pNode.childNodes.indexOf(this);
56670
- // let aNode: BaseNode | null = null;
56671
- // for (let i = index + 1; i < pNode.childNodes.length; i++) {
56672
- // if (pNode.childNodes[i] instanceof ParagraphNode) {
56673
- // break;
56674
- // }
56675
- // aNode = pNode.childNodes[i];
56676
- // }
56677
- // if (aNode) {
56678
- // return HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.getNodeLastPath(aNode);
56679
- // } else {
56680
- // return this.getNodePath();
56681
- // }
56682
- // } else {
56683
- // let ret = this.nextSibling();
56684
- // let prevNode = ret;
56685
- // while (
56686
- // ret &&
56687
- // !(ret instanceof ParagraphNode) &&
56688
- // !(ret instanceof RectNode)
56689
- // ) {
56690
- // prevNode = ret;
56691
- // ret = ret.nextSibling();
56692
- // }
56693
- // if (prevNode) {
56694
- // return HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.getNodeLastPath(prevNode);
56695
- // } else {
56696
- // return this.getNodePath();
56697
- // }
56698
- // }
56699
56623
  }
56700
56624
  }, {
56701
56625
  key: "updateDrawLineStyle",
@@ -56704,7 +56628,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56704
56628
  var dline = this._drawLines[i];
56705
56629
  if (dline instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_16__/* .DrawLine */ .a) dline.updateLineStyle();
56706
56630
  }
56707
- // if (dline instanceof DrawLine) dline.updateLineStyle();
56708
56631
  }
56709
56632
  }, {
56710
56633
  key: "updateDrawInfos",
@@ -56712,7 +56635,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56712
56635
  var aHeight = 0;
56713
56636
  for (var i = 0; i < this._drawLines.length; i++) {
56714
56637
  var dline = this._drawLines[i];
56715
- // if (dline instanceof DrawLine) dline.updateLineStyle();
56716
56638
  dline.dTop = this.dTop + aHeight;
56717
56639
  aHeight += dline.dHeight;
56718
56640
  this.dTop + aHeight;
@@ -56757,17 +56679,10 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56757
56679
  return paga;
56758
56680
  }
56759
56681
  var paraNode = {
56760
- //"ParagraphNode": {
56761
56682
  nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_13__/* .NodeType */ .Jq[this.nodeType],
56762
56683
  styleIndex: this._paraNo,
56763
56684
  textStyleNo: this.styleIndex
56764
- //printAsSinglePage: this.printAsSinglePage,
56765
- //forceChangeHeader: this.forceChangeHeader,
56766
- //docId: this.docId,
56767
- //customProperty: this.customProperty
56768
- //}
56769
56685
  };
56770
-
56771
56686
  if (this.printAsSinglePage) {
56772
56687
  paraNode.printAsSinglePage = this.printAsSinglePage;
56773
56688
  }
@@ -56792,10 +56707,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56792
56707
  }, {
56793
56708
  key: "delete",
56794
56709
  value: function _delete(operType) {
56795
- // const prevNode = this.prevSibling();
56796
- // if (prevNode && prevNode instanceof TableNode) {
56797
- // return false;
56798
- // }
56799
56710
  var parentNodes = this.getParentNodes();
56800
56711
  try {
56801
56712
  var index = parentNodes.indexOf(this);
@@ -56840,7 +56751,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
56840
56751
  paragraphNode.printAsSinglePage = json.printAsSinglePage ? json.printAsSinglePage === "true" ? true : false : false;
56841
56752
  paragraphNode.forceChangeHeader = json.forceChangeHeader ? json.forceChangeHeader === "true" ? true : false : false;
56842
56753
  paragraphNode.styleIndex = json.textStyleNo ? Number(json.textStyleNo) : 0;
56843
- //paragraphNode.styleIndex = 0;
56844
56754
  return paragraphNode;
56845
56755
  }
56846
56756
  }]);
@@ -59094,9 +59004,10 @@ var RadioAndCheckBoxNode = /*#__PURE__*/function (_ControlNode) {
59094
59004
  //this.name,
59095
59005
  this.isSelected, this.boxAlign, this.numericValue, dHeight, cbStyle);
59096
59006
  this._drawNodes.push(dNode);
59007
+ var dBoxWidth = dNode.dBoxWidth || dHeight;
59097
59008
  var dNodePrint = new _editor_draw_drawNode_DrawRadioAndCheckBoxPrint__WEBPACK_IMPORTED_MODULE_16__/* .DrawRadioAndCheckBoxPrint */ .w(this._hoEditorFactoryID, this._rootPath, this, 0, this.controlStyle,
59098
59009
  //this.name,
59099
- this.isSelected, this.boxAlign, this.numericValue, dHeight, cbStyle);
59010
+ this.isSelected, this.boxAlign, this.numericValue, dHeight, cbStyle, dBoxWidth);
59100
59011
  this._drawNodes.push(dNodePrint);
59101
59012
  }
59102
59013
  }, {
@@ -61136,7 +61047,8 @@ var TableFormula = /*#__PURE__*/function (_ControlNode) {
61136
61047
  _this$getCellNumber2 = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this$getCellNumber, 2),
61137
61048
  bret = _this$getCellNumber2[0],
61138
61049
  value = _this$getCellNumber2[1];
61139
- if (cell.cellProperty.downListProperty) {
61050
+ var downListProperty = cell.cellProperty.downListProperty;
61051
+ if (downListProperty) {
61140
61052
  if (bret) {
61141
61053
  //total+=value;
61142
61054
  if (value !== "") {
@@ -61144,7 +61056,6 @@ var TableFormula = /*#__PURE__*/function (_ControlNode) {
61144
61056
  }
61145
61057
  } else {
61146
61058
  var cellText = cell.getCellText();
61147
- var downListProperty = cell.cellProperty.downListProperty;
61148
61059
  var listItems = JSON.parse(downListProperty.listItems);
61149
61060
  if (listItems.length === undefined) {
61150
61061
  listItems = Array(JSON.parse(downListProperty.listItems));
@@ -61201,6 +61112,7 @@ var TableFormula = /*#__PURE__*/function (_ControlNode) {
61201
61112
  }, {
61202
61113
  key: "getCellNumber",
61203
61114
  value: function getCellNumber(tb, irow, icol) {
61115
+ var _cell$getCellText;
61204
61116
  var ret = "";
61205
61117
  var bret = false;
61206
61118
  var cell = tb.rows[irow][icol];
@@ -61214,6 +61126,7 @@ var TableFormula = /*#__PURE__*/function (_ControlNode) {
61214
61126
  // }
61215
61127
  //const strValue = cell.getCellText().replaceAll('\n', '').replaceAll(' ', '').replaceAll('\b', '').replaceAll('\r', '');
61216
61128
  var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_35__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
61129
+ var cellText = ((_cell$getCellText = cell.getCellText()) === null || _cell$getCellText === void 0 ? void 0 : _cell$getCellText.replace(/\n/g, '')) || '';
61217
61130
  var strValue = hoEditorFactory.unitConvert.replaceAll(cell.getCellText(), '\n', '');
61218
61131
  //如果单元格存在下拉项,取值为下拉项的value,而非节点的text
61219
61132
  if (cell.cellProperty.downListProperty) {
@@ -61236,10 +61149,6 @@ var TableFormula = /*#__PURE__*/function (_ControlNode) {
61236
61149
  }
61237
61150
  });
61238
61151
  strValue = String(value);
61239
- // strValue = itemObject.value
61240
- // if(strValue === ''){
61241
- // strValue = itemObject.text
61242
- // }
61243
61152
  }
61244
61153
  }
61245
61154
  //针对单元格childNodes节点下嵌套的下拉选择处理
@@ -61272,6 +61181,9 @@ var TableFormula = /*#__PURE__*/function (_ControlNode) {
61272
61181
  }
61273
61182
  }
61274
61183
  }
61184
+ if (strValue == '' && !isNaN(Number(cellText))) {
61185
+ strValue = cellText;
61186
+ }
61275
61187
  strValue = hoEditorFactory.unitConvert.replaceAll(strValue, ' ', '');
61276
61188
  strValue = hoEditorFactory.unitConvert.replaceAll(strValue, '\b', '');
61277
61189
  strValue = hoEditorFactory.unitConvert.replaceAll(strValue, '\r', '');
@@ -69085,7 +68997,7 @@ var TextInputFieldNode = /*#__PURE__*/function (_BaseCombineNode) {
69085
68997
  if (this.alignWithBlocked && this.StartMarkNode && this.StartMarkNode.drawNodes.length > 0) {
69086
68998
  var dNode = this.StartMarkNode.drawNodes[0];
69087
68999
  var dline = hoEditorFactory.drawTree.getDrawLineByDNode(dNode);
69088
- var x = this.StartMarkNode.drawNodes[0].x + hoEditorFactory.docTree.combineParagraph.leftMarginPixes + 1;
69000
+ var x = Math.floor(dNode.x) + hoEditorFactory.docTree.combineParagraph.leftMarginPixes + 1;
69089
69001
  var width = dline.dWidth - x;
69090
69002
  return [x, width, true];
69091
69003
  }
@@ -69170,7 +69082,6 @@ var TextInputFieldNode = /*#__PURE__*/function (_BaseCombineNode) {
69170
69082
  json.includesKeyword = !json.includesKeyword ? "[]" : json.includesKeyword;
69171
69083
  json.valueArea = !json.valueArea ? "[]" : json.valueArea;
69172
69084
  json.isElementLink = !json.isElementLink ? false : json.isElementLink;
69173
- if (this.name == '窒息后选择') {}
69174
69085
  var temp = new TextInputFieldNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, BaseNode/* NodeType */.Jq.ntField, json);
69175
69086
  // this.insertChild
69176
69087
  if (json.childNodes) {
@@ -69613,37 +69524,47 @@ var TextInputFieldNode = /*#__PURE__*/function (_BaseCombineNode) {
69613
69524
  /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_9__);
69614
69525
  /* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(40561);
69615
69526
  /* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_10__);
69616
- /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(57658);
69617
- /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_11__);
69618
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(9653);
69619
- /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_12__);
69620
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(92222);
69621
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_13__);
69622
- /* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(69600);
69623
- /* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_14__);
69624
- /* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(21703);
69625
- /* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_15__);
69626
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(47941);
69627
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_16__);
69628
- /* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(38862);
69629
- /* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_17__);
69630
- /* harmony import */ var core_js_modules_es_string_bold_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(50915);
69631
- /* harmony import */ var core_js_modules_es_string_bold_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_bold_js__WEBPACK_IMPORTED_MODULE_18__);
69632
- /* harmony import */ var core_js_modules_es_string_italics_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(58734);
69633
- /* harmony import */ var core_js_modules_es_string_italics_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_italics_js__WEBPACK_IMPORTED_MODULE_19__);
69634
- /* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(19601);
69635
- /* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_20__);
69636
- /* harmony import */ var core_js_modules_es_string_replace_all_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(68757);
69637
- /* harmony import */ var core_js_modules_es_string_replace_all_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_all_js__WEBPACK_IMPORTED_MODULE_21__);
69638
- /* harmony import */ var _BaseNode__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(62358);
69639
- /* harmony import */ var _editor_draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(51760);
69640
- /* harmony import */ var _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(96635);
69641
- /* harmony import */ var _editor_draw_drawNode_DrawTextNode__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(24492);
69642
- /* harmony import */ var _domNode_TextStyle__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(29899);
69643
- /* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(74089);
69644
- /* harmony import */ var _editor_utils_UnitConvert__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(91404);
69645
- /* harmony import */ var _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(65043);
69646
- /* harmony import */ var _editor_utils_DrawSimpleText__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(57590);
69527
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(41539);
69528
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__);
69529
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(54747);
69530
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12__);
69531
+ /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(57658);
69532
+ /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_13__);
69533
+ /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(9653);
69534
+ /* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_14__);
69535
+ /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(92222);
69536
+ /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_15__);
69537
+ /* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(69600);
69538
+ /* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_16__);
69539
+ /* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(21703);
69540
+ /* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_17__);
69541
+ /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(47941);
69542
+ /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_18__);
69543
+ /* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(38862);
69544
+ /* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_19__);
69545
+ /* harmony import */ var core_js_modules_es_string_bold_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(50915);
69546
+ /* harmony import */ var core_js_modules_es_string_bold_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_bold_js__WEBPACK_IMPORTED_MODULE_20__);
69547
+ /* harmony import */ var core_js_modules_es_string_italics_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(58734);
69548
+ /* harmony import */ var core_js_modules_es_string_italics_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_italics_js__WEBPACK_IMPORTED_MODULE_21__);
69549
+ /* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(19601);
69550
+ /* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_22__);
69551
+ /* harmony import */ var core_js_modules_es_string_replace_all_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(68757);
69552
+ /* harmony import */ var core_js_modules_es_string_replace_all_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_all_js__WEBPACK_IMPORTED_MODULE_23__);
69553
+ /* harmony import */ var _BaseNode__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(62358);
69554
+ /* harmony import */ var _editor_draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(51760);
69555
+ /* harmony import */ var _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(96635);
69556
+ /* harmony import */ var _editor_draw_drawNode_DrawTextNode__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(24492);
69557
+ /* harmony import */ var _domNode_TextStyle__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(29899);
69558
+ /* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(74089);
69559
+ /* harmony import */ var _editor_utils_UnitConvert__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(91404);
69560
+ /* harmony import */ var _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(65043);
69561
+ /* harmony import */ var _editor_utils_DrawSimpleText__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(57590);
69562
+ /* harmony import */ var _MarkNode__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(57727);
69563
+ /* harmony import */ var _editor_draw_drawNode_DrawMarkNode__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(57732);
69564
+
69565
+
69566
+
69567
+
69647
69568
 
69648
69569
 
69649
69570
 
@@ -69775,7 +69696,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
69775
69696
  this._text = this._text.substr(0, start) + this._text.substr(end + 1, this._text.length);
69776
69697
  for (var i = 0; i < this.drawNodes.length; i++) {
69777
69698
  var dNode = this.drawNodes[i];
69778
- if (dNode instanceof _editor_draw_drawNode_DrawTextNode__WEBPACK_IMPORTED_MODULE_25__/* .DrawTextNode */ .v) {
69699
+ if (dNode instanceof _editor_draw_drawNode_DrawTextNode__WEBPACK_IMPORTED_MODULE_27__/* .DrawTextNode */ .v) {
69779
69700
  var dtext = dNode.dText;
69780
69701
  if (start >= dtext.startIndex && start <= dtext.endIndex) {
69781
69702
  dNode.text = this._text.substr(dtext.startIndex, start);
@@ -69816,25 +69737,6 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
69816
69737
  }, {
69817
69738
  key: "node2DrawNodeRange",
69818
69739
  value: function node2DrawNodeRange(startIndex, endIndex) {
69819
- // super.node2DrawNode(firstLineWidth,secondLineWidth,firstPageHeight,secondPageHeight);
69820
- //item数目
69821
- // this.refreshDrawStyle();
69822
- // const istart = Math.max(startIndex, 0);
69823
- // const iend = Math.min(endIndex, this.getLength() - 1);
69824
- // const bIsInsert = startIndex < this._text.length - 1;
69825
- // for (let i = istart; i <= iend; i++) {
69826
- // const dNode = new DrawTextNode(
69827
- // this._hoEditorFactory,
69828
- // this._rootPath,
69829
- // this,
69830
- // i
69831
- // );
69832
- // if (bIsInsert) {
69833
- // this._drawNodes.splice(i, 0, dNode);
69834
- // } else {
69835
- // this._drawNodes.push(dNode);
69836
- // }
69837
- // }
69838
69740
  return;
69839
69741
  }
69840
69742
  }, {
@@ -69843,7 +69745,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
69843
69745
  // this._dCombineStyle = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.styles[
69844
69746
  // this._styleIndex
69845
69747
  // ].combineStyle;
69846
- var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_27__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
69748
+ var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
69847
69749
  var textStyle = hoEditorFactory.docTree.styles[this._styleIndex];
69848
69750
  if (textStyle) {
69849
69751
  this._dCombineStyle = textStyle.combineStyle;
@@ -69859,8 +69761,6 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
69859
69761
  key: "node2DrawNode",
69860
69762
  value: function node2DrawNode() {
69861
69763
  return;
69862
- // this.clearDrawNodes(0, this.text.length - 1);
69863
- // this.node2DrawNodeRange(0, this.text.length - 1);
69864
69764
  }
69865
69765
  }, {
69866
69766
  key: "getFristDitemInDline",
@@ -69868,7 +69768,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
69868
69768
  var ret = start;
69869
69769
  for (var i = dline.drawItems.length - 1; i >= 0; i--) {
69870
69770
  var ditem = dline.drawItems[i];
69871
- if (ditem instanceof _editor_draw_drawNode_DrawTextNode__WEBPACK_IMPORTED_MODULE_25__/* .DrawTextNode */ .v && ditem.node === this) {
69771
+ if (ditem instanceof _editor_draw_drawNode_DrawTextNode__WEBPACK_IMPORTED_MODULE_27__/* .DrawTextNode */ .v && ditem.node === this) {
69872
69772
  if (ditem.startIndex < start) {
69873
69773
  ret = ditem.startIndex;
69874
69774
  }
@@ -69879,24 +69779,42 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
69879
69779
  }, {
69880
69780
  key: "adjustRectAlignLine",
69881
69781
  value: function adjustRectAlignLine(dline) {
69882
- if (this._parentNode && this._parentNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_29__/* .TextInputFieldNode */ .re && dline.paragraphNode.parentNode !== this._parentNode) {
69883
- var _this$_parentNode$get = this._parentNode.getLeftWidth(),
69884
- _this$_parentNode$get2 = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_this$_parentNode$get, 3),
69885
- ileft = _this$_parentNode$get2[0],
69886
- paragraphWidth = _this$_parentNode$get2[1],
69887
- bAlignWithRect = _this$_parentNode$get2[2];
69782
+ if (this._parentNode && this._parentNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_31__/* .TextInputFieldNode */ .re && dline.paragraphNode.parentNode !== this._parentNode) {
69783
+ var parentNode = this._parentNode;
69784
+ var _parentNode$getLeftWi = parentNode.getLeftWidth(),
69785
+ _parentNode$getLeftWi2 = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_parentNode$getLeftWi, 3),
69786
+ ileft = _parentNode$getLeftWi2[0],
69787
+ paragraphWidth = _parentNode$getLeftWi2[1],
69788
+ bAlignWithRect = _parentNode$getLeftWi2[2];
69888
69789
  if (bAlignWithRect) {
69889
- var index = dline.paragraphNode.drawlines.length;
69890
- if (index - 2 > 0) {
69891
- var prevLine = dline.paragraphNode.drawlines[index - 2];
69892
- prevLine.x = dline.paragraphNode.combineParagraph.leftMarginPixes + ileft;
69893
- prevLine.dWidth = paragraphWidth - dline.paragraphNode.combineParagraph.leftMarginPixes - dline.paragraphNode.combineParagraph.rightMarginPixes;
69894
- if (prevLine instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_24__/* .DrawLine */ .a) prevLine.updateLineStyle();
69790
+ var len = dline.paragraphNode.drawlines.length;
69791
+ var combineParagraph = dline.paragraphNode.combineParagraph;
69792
+ if (len > 1) {
69793
+ dline.paragraphNode.drawlines.forEach(function (line, lineIndex) {
69794
+ if (line.children.length > 1) {
69795
+ line.children.forEach(function (child, childIndex) {
69796
+ if (child instanceof _editor_draw_drawNode_DrawMarkNode__WEBPACK_IMPORTED_MODULE_34__/* .DrawMarkNode */ .I && child.node instanceof _MarkNode__WEBPACK_IMPORTED_MODULE_33__/* .MarkNode */ .j && child.node.parentNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_31__/* .TextInputFieldNode */ .re) {
69797
+ if (child.node.parentNode.alignWithBlocked && child.node.MarkNodeType === _MarkNode__WEBPACK_IMPORTED_MODULE_33__/* .MarkNodeType */ .q.mtStart) {
69798
+ line.x = combineParagraph.leftMarginPixes + ileft;
69799
+ line.dWidth = Math.max(line.dWidth, paragraphWidth);
69800
+ if (line instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_26__/* .DrawLine */ .a) {
69801
+ // 块对齐的文本域起始行变更后需要更新样式且重新计算
69802
+ line.updateLineStyle();
69803
+ var _parentNode$getLeftWi3 = parentNode.getLeftWidth();
69804
+ var _parentNode$getLeftWi4 = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_parentNode$getLeftWi3, 3);
69805
+ ileft = _parentNode$getLeftWi4[0];
69806
+ paragraphWidth = _parentNode$getLeftWi4[1];
69807
+ bAlignWithRect = _parentNode$getLeftWi4[2];
69808
+ }
69809
+ }
69810
+ }
69811
+ });
69812
+ }
69813
+ });
69895
69814
  }
69896
- dline.dLeft = ileft;
69897
- dline.x = dline.paragraphNode.combineParagraph.leftMarginPixes;
69898
- dline.x += ileft;
69899
- dline.dWidth = paragraphWidth - dline.paragraphNode.combineParagraph.leftMarginPixes - dline.paragraphNode.combineParagraph.rightMarginPixes;
69815
+ dline.dLeft = combineParagraph.leftMarginPixes + ileft;
69816
+ dline.x = combineParagraph.leftMarginPixes + ileft;
69817
+ dline.dWidth = paragraphWidth - combineParagraph.leftMarginPixes - combineParagraph.rightMarginPixes;
69900
69818
  }
69901
69819
  }
69902
69820
  }
@@ -69912,38 +69830,31 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
69912
69830
  key: "placeDNode2DrawLine",
69913
69831
  value: function placeDNode2DrawLine(droots, paragraphNode, dline, start, endIndex) {
69914
69832
  this.refreshDrawStyle();
69915
- var hoeditorfacotry = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_27__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
69833
+ var hoeditorfacotry = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
69916
69834
  var startIndex = this.getFristDitemInDline(start, dline);
69917
69835
  if (startIndex >= this.text.length) {
69918
69836
  return dline;
69919
69837
  }
69920
69838
  this.clearNeedRedrawDitems(startIndex);
69921
- // super.node2DrawNode(firstLineWidth,secondLineWidth,firstPageHeight,secondPageHeight);
69922
69839
  var istart = Math.max(startIndex, 0);
69923
- // const dStarts=dline.drawItems.slice(0,inLineIndex-1);
69924
- // const dEnds=dline.drawItems.slice(inLineIndex,dline.drawItems.length-1);
69925
- // const dMids=this._drawNodes.slice(istart,iend);
69926
- // dline.drawItems.splice(0,dline.drawItems.length);
69927
- // dline.drawItems.concat(dMids).concat(dEnds);
69928
- // dline.insert(this._drawNodes.slice(istart,iend+1),inLineIndex);
69929
69840
  var style = hoeditorfacotry.docTree.styles[this.styleIndex];
69930
69841
  if (!style) {
69931
69842
  style = hoeditorfacotry.docTree.styles[0];
69932
69843
  this.styleIndex = 0;
69933
69844
  }
69934
69845
  var isDelete = style.deleterIndex === undefined || style.deleterIndex === -1 ? false : true; //是否是逻辑删除的状态
69935
- var isDisplay = hoeditorfacotry.drawTree.paintStatus === _editor_draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_23__/* .PaintState */ .Dh.psReview || hoeditorfacotry.drawTree.paintStatus === _editor_draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_23__/* .PaintState */ .Dh.psTrace ? true : false; //逻辑删除的节点是否显示
69846
+ var isDisplay = hoeditorfacotry.drawTree.paintStatus === _editor_draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_25__/* .PaintState */ .Dh.psReview || hoeditorfacotry.drawTree.paintStatus === _editor_draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_25__/* .PaintState */ .Dh.psTrace ? true : false; //逻辑删除的节点是否显示
69936
69847
  //const commentID = style.commentID === undefined ? "0" : style.commentID;
69937
69848
  if (!isDelete || isDisplay || !hoeditorfacotry.isHideComments) {
69938
69849
  var iend = istart;
69939
69850
  var irestLength = 0;
69940
- //是否标点
69941
- var bIsPunctuation = _editor_utils_UnitConvert__WEBPACK_IMPORTED_MODULE_28__/* .UnitConvert */ .P.isPuctuation(this._text[0]);
69851
+ // 检测结尾字符为标点符号时 符号默认跟随不再换行
69852
+ var bIsPunctuation = _editor_utils_UnitConvert__WEBPACK_IMPORTED_MODULE_30__/* .UnitConvert */ .P.isPuctuation(this._text[0]);
69942
69853
  var bForceAppend = false;
69943
69854
  while (istart <= this.text.length - 1) {
69944
69855
  bForceAppend = false;
69945
69856
  irestLength = dline.calcRestWidth();
69946
- var dFirst = new _editor_utils_DrawSimpleText__WEBPACK_IMPORTED_MODULE_30__/* .DrawSimpleText */ .b(this._text[0], this._dStyleKey, this._dColor);
69857
+ var dFirst = new _editor_utils_DrawSimpleText__WEBPACK_IMPORTED_MODULE_32__/* .DrawSimpleText */ .b(this._text[0], this._dStyleKey, this._dColor);
69947
69858
  if (irestLength < dFirst.getMeasuredWidth()) {
69948
69859
  if (istart == 0 && bIsPunctuation) {
69949
69860
  bForceAppend = true;
@@ -69955,7 +69866,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
69955
69866
  irestLength = dline.calcRestWidth();
69956
69867
  }
69957
69868
  }
69958
- var dItem = new _editor_draw_drawNode_DrawTextNode__WEBPACK_IMPORTED_MODULE_25__/* .DrawTextNode */ .v(this._hoEditorFactoryID, this._rootPath, this, istart, irestLength, this._text.length - 1, paragraphNode.combineParagraph.charSpace, dline);
69869
+ var dItem = new _editor_draw_drawNode_DrawTextNode__WEBPACK_IMPORTED_MODULE_27__/* .DrawTextNode */ .v(this._hoEditorFactoryID, this._rootPath, this, istart, irestLength, this._text.length - 1, paragraphNode.combineParagraph.charSpace, dline);
69959
69870
  if (dItem.endIndex < 0) {
69960
69871
  if (iend < this.text.length - 1) {
69961
69872
  dline.fitLines();
@@ -69965,7 +69876,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
69965
69876
  continue;
69966
69877
  }
69967
69878
  dItem.dWidth = dItem.dText.dWidth;
69968
- dItem.dWidth = dItem.dWidth;
69879
+ // (dItem as DrawInfos).dWidth = dItem.dWidth;
69969
69880
  dline.addChild(dItem);
69970
69881
  dline.drawItems.push(dItem);
69971
69882
  this._drawNodes.push(dItem);
@@ -69973,10 +69884,10 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
69973
69884
  if (iend < this.text.length - 1) {
69974
69885
  dline.fitLines();
69975
69886
  dline = dline.paragraphNode.getNextDline(dline);
69976
- if (dline.paragraphNode.parentNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_29__/* .TextInputFieldNode */ .re) {
69887
+ if (dline.paragraphNode.parentNode instanceof _TextInputFieldNode__WEBPACK_IMPORTED_MODULE_31__/* .TextInputFieldNode */ .re) {
69977
69888
  var index = dline.paragraphNode.drawlines.indexOf(dline);
69978
69889
  var prevLine = dline.paragraphNode.drawlines[index - 1];
69979
- if (prevLine && prevLine instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_24__/* .DrawLine */ .a) {
69890
+ if (prevLine && prevLine instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_26__/* .DrawLine */ .a) {
69980
69891
  var _dline$paragraphNode$ = dline.paragraphNode.parentNode.getLeftWidth(),
69981
69892
  _dline$paragraphNode$2 = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(_dline$paragraphNode$, 3),
69982
69893
  ileft = _dline$paragraphNode$2[0],
@@ -69992,28 +69903,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
69992
69903
  istart = iend + 1;
69993
69904
  }
69994
69905
  }
69995
- // dline.update();
69996
69906
  return dline.paragraphNode.getLastDrawline();
69997
- // dline.drawItems.splice(inLineIndex,0,this._drawNodes.slice(istart,iend))
69998
- // for(let i=istart;i<=iend;i++){
69999
- // const awidth= (this._drawNodes[i] as DrawTextNode).dWidth;
70000
- // if ( (usedWidth+awidth>lineWidth)&&usedWidth>0){
70001
- // //当前是行中的最后一个节点,
70002
- // if (i===aline.drawItems.length-1){
70003
- // aline=aline.paragraphNode.getNextDline(droots,aline);
70004
- // }else {
70005
- // const anextLine=aline.paragraphNode.getNextDline(droots,aline);
70006
- // anextLine.drawItems.unshift(aline.drawItems[aline.drawItems.length-1]);
70007
- // const ditem=aline.drawItems.pop();
70008
- // }
70009
- // aline.update();
70010
- // aline=paragraphNode.getNextDline(droots,aline);
70011
- // usedWidth=0;
70012
- // }
70013
- // aline.drawItems.push(this._drawNodes[i]);
70014
- // usedWidth+=awidth+charSpace;
70015
- // }
70016
- // aline.update();
70017
69907
  }
70018
69908
  }, {
70019
69909
  key: "clearNeedRedrawDitems",
@@ -70022,7 +69912,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70022
69912
  var dItem = this._drawNodes[i];
70023
69913
  if (dItem.startIndex >= start || dItem.startIndex < start && dItem.endIndex >= start) {
70024
69914
  if (dItem.parent) {
70025
- if (dItem.parent instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_24__/* .DrawLine */ .a) {
69915
+ if (dItem.parent instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_26__/* .DrawLine */ .a) {
70026
69916
  var index = dItem.parent.drawItems.indexOf(dItem);
70027
69917
  if (index >= 0) dItem.parent.drawItems.splice(index, 1);
70028
69918
  }
@@ -70033,13 +69923,6 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70033
69923
  }
70034
69924
  }
70035
69925
  }
70036
- // public add2DrawTree(dRoots: DrawLine[]) {
70037
- // if (this._drawNodes.length === 0) {
70038
- // this.node2DrawNode();
70039
- // const dline = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.getNodeParaNode(this).getLastDline();
70040
- // // this.placeDNode2DrawLine(dRoots,dline.paragraphNode, 0,this._text.length-1);
70041
- // }
70042
- // }
70043
69926
  }, {
70044
69927
  key: "hoEditorFactoryID",
70045
69928
  get: function get() {
@@ -70100,14 +69983,14 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70100
69983
  aStart = aEnd;
70101
69984
  aEnd = tmp;
70102
69985
  }
70103
- var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_27__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
69986
+ var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
70104
69987
  var selectedText = this.text.substring(aStart + 1, aEnd + 1); //获取该文本节点的选中区域文本
70105
69988
  var frontNodeText = this.text.substring(0, aStart + 1); //选中区域前的文本
70106
69989
  var behindNodeText = this.text.substring(aEnd + 1, this.text.length); //选中区域后的文本
70107
69990
  if (aStart < 0) {
70108
69991
  //情况一:首尾是同一节点且从文本最开始选中;情况二:尾节点
70109
69992
  this.deleteByIndex(selectedText.length, this.getLength() - 1); //节点一
70110
- var unSelectedTextNode = new TextNode(this._hoEditorFactoryID, this.rootNodes, this.parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_22__/* .NodeType */ .Jq.ntText, behindNodeText, this.styleIndex //原来的样式
69993
+ var unSelectedTextNode = new TextNode(this._hoEditorFactoryID, this.rootNodes, this.parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_24__/* .NodeType */ .Jq.ntText, behindNodeText, this.styleIndex //原来的样式
70111
69994
  );
70112
69995
 
70113
69996
  hoEditorFactory.docTree.insertNodeAfterPath("".concat(this.getNodePath(), "/").concat(this.text.length - 1), unSelectedTextNode); //节点二
@@ -70115,11 +69998,11 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70115
69998
  } else {
70116
69999
  //如果选中区域的结束节点在该文本节点的末端,也只用拆分出2个节点;若选中区域在文本节点的中间区域,需要拆分出三个节点
70117
70000
  this.deleteByIndex(frontNodeText.length, this.getLength() - 1); //节点一
70118
- var selectedTextNode = new TextNode(this._hoEditorFactoryID, this.rootNodes, this.parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_22__/* .NodeType */ .Jq.ntText, selectedText, this.styleIndex);
70001
+ var selectedTextNode = new TextNode(this._hoEditorFactoryID, this.rootNodes, this.parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_24__/* .NodeType */ .Jq.ntText, selectedText, this.styleIndex);
70119
70002
  hoEditorFactory.docTree.insertNodeAfterPath("".concat(this.getNodePath(), "/").concat(this.text.length - 1), selectedTextNode); //节点二
70120
70003
  ret.unshift(selectedTextNode);
70121
70004
  if (behindNodeText.length > 0) {
70122
- var behindTextNode = new TextNode(this._hoEditorFactoryID, this.rootNodes, this.parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_22__/* .NodeType */ .Jq.ntText, behindNodeText, this.styleIndex);
70005
+ var behindTextNode = new TextNode(this._hoEditorFactoryID, this.rootNodes, this.parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_24__/* .NodeType */ .Jq.ntText, behindNodeText, this.styleIndex);
70123
70006
  hoEditorFactory.docTree.insertNodeAfterPath("".concat(selectedTextNode.getNodePath(), "/").concat(selectedTextNode.text.length - 1), behindTextNode); //节点三
70124
70007
  ret.push(behindTextNode);
70125
70008
  }
@@ -70146,7 +70029,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70146
70029
  var ilen = arr.length;
70147
70030
  for (var i = 1; i < ilen; i++) {
70148
70031
  textNode.insertText(arr[i]._text, textNode._text.length);
70149
- _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_27__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID).docTree.deleteNode(arr[i]);
70032
+ _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID).docTree.deleteNode(arr[i]);
70150
70033
  }
70151
70034
  return textNode;
70152
70035
  }
@@ -70158,7 +70041,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70158
70041
  }, {
70159
70042
  key: "prevPath",
70160
70043
  value: function prevPath(path) {
70161
- var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_27__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
70044
+ var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
70162
70045
  var nodePosition = hoEditorFactory.docTree.findNodePositionByPath(path);
70163
70046
  var childIndex = nodePosition.childIndex;
70164
70047
  var topath = "";
@@ -70200,7 +70083,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70200
70083
  var t = parseInt(arr[arr.length - 1]);
70201
70084
  copytxt = this.text.substr(s, t - s + 1);
70202
70085
  }
70203
- var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_27__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
70086
+ var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
70204
70087
  var combineStyle;
70205
70088
  var style = hoEditorFactory.docTree.styles[this.styleIndex];
70206
70089
  if (style) {
@@ -70210,9 +70093,9 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70210
70093
  this.styleIndex = 0;
70211
70094
  }
70212
70095
  if (isCopy) {
70213
- var styleJson = JSON.parse(JSON.stringify(combineStyle, _domNode_TextStyle__WEBPACK_IMPORTED_MODULE_26__/* .CombineStyle */ .xc.whiteList()));
70096
+ var styleJson = JSON.parse(JSON.stringify(combineStyle, _domNode_TextStyle__WEBPACK_IMPORTED_MODULE_28__/* .CombineStyle */ .xc.whiteList()));
70214
70097
  var json = {
70215
- nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_22__/* .NodeType */ .Jq[this.nodeType],
70098
+ nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_24__/* .NodeType */ .Jq[this.nodeType],
70216
70099
  style: styleJson,
70217
70100
  text: copytxt,
70218
70101
  styleIndex: this._styleIndex
@@ -70229,7 +70112,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70229
70112
  }
70230
70113
  return {
70231
70114
  "TextNode": {
70232
- nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_22__/* .NodeType */ .Jq[this.nodeType],
70115
+ nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_24__/* .NodeType */ .Jq[this.nodeType],
70233
70116
  text: copytxt,
70234
70117
  styleIndex: this._styleIndex
70235
70118
  }
@@ -70263,7 +70146,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70263
70146
  var dItem = this._drawNodes[i];
70264
70147
  if (dItem.startIndex >= index) {
70265
70148
  if (dItem.parent) {
70266
- if (dItem.parent instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_24__/* .DrawLine */ .a) {
70149
+ if (dItem.parent instanceof _editor_draw_DrawLine__WEBPACK_IMPORTED_MODULE_26__/* .DrawLine */ .a) {
70267
70150
  var _index = dItem.parent.drawItems.indexOf(dItem);
70268
70151
  if (_index >= 0) dItem.parent.drawItems.splice(_index, 1);
70269
70152
  }
@@ -70294,13 +70177,13 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70294
70177
  key: "json2Node",
70295
70178
  value: function json2Node(hoEditorFactoryID, json, rootNodes, pNode) {
70296
70179
  //解析样式
70297
- var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_27__/* .HOEditorFactorys */ .b.instance().getFactory(hoEditorFactoryID);
70180
+ var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys */ .b.instance().getFactory(hoEditorFactoryID);
70298
70181
  var styleIndex = Number(json.styleIndex);
70299
70182
  if (json["style"]) {
70300
70183
  var styleJson = json.style;
70301
70184
  this.transType(styleJson);
70302
70185
  //styleJson["script"] = StyleScriptType[styleJson.script];
70303
- var textStyle = new _domNode_TextStyle__WEBPACK_IMPORTED_MODULE_26__/* .TextStyle */ .pn(hoEditorFactoryID);
70186
+ var textStyle = new _domNode_TextStyle__WEBPACK_IMPORTED_MODULE_28__/* .TextStyle */ .pn(hoEditorFactoryID);
70304
70187
  var combineStyle = textStyle.combineStyle;
70305
70188
  //样式赋值
70306
70189
  if (styleJson["size"] === combineStyle.size) {
@@ -70354,7 +70237,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70354
70237
  }
70355
70238
  var text = json.text.replace("<上标>", "").replace("</上标>", "").replace("<下标>", "").replace("</下标>", "");
70356
70239
  text = text.replaceAll("(span)", "").replaceAll("(/span)", "");
70357
- var textNode = new TextNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, _BaseNode__WEBPACK_IMPORTED_MODULE_22__/* .NodeType */ .Jq.ntText, text, styleIndex, json.errorIndex ? Number(json.errorIndex) : undefined);
70240
+ var textNode = new TextNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, _BaseNode__WEBPACK_IMPORTED_MODULE_24__/* .NodeType */ .Jq.ntText, text, styleIndex, json.errorIndex ? Number(json.errorIndex) : undefined);
70358
70241
  var search = function search(index) {
70359
70242
  var sindex = json.text.indexOf("(span)", index);
70360
70243
  if (sindex >= 0) {
@@ -70380,7 +70263,7 @@ var TextNode = /*#__PURE__*/function (_BaseNode) {
70380
70263
  }
70381
70264
  }]);
70382
70265
  return TextNode;
70383
- }(_BaseNode__WEBPACK_IMPORTED_MODULE_22__/* .BaseNode */ .Hd);
70266
+ }(_BaseNode__WEBPACK_IMPORTED_MODULE_24__/* .BaseNode */ .Hd);
70384
70267
 
70385
70268
  /***/ }),
70386
70269
 
@@ -70557,8 +70440,8 @@ var HOEditorFactorys = __webpack_require__(74089);
70557
70440
  var SeparateCharNode = __webpack_require__(39385);
70558
70441
  // EXTERNAL MODULE: ./src/editor/utils/UnitConvert.ts
70559
70442
  var UnitConvert = __webpack_require__(91404);
70560
- // EXTERNAL MODULE: ./src/editor/dom/treeNode/BaseNode.ts
70561
- var BaseNode = __webpack_require__(62358);
70443
+ // EXTERNAL MODULE: ./src/editor/dom/treeNode/CellNode.ts
70444
+ var CellNode = __webpack_require__(68598);
70562
70445
  // EXTERNAL MODULE: ./src/editor/draw/drawNode/DrawDownListNode.ts
70563
70446
  var DrawDownListNode = __webpack_require__(93541);
70564
70447
  // EXTERNAL MODULE: ./src/editor/dom/treeNode/TextInputFieldNode.ts + 1 modules
@@ -70678,6 +70561,9 @@ var DrawLine = /*#__PURE__*/function (_DrawContainer) {
70678
70561
  },
70679
70562
  set: function set(val) {
70680
70563
  if (val !== this._charSpace) {
70564
+ if (val < 0) {
70565
+ console.warn("charSpace不能为负数", val);
70566
+ }
70681
70567
  this._charSpace = val;
70682
70568
  }
70683
70569
  }
@@ -70850,9 +70736,8 @@ var DrawLine = /*#__PURE__*/function (_DrawContainer) {
70850
70736
  }, {
70851
70737
  key: "adjustDHeight",
70852
70738
  value: function adjustDHeight(dHeight) {
70853
- if (this.paragraphNode.parentNode && this.paragraphNode.parentNode.nodeType === BaseNode/* NodeType */.Jq.ntCell && this.paragraphNode.parentNode.table.tableProperty.isAutoChangeLine) {
70854
- var cell = this.paragraphNode.parentNode;
70855
- //const [r, c] = cell.table.getCellInfos(cell);
70739
+ var cell = this.paragraphNode.parentNode;
70740
+ if (cell instanceof CellNode/* CellNode */.D && cell.table.tableProperty.isAutoChangeLine) {
70856
70741
  if (cell.needPaintLineGrid() && dHeight, cell.table.tableProperty.autoLineHeightPx) {
70857
70742
  dHeight = Math.max(dHeight, cell.table.tableProperty.autoLineHeightPx - this.paragraphNode.combineParagraph.lineSpace - this.paragraphNode.combineParagraph.topMarginPixes);
70858
70743
  }
@@ -70932,6 +70817,7 @@ var DrawLine = /*#__PURE__*/function (_DrawContainer) {
70932
70817
  }
70933
70818
  this._charCount = iCount;
70934
70819
  actualWidth += dWidth + spacing; //charspace;
70820
+ // console.log(dWidth, spacing, '------');
70935
70821
  }
70936
70822
 
70937
70823
  this._maxFontHeight = maxFontHeight;
@@ -70947,87 +70833,52 @@ var DrawLine = /*#__PURE__*/function (_DrawContainer) {
70947
70833
  }
70948
70834
  }, {
70949
70835
  key: "updateLineStyle",
70950
- value: function updateLineStyle() {
70951
- // let dHeight = this._paragraphNode.hoEditorFactory.defaultLineHeight;
70836
+ value: function updateLineStyle(isUpdate) {
70952
70837
  //FIXME:去掉左边距后真实的宽度,后续还要去掉margin的的left right
70953
70838
  //处理段落的缩进2024-02-19
70954
70839
  var leftWidthInfos = this.paragraphNode.getParagraphLeftWidth();
70955
70840
  var ileft = leftWidthInfos[0];
70956
- this.x = this.paragraphNode.combineParagraph.leftMarginPixes;
70957
- if (leftWidthInfos[2]) this.x += ileft;
70958
- // const lwidth =
70959
- // leftWidthInfos[1] -
70960
- // this.paragraphNode.combineParagraph.leftMarginPixes -
70961
- // this.paragraphNode.combineParagraph.rightMarginPixes;
70841
+ // this.x = ;
70842
+ if (leftWidthInfos[2]) {
70843
+ this.x = this.paragraphNode.combineParagraph.leftMarginPixes + ileft;
70844
+ } else {
70845
+ this.x = this.paragraphNode.combineParagraph.leftMarginPixes + this.dLeft;
70846
+ }
70962
70847
  var lwidth = this._dWidth;
70848
+ // console.log(this.x, this.dLeft, '+++++++++++++++', leftWidthInfos);
70963
70849
  //文字摆放开始位置
70964
- var usedWidth = 0; //this.paragraphNode.combineParagraph.leftMarginPixes;
70965
- //字间距,分散对齐:计算宽度时候使用默认字间距
70966
- // const charspace =
70967
- // this._paragraphNode.combineParagraph.align == Align.alSpaceEqually
70968
- // ? gCharSpace
70969
- // : this.charSpace;
70850
+ var usedWidth = 0;
70970
70851
  var spacing = 0;
70971
70852
  //最后一个字不计算字间距位置
70972
- // this._dHeight = dHeight;
70973
70853
  var isLastLine = this === this._paragraphNode.drawlines[this._paragraphNode.drawlines.length - 1];
70974
70854
  this._charSpace = this._paragraphNode.combineParagraph.charSpace;
70975
- // if (restWidth > 0&& this.drawItems.length>1) {
70976
- // this._charSpace = restWidth / this.drawItems.length - 1;
70977
- // }
70978
- // this.setBounds(this._dLeft, this._dTop, this._dWidth, this._dHeight);
70979
- // const shape = new createjs.Shape();
70980
- // shape.x = 0;
70981
- // shape.y = 0;
70982
- // shape.graphics
70983
- // .clear()
70984
- // .beginFill("#FFEE90")
70985
- // .drawRect(
70986
- // 0,
70987
- // 0,
70988
- // this._dWidth,
70989
- // this._dHeight + this.paragraphNode.combineParagraph.lineSpace
70990
- // );
70991
- // shape.alpha = 0.5;
70992
- // const y = this._dTop;
70993
- // this.removeAllChildren();
70994
- // this.uncache();
70995
- // this.addChildAt(shape, 0);
70996
70855
  //2.计算起始位置
70997
70856
  switch (this._paragraphNode.combineParagraph.align) {
70998
70857
  case Paragraph/* Align */.xM.alleft:
70999
- {
71000
- break;
71001
- }
70858
+ break;
71002
70859
  case Paragraph/* Align */.xM.alright:
71003
- {
71004
- if (lwidth - this.actualWidth > 0) {
71005
- usedWidth += lwidth - this.actualWidth;
71006
- }
71007
- break;
70860
+ if (lwidth - this.actualWidth > 0) {
70861
+ usedWidth += lwidth - this.actualWidth;
71008
70862
  }
70863
+ break;
71009
70864
  case Paragraph/* Align */.xM.alcenter:
71010
- {
71011
- if (lwidth - this.actualWidth > 0) {
71012
- usedWidth += (lwidth - this.actualWidth) / 2;
71013
- }
71014
- break;
70865
+ if (lwidth - this.actualWidth > 0) {
70866
+ usedWidth += (lwidth - this.actualWidth) / 2;
71015
70867
  }
70868
+ break;
71016
70869
  case Paragraph/* Align */.xM.alSpaceEqually:
71017
- {
71018
- //更新字间距,目标是让字的宽度相同
71019
- if (this._charCount > 1 && !isLastLine) {
71020
- spacing = Math.floor((lwidth - this.actualWidth) / (this._charCount - 1) * 100) / 100;
71021
- } else {
71022
- spacing = this._paragraphNode.combineParagraph.charSpace;
71023
- }
71024
- // if (this.drawItems.length > 1) {
71025
- // spacing = (lwidth - this.actualWidth) / (this.drawItems.length - 1);
71026
- // }
71027
- this.charSpace += spacing;
71028
- usedWidth += 0;
71029
- break;
70870
+ //更新字间距,目标是让字的宽度相同
70871
+ if (this._charCount > 1 && !isLastLine) {
70872
+ spacing = Math.floor((lwidth - this.actualWidth) / (this._charCount - 1) * 100) / 100;
70873
+ } else {
70874
+ spacing = this._paragraphNode.combineParagraph.charSpace;
70875
+ }
70876
+ if (spacing < 0) {
70877
+ spacing = 0;
71030
70878
  }
70879
+ this.charSpace += spacing;
70880
+ usedWidth += 0;
70881
+ break;
71031
70882
  }
71032
70883
  if (Paragraph/* Align */.xM.alright && this.paragraphNode.parentNode instanceof TextInputFieldNode/* TextInputFieldNode */.re && this.paragraphNode.parentNode.alignWithBlocked) {
71033
70884
  usedWidth = 0;
@@ -71041,9 +70892,11 @@ var DrawLine = /*#__PURE__*/function (_DrawContainer) {
71041
70892
  return 0;
71042
70893
  }
71043
70894
  if (dline._paragraphNode.combineParagraph.align != Paragraph/* Align */.xM.alSpaceEqually) return dline.charSpace;
71044
- if (isLastLine) return dline._paragraphNode.combineParagraph.charSpace;
71045
- //oldcharspace;
71046
- else return dline.charSpace;
70895
+ if (isLastLine) {
70896
+ return dline._paragraphNode.combineParagraph.charSpace;
70897
+ } else {
70898
+ return dline.charSpace;
70899
+ }
71047
70900
  };
71048
70901
  //3.放置
71049
70902
  //DONE:行高
@@ -71054,9 +70907,6 @@ var DrawLine = /*#__PURE__*/function (_DrawContainer) {
71054
70907
  if (aHeight <= this._docHeight) {
71055
70908
  this._dHeight = aHeight + this._maxFontHeight * (this.paragraphNode.combineParagraph.lineSpace - 1);
71056
70909
  }
71057
- // } else {
71058
- //this._dHeight = this.paragraphNode.combineParagraph.lineSpace * dHeight;
71059
- // }
71060
70910
  this.dHeight = this._dHeight;
71061
70911
  var bottompos = dHeight + (this._dHeight - dHeight) / 2;
71062
70912
  for (var j = 0; j < this.drawItems.length; j++) {
@@ -71070,8 +70920,6 @@ var DrawLine = /*#__PURE__*/function (_DrawContainer) {
71070
70920
  this.drawItems[j].x = usedWidth;
71071
70921
  this.drawItems[j].y = bottompos;
71072
70922
  usedWidth += dwidth + charSpace;
71073
- // + 1;
71074
- // this._charSpace;
71075
70923
  }
71076
70924
  }
71077
70925
  //4.前一个字符需要在下一个字符的上层,处理斜体被遮盖的问题
@@ -71083,18 +70931,6 @@ var DrawLine = /*#__PURE__*/function (_DrawContainer) {
71083
70931
  }
71084
70932
  level++;
71085
70933
  }
71086
- // if (
71087
- // this._paragraphNode.hoEditorFactory.drawTree.paintStatus !==
71088
- // PaintState.psPreview &&
71089
- // this._paragraphNode.hoEditorFactory.drawTree.paintStatus !==
71090
- // PaintState.psPrint
71091
- // )
71092
- // this.cache(
71093
- // 0,
71094
- // 0,
71095
- // this._dWidth,
71096
- // this._dHeight //+ lineSpace * 2 + 1
71097
- // );
71098
70934
  }
71099
70935
  }, {
71100
70936
  key: "isFullNumEnglish",
@@ -71548,7 +71384,7 @@ var DrawResize = /*#__PURE__*/function () {
71548
71384
  /* harmony export */ });
71549
71385
  var gDrawIntfID = 'I-AM-IDrawInfos';
71550
71386
  function instanceOfIDrawInfos(object) {
71551
- return object.discriminator === 'I-AM-IDrawInfos';
71387
+ return object && object.discriminator === 'I-AM-IDrawInfos';
71552
71388
  }
71553
71389
 
71554
71390
  /***/ }),
@@ -73760,7 +73596,6 @@ var DrawPageMainDoc = /*#__PURE__*/function (_DrawArea) {
73760
73596
  this._dWidth = this._maxWidth;
73761
73597
  this._dHeight = this._maxHeight;
73762
73598
  this._docHeight = 0;
73763
-
73764
73599
  //检测边框变化情况,如有变化则重绘
73765
73600
  }
73766
73601
  }]);
@@ -74466,8 +74301,10 @@ var DrawCombineNode = /*#__PURE__*/function (_DrawContainer) {
74466
74301
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_this), "_discriminator", void 0);
74467
74302
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_this), "_event", void 0);
74468
74303
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_this), "_hoEditorFactoryID", void 0);
74304
+ (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_this), "MarkNodeType", void 0);
74469
74305
  _this._hoEditorFactoryID = hoeditfactoryID;
74470
74306
  _this._node = node;
74307
+ _this.MarkNodeType = node.MarkNodeType;
74471
74308
  _this._discriminator = _IDrawInfos__WEBPACK_IMPORTED_MODULE_13__/* .gDrawIntfID */ .t;
74472
74309
  _this._charSpace = 0;
74473
74310
  _this.bindEvent();
@@ -79194,6 +79031,7 @@ var DrawRadioAndCheckBox = /*#__PURE__*/function (_DrawCombineNode) {
79194
79031
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_this), "_dAppendText", void 0);
79195
79032
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_this), "_dUnderLine", void 0);
79196
79033
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_this), "_charCount", void 0);
79034
+ (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_this), "dBoxWidth", 0);
79197
79035
  _this._controlStyle = controlStyle;
79198
79036
  if (node.isTransToText) {
79199
79037
  _this._charCount = 1;
@@ -79228,6 +79066,7 @@ var DrawRadioAndCheckBox = /*#__PURE__*/function (_DrawCombineNode) {
79228
79066
  }
79229
79067
  var textWidth = _this._dText.getMeasuredWidth();
79230
79068
  var boxwidth = _this._dBox.getMeasuredWidth();
79069
+ _this.dBoxWidth = boxwidth;
79231
79070
  _this.dWidth = textWidth + boxwidth + blockWidth;
79232
79071
  if (node.isEditText) {
79233
79072
  var underLineLen = 40;
@@ -79241,10 +79080,6 @@ var DrawRadioAndCheckBox = /*#__PURE__*/function (_DrawCombineNode) {
79241
79080
  }
79242
79081
  _this.dHeight = height;
79243
79082
  _this._textStyle = textStyle;
79244
- // this._border = new createjs.Shape();
79245
- // this._border.graphics.beginFill("red").drawRect(0, 0, this.dWidth, this.dHeight);
79246
- // this._border.y = - this.dHeight;
79247
- //this._mouseOverShape = new createjs.Shape();
79248
79083
  _this.drawRadioAndCheckBox();
79249
79084
  return _this;
79250
79085
  }
@@ -79305,14 +79140,6 @@ var DrawRadioAndCheckBox = /*#__PURE__*/function (_DrawCombineNode) {
79305
79140
  key: "drawRadioAndCheckBox",
79306
79141
  value: function drawRadioAndCheckBox() {
79307
79142
  this.clear();
79308
- // const backColor = new createjs.Shape();
79309
- // backColor.graphics.clear();
79310
- // backColor.graphics
79311
- // .beginFill("#ADD8E6")
79312
- // .drawRect(0, 0, this.dWidth, -this.dHeight);
79313
- // backColor.alpha = 0.01;
79314
- // backColor.name = "backColor";
79315
- // this.addChildAt(backColor, 0);
79316
79143
  if (this.boxAlign) {
79317
79144
  this.drawBox();
79318
79145
  if (!this.node.isTransToText && this.text.length > 0) {
@@ -79444,9 +79271,10 @@ var DrawRadioAndCheckBox = /*#__PURE__*/function (_DrawCombineNode) {
79444
79271
  var DrawRadioAndCheckBoxPrint = /*#__PURE__*/function (_DrawCombineNode) {
79445
79272
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(DrawRadioAndCheckBoxPrint, _DrawCombineNode);
79446
79273
  var _super = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(DrawRadioAndCheckBoxPrint);
79274
+ // public dBoxWidth: number = 0;
79447
79275
  function DrawRadioAndCheckBoxPrint(hoeditfactoryID, rootPath, node, index, controlStyle,
79448
79276
  //name: string,
79449
- isSelected, boxAlign, numericValue, height, textStyle) {
79277
+ isSelected, boxAlign, numericValue, height, textStyle, dBoxWidth) {
79450
79278
  var _this;
79451
79279
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, DrawRadioAndCheckBoxPrint);
79452
79280
  _this = _super.call(this, hoeditfactoryID, rootPath, node, index);
@@ -79482,12 +79310,12 @@ var DrawRadioAndCheckBoxPrint = /*#__PURE__*/function (_DrawCombineNode) {
79482
79310
  _this._dBox.graphics.clear().setStrokeStyle(1, 'round', 'round').beginStroke("#000").drawCircle((height - 2) / 2, -height / 2 + 2, (height - 2) / 2).endStroke();
79483
79311
  }
79484
79312
  var textWidth = _this._dText.getMeasuredWidth();
79485
- var boxwidth = height;
79486
79313
  var blockWidth = 0;
79487
79314
  if (_this.text !== "") {
79488
79315
  blockWidth = 6;
79489
79316
  }
79490
- _this.dWidth = textWidth + boxwidth + blockWidth;
79317
+ // this.dBoxWidth = dBoxWidth;
79318
+ _this.dWidth = textWidth + dBoxWidth + blockWidth;
79491
79319
  if (node.isEditText) {
79492
79320
  var underLineLen = 40;
79493
79321
  if (node.appendText.length > 0) {
@@ -79580,54 +79408,57 @@ var DrawRadioAndCheckBoxPrint = /*#__PURE__*/function (_DrawCombineNode) {
79580
79408
  value: function drawBox() {
79581
79409
  var drawBox;
79582
79410
  drawBox = new createjs.Shape();
79411
+ var textWidth = this._dText.getMeasuredWidth();
79412
+ var x = 0;
79413
+ if (this.boxAlign) {
79414
+ // if(this.controlStyle === "CheckBox"){
79415
+ // x = Math.max(1, this.dBoxWidth - this.dHeight);
79416
+ // } else {
79417
+ x = 1;
79418
+ // }
79419
+ } else {
79420
+ x = textWidth;
79421
+ }
79583
79422
  if (this.controlStyle === "CheckBox") {
79584
79423
  //复选框
79585
79424
  if (this.isSelected) {
79586
79425
  drawBox.graphics.clear().beginStroke(this._textStyle.color).drawRect(0, -this.dHeight + 2, this.dHeight - 2, this.dHeight - 2).endStroke();
79587
- this.addChild(drawBox);
79588
79426
  var line1 = new createjs.Shape();
79589
79427
  var line2 = new createjs.Shape();
79590
79428
  if (this.boxAlign) {
79591
79429
  line1.graphics.beginStroke(this._textStyle.color).moveTo(3, -this.dHeight / 2 + 2).lineTo(this.dHeight / 2 - 1, -2).endStroke();
79592
- this.addChild(line1);
79593
79430
  line2.graphics.beginStroke(this._textStyle.color).moveTo(this.dHeight / 2 - 1, -2).lineTo(this.dHeight - 3, -this.dHeight + 4).endStroke();
79594
- this.addChild(line2);
79431
+ line1.x = x;
79432
+ line2.x = x;
79595
79433
  } else {
79596
- var textWidth = this._dText.getMeasuredWidth();
79597
79434
  line1.graphics.beginStroke(this._textStyle.color).moveTo(3 + textWidth, -this.dHeight / 2 + 2).lineTo(this.dHeight / 2 - 1 + textWidth, -2).endStroke();
79598
- this.addChild(line1);
79599
79435
  line2.graphics.beginStroke(this._textStyle.color).moveTo(this.dHeight / 2 - 1 + textWidth, -2).lineTo(this.dHeight - 3 + textWidth, -this.dHeight + 4).endStroke();
79600
- this.addChild(line2);
79601
79436
  }
79437
+ this.addChild(line1);
79438
+ this.addChild(line2);
79602
79439
  } else {
79603
79440
  drawBox.graphics.clear().beginStroke(this._textStyle.color).drawRect(0, -this.dHeight + 2, this.dHeight - 2, this.dHeight - 2).endStroke();
79604
- this.addChild(drawBox);
79605
79441
  }
79606
79442
  } else {
79607
79443
  //单选框
79608
79444
  if (this.isSelected) {
79609
79445
  drawBox.graphics.clear().setStrokeStyle(1, 'round', 'round').beginStroke(this._textStyle.color).drawCircle((this.dHeight - 2) / 2, -this.dHeight / 2 + 2, (this.dHeight - 2) / 2).endStroke();
79610
- this.addChild(drawBox);
79611
79446
  var dot = new createjs.Shape();
79612
79447
  if (this.boxAlign) {
79613
- dot.graphics.clear().beginStroke(this._textStyle.color).beginFill(this._textStyle.color).drawCircle((this.dHeight - 2) / 2 + 1, -this.dHeight / 2 + 2, 1).endStroke();
79448
+ dot.graphics.clear().beginStroke(this._textStyle.color).beginFill(this._textStyle.color).drawCircle((this.dHeight - 2) / 2 + x, -this.dHeight / 2 + 2, 1).endStroke();
79614
79449
  this.addChild(dot);
79615
79450
  } else {
79616
- dot.graphics.clear().beginStroke(this._textStyle.color).beginFill(this._textStyle.color).drawCircle((this.dHeight - 2) / 2 + this._dText.getMeasuredWidth(), -this.dHeight / 2 + 2, 1).endStroke();
79451
+ dot.graphics.clear().beginStroke(this._textStyle.color).beginFill(this._textStyle.color).drawCircle((this.dHeight - 2) / 2 + textWidth, -this.dHeight / 2 + 2, 1).endStroke();
79617
79452
  this.addChild(dot);
79618
79453
  }
79619
79454
  } else {
79620
79455
  drawBox.graphics.clear().setStrokeStyle(1, 'round', 'round').beginStroke(this._textStyle.color).drawCircle((this.dHeight - 2) / 2, -this.dHeight / 2 + 2, (this.dHeight - 2) / 2).endStroke();
79621
- this.addChild(drawBox);
79622
79456
  }
79623
79457
  }
79624
79458
  drawBox.name = "box";
79625
- if (this.boxAlign) {
79626
- drawBox.x = 1;
79627
- } else {
79628
- drawBox.x = this._dText.getMeasuredWidth();
79629
- }
79459
+ drawBox.x = x;
79630
79460
  drawBox.y = this.y;
79461
+ this.addChild(drawBox);
79631
79462
  }
79632
79463
  }, {
79633
79464
  key: "drawText",
@@ -85655,7 +85486,9 @@ var DrawTree = /*#__PURE__*/function () {
85655
85486
  }
85656
85487
  }
85657
85488
  }
85658
- if (NodePosition/* NodePosition */.F.treePathCompare(aEndPath, hoeditorFactory.docTree.getNodeLastPath(node)) <= 0) break;
85489
+ if (NodePosition/* NodePosition */.F.treePathCompare(aEndPath, hoeditorFactory.docTree.getNodeLastPath(node)) <= 0) {
85490
+ break;
85491
+ }
85659
85492
  // if (node === npEnd.node) {
85660
85493
  // break;
85661
85494
  // }
@@ -85674,20 +85507,7 @@ var DrawTree = /*#__PURE__*/function () {
85674
85507
  // dline = paraNode.getLastDrawline();
85675
85508
  // dline = dline.paragraphNode.getLastDrawline();
85676
85509
  }
85677
- // const arr = aEndPath.split("/");
85678
- // const endIndex = parseInt(arr[arr.length - 1]);
85679
- // if (node instanceof ParagraphNode) {
85680
- // (node as ParagraphNode).placeDNodeAfterDline(dlines, dline);
85681
- // } else {
85682
- // node?.placeDNode2DrawLine(
85683
- // dlines,
85684
- // paraNode,
85685
- // dline,
85686
- // index,
85687
- // 0,
85688
- // endIndex
85689
- // );
85690
- // }
85510
+
85691
85511
  if (dline instanceof DrawLine/* DrawLine */.a) {
85692
85512
  dline.fitLines();
85693
85513
  dline.paragraphNode.updateDrawLineStyle();
@@ -210678,7 +210498,7 @@ var TextNode = __webpack_require__(27198);
210678
210498
  // EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
210679
210499
  var ParagraphNode = __webpack_require__(67945);
210680
210500
  ;// CONCATENATED MODULE: ./src/components/version.ts
210681
- /* harmony default export */ var version = ('3.1.159');
210501
+ /* harmony default export */ var version = ('3.1.161');
210682
210502
  // EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
210683
210503
  var PoperTipText = __webpack_require__(84531);
210684
210504
  ;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
@@ -223580,6 +223400,8 @@ var VueController = /*#__PURE__*/function () {
223580
223400
  loopChildNodes(node.childNodes);
223581
223401
  } else if (node instanceof ParagraphNode/* ParagraphNode */.C) {
223582
223402
  docText += '\n';
223403
+ } else if (node instanceof SignNode/* SignNode */.N && node.customProperty && node.customProperty.bce03) {
223404
+ docText += node.customProperty.bce03;
223583
223405
  }
223584
223406
  }
223585
223407
  };