hoeditor-web 3.1.166 → 3.1.168
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/hoeditor.css +0 -3
- package/lib/hoeditor.umd.js +165 -1645
- package/lib/hoeditor.umd.min.js +4 -4
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -7847,7 +7847,7 @@ var component = (0,componentNormalizer/* default */.Z)(
|
|
|
7847
7847
|
|
|
7848
7848
|
/***/ }),
|
|
7849
7849
|
|
|
7850
|
-
/***/
|
|
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=
|
|
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
|
-
|
|
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
|
|
8098
|
+
var _this2 = this;
|
|
8091
8099
|
this.animationClassNames = 'control-modal-contents find-modal animation-out';
|
|
8092
8100
|
window.clearTimeout();
|
|
8093
8101
|
setTimeout(function () {
|
|
8094
|
-
|
|
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=
|
|
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=
|
|
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);
|
|
@@ -16107,7 +16115,7 @@ var component = (0,componentNormalizer/* default */.Z)(
|
|
|
16107
16115
|
|
|
16108
16116
|
/***/ }),
|
|
16109
16117
|
|
|
16110
|
-
/***/
|
|
16118
|
+
/***/ 40460:
|
|
16111
16119
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
16112
16120
|
|
|
16113
16121
|
"use strict";
|
|
@@ -16123,7 +16131,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
16123
16131
|
var es_function_name = __webpack_require__(68309);
|
|
16124
16132
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
|
|
16125
16133
|
var es_array_concat = __webpack_require__(92222);
|
|
16126
|
-
;// 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/sign/Sign.vue?vue&type=template&id=
|
|
16134
|
+
;// 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/sign/Sign.vue?vue&type=template&id=84bb72d6&
|
|
16127
16135
|
|
|
16128
16136
|
|
|
16129
16137
|
var render = function render() {
|
|
@@ -16637,7 +16645,7 @@ var render = function render() {
|
|
|
16637
16645
|
};
|
|
16638
16646
|
var staticRenderFns = [];
|
|
16639
16647
|
|
|
16640
|
-
;// CONCATENATED MODULE: ./src/components/controls/sign/Sign.vue?vue&type=template&id=
|
|
16648
|
+
;// CONCATENATED MODULE: ./src/components/controls/sign/Sign.vue?vue&type=template&id=84bb72d6&
|
|
16641
16649
|
|
|
16642
16650
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
16643
16651
|
var objectSpread2 = __webpack_require__(63442);
|
|
@@ -16946,10 +16954,10 @@ var SignNode = __webpack_require__(24701);
|
|
|
16946
16954
|
});
|
|
16947
16955
|
;// CONCATENATED MODULE: ./src/components/controls/sign/Sign.vue?vue&type=script&lang=js&
|
|
16948
16956
|
/* harmony default export */ var sign_Signvue_type_script_lang_js_ = (Signvue_type_script_lang_js_);
|
|
16949
|
-
;// 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/sign/Sign.vue?vue&type=style&index=0&id=
|
|
16957
|
+
;// 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/sign/Sign.vue?vue&type=style&index=0&id=84bb72d6&prod&lang=less&
|
|
16950
16958
|
// extracted by mini-css-extract-plugin
|
|
16951
16959
|
|
|
16952
|
-
;// CONCATENATED MODULE: ./src/components/controls/sign/Sign.vue?vue&type=style&index=0&id=
|
|
16960
|
+
;// CONCATENATED MODULE: ./src/components/controls/sign/Sign.vue?vue&type=style&index=0&id=84bb72d6&prod&lang=less&
|
|
16953
16961
|
|
|
16954
16962
|
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
16955
16963
|
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
|
}]);
|
|
@@ -40022,10 +39955,6 @@ var DocController = /*#__PURE__*/function () {
|
|
|
40022
39955
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_102__/* ["default"] */ .Z.warn('选中区域在表格内,且为同一个表格才能删除');
|
|
40023
39956
|
return;
|
|
40024
39957
|
}
|
|
40025
|
-
// const eParentNode = (aRange.npEnd.node as BaseNode).parentNode;
|
|
40026
|
-
// if (eParentNode instanceof CellNode && eParentNode.rowSpan > 1) {
|
|
40027
|
-
// r2 = r2 + eParentNode.rowSpan - 1;
|
|
40028
|
-
// }
|
|
40029
39958
|
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_84__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
40030
39959
|
if (hoEditorFactory.drawTree.paintStatus == _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_98__/* .PaintState */ .Dh.psEdit) {
|
|
40031
39960
|
for (var i = r1; i <= r2; i++) {
|
|
@@ -40034,6 +39963,19 @@ var DocController = /*#__PURE__*/function () {
|
|
|
40034
39963
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_102__/* ["default"] */ .Z.warn('表头行不允许删除');
|
|
40035
39964
|
return;
|
|
40036
39965
|
}
|
|
39966
|
+
var row = table.rows[i];
|
|
39967
|
+
for (var j = 0; j < row.length; j++) {
|
|
39968
|
+
var cellNode = row[j];
|
|
39969
|
+
if (cellNode instanceof _treeNode_CellNode__WEBPACK_IMPORTED_MODULE_64__/* .CellNode */ .D) {
|
|
39970
|
+
for (var k = 0; k < cellNode.childNodes.length; k++) {
|
|
39971
|
+
var node = cellNode.childNodes[k];
|
|
39972
|
+
if (node && node.customProperty && node.customProperty.must) {
|
|
39973
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_102__/* ["default"] */ .Z.warn('选中行内包含必须输入元素不能删除行');
|
|
39974
|
+
return;
|
|
39975
|
+
}
|
|
39976
|
+
}
|
|
39977
|
+
}
|
|
39978
|
+
}
|
|
40037
39979
|
}
|
|
40038
39980
|
}
|
|
40039
39981
|
if (r1 === 0 && r2 == table.rowCount - 1) {
|
|
@@ -40063,21 +40005,6 @@ var DocController = /*#__PURE__*/function () {
|
|
|
40063
40005
|
hoEditorFactory.docTree.selectChange(cgEvent);
|
|
40064
40006
|
hoEditorFactory.drawTree.moveCaretToPath(path);
|
|
40065
40007
|
}
|
|
40066
|
-
// cell1.table.deleteRows(r1, r2 - r1 + 1);
|
|
40067
|
-
// const endPath = (cell1 as CellNode).table.getNodePath();
|
|
40068
|
-
// const [dcell, dRoots] = hoEditorFactory.drawTree.getDrawRootsByPath(
|
|
40069
|
-
// endPath
|
|
40070
|
-
// );
|
|
40071
|
-
// const startDline = dRoots.indexOf((cell1 as CellNode).table.drawTable);
|
|
40072
|
-
// if (startDline >= 0) {
|
|
40073
|
-
// hoEditorFactory.redrawManger.addRedrawRange(
|
|
40074
|
-
// null,
|
|
40075
|
-
// dRoots,
|
|
40076
|
-
// startDline,
|
|
40077
|
-
// dRoots.length - 1,
|
|
40078
|
-
// endPath
|
|
40079
|
-
// );
|
|
40080
|
-
// }
|
|
40081
40008
|
}
|
|
40082
40009
|
}, {
|
|
40083
40010
|
key: "tableDeleteCols",
|
|
@@ -40167,21 +40094,6 @@ var DocController = /*#__PURE__*/function () {
|
|
|
40167
40094
|
hoEditorFactory.undoService.begin();
|
|
40168
40095
|
hoEditorFactory.undoService.add(new _undoRedo_TableUndos_TableMergeCellUndoUnit__WEBPACK_IMPORTED_MODULE_73__/* .TableMergeCellUndoUnit */ .A(this._hoEditorFactoryID, cell1.table, r1, c1, aRowSpan, aColSpan));
|
|
40169
40096
|
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
40097
|
}
|
|
40186
40098
|
}
|
|
40187
40099
|
}
|
|
@@ -40630,8 +40542,8 @@ var DocController = /*#__PURE__*/function () {
|
|
|
40630
40542
|
}
|
|
40631
40543
|
this._count = 0;
|
|
40632
40544
|
var getArr2 = hoEditorFactory.docTree.singleReplace(path, findContent, replaceContent);
|
|
40633
|
-
var endPath2 = getArr2[
|
|
40634
|
-
var newTextNode2 = getArr2[
|
|
40545
|
+
var endPath2 = getArr2[1];
|
|
40546
|
+
var newTextNode2 = getArr2[2];
|
|
40635
40547
|
if (getArr2[3]) {
|
|
40636
40548
|
hoEditorFactory.undoService.begin();
|
|
40637
40549
|
hoEditorFactory.undoService.add(new _undoRedo_NodesDeleteUndoUnit__WEBPACK_IMPORTED_MODULE_43__/* .NodesDeleteUndoUnit */ .F(this._hoEditorFactoryID, path, endPath2));
|
|
@@ -41244,7 +41156,6 @@ var DocController = /*#__PURE__*/function () {
|
|
|
41244
41156
|
}
|
|
41245
41157
|
}
|
|
41246
41158
|
}
|
|
41247
|
-
//mainArea.stage.update();
|
|
41248
41159
|
hoEditorFactory.drawPageTree.updateDrawPage(mainArea.index);
|
|
41249
41160
|
} else {
|
|
41250
41161
|
return;
|
|
@@ -43812,15 +43723,12 @@ var DocTree = /*#__PURE__*/function () {
|
|
|
43812
43723
|
} else {
|
|
43813
43724
|
var npEnd = this.findNodePositionByPath(ePath);
|
|
43814
43725
|
if (npEnd && npEnd.node) {
|
|
43815
|
-
//if (npEnd.node instanceof TextNode) {
|
|
43816
43726
|
var _preNode = npEnd.node.previousLeaf();
|
|
43817
43727
|
if (_preNode) {
|
|
43818
43728
|
endPath = this.getNodeLastPath(_preNode);
|
|
43819
43729
|
}
|
|
43820
|
-
//}
|
|
43821
43730
|
}
|
|
43822
43731
|
}
|
|
43823
|
-
// const parentNode = this.getParentNode(sPath);
|
|
43824
43732
|
var node = this.getFindPathNode(sPath);
|
|
43825
43733
|
if (node instanceof _treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_36__/* .TextInputFieldNode */ .re) {
|
|
43826
43734
|
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 +43741,11 @@ var DocTree = /*#__PURE__*/function () {
|
|
|
43833
43741
|
} else if (node instanceof _treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_47__/* .DownListNode */ .yF) {
|
|
43834
43742
|
var _hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_45__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
43835
43743
|
_hoEditorFactory.elementController.updateDownListText(node, replaceContent);
|
|
43744
|
+
} else if (node instanceof _treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_28__/* .ParagraphNode */ .C || node instanceof _treeNode_TextNode__WEBPACK_IMPORTED_MODULE_29__/* .TextNode */ .R) {
|
|
43745
|
+
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);
|
|
43746
|
+
retArray[0] = startPath;
|
|
43747
|
+
retArray[1] = endPath;
|
|
43748
|
+
retArray[2] = _textNode;
|
|
43836
43749
|
}
|
|
43837
43750
|
return retArray;
|
|
43838
43751
|
}
|
|
@@ -43906,6 +43819,12 @@ var DocTree = /*#__PURE__*/function () {
|
|
|
43906
43819
|
_hoEditorFactory2.elementController.updateDownListText(snode, replaceContent);
|
|
43907
43820
|
// retArray[2] = snode;
|
|
43908
43821
|
retArray[3] = false;
|
|
43822
|
+
} else if (snode instanceof _treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_28__/* .ParagraphNode */ .C) {
|
|
43823
|
+
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);
|
|
43824
|
+
retArray[0] = startPath;
|
|
43825
|
+
retArray[1] = endPath;
|
|
43826
|
+
retArray[2] = _textNode2;
|
|
43827
|
+
retArray[3] = true;
|
|
43909
43828
|
}
|
|
43910
43829
|
return retArray;
|
|
43911
43830
|
}
|
|
@@ -44215,7 +44134,7 @@ var DocTree = /*#__PURE__*/function () {
|
|
|
44215
44134
|
if (!(np && np.node)) {
|
|
44216
44135
|
throw _events_Exception__WEBPACK_IMPORTED_MODULE_42__/* .Exception */ .P.NodeNotFound();
|
|
44217
44136
|
}
|
|
44218
|
-
if (np.node instanceof _treeNode_DateTimeNode__WEBPACK_IMPORTED_MODULE_46__/* .DateTimeNode */ .Z || np.node instanceof _treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_47__/* .DownListNode */ .yF) {
|
|
44137
|
+
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
44138
|
return np.node;
|
|
44220
44139
|
} else {
|
|
44221
44140
|
node = np.node.parentNode;
|
|
@@ -55118,12 +55037,9 @@ var MarkNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
55118
55037
|
set: function set(val) {
|
|
55119
55038
|
if (this._alpha != val) {
|
|
55120
55039
|
this._alpha = val;
|
|
55121
|
-
if (this._type == MarkNodeType.mtContent) {
|
|
55122
|
-
// this.node2DrawNode();
|
|
55123
|
-
} else {
|
|
55040
|
+
if (this._type == MarkNodeType.mtContent) {} else {
|
|
55124
55041
|
if (this.drawNodes[0].parent && this.drawNodes[0].parent.stage) {
|
|
55125
55042
|
this.drawNodes[0].alpha = this._alpha;
|
|
55126
|
-
// (this.drawNodes[0].parent as DrawLine).updateCache();
|
|
55127
55043
|
this.drawNodes[0].parent.stage.update();
|
|
55128
55044
|
}
|
|
55129
55045
|
}
|
|
@@ -56232,28 +56148,11 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
56232
56148
|
if (customProperty) {
|
|
56233
56149
|
_this.setCustomProperty(customProperty);
|
|
56234
56150
|
}
|
|
56235
|
-
// this.node2DrawNode();
|
|
56236
56151
|
return _this;
|
|
56237
56152
|
}
|
|
56238
56153
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(ParagraphNode, [{
|
|
56239
56154
|
key: "setCustomProperty",
|
|
56240
56155
|
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
56156
|
if (customProperty) {
|
|
56258
56157
|
this._customProperty = customProperty;
|
|
56259
56158
|
}
|
|
@@ -56274,7 +56173,6 @@ var ParagraphNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
56274
56173
|
if (val != this._paraNo) {
|
|
56275
56174
|
this._paraNo = val;
|
|
56276
56175
|
this.combineParagraph = this.updateCombineParagraph();
|
|
56277
|
-
// this.node2DrawNode();
|
|
56278
56176
|
this._drawLines.forEach(function (value) {
|
|
56279
56177
|
value.paragraphNode.combineParagraph.copyStyle(_this2.combineParagraph);
|
|
56280
56178
|
});
|
|
@@ -63149,9 +63047,6 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
|
|
|
63149
63047
|
for (var col = c; col < c + aColSpan; col++) {
|
|
63150
63048
|
victimCell = this._rows[row][col];
|
|
63151
63049
|
if (victimCell !== vampireCell && victimCell) {
|
|
63152
|
-
// if (vampireCell.childNodes.length > 0) {
|
|
63153
|
-
// vampireCell.childNodes.concat(victimCell.childNodes);
|
|
63154
|
-
// }
|
|
63155
63050
|
victimCell.drawCell.removeAllPartCell();
|
|
63156
63051
|
this._rows[row][col] = undefined;
|
|
63157
63052
|
}
|
|
@@ -63159,16 +63054,6 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
|
|
|
63159
63054
|
}
|
|
63160
63055
|
vampireCell.rowSpan = aRowSpan;
|
|
63161
63056
|
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
63057
|
this.countChildNodes();
|
|
63173
63058
|
vampireCell.drawCell.needUpdate = true;
|
|
63174
63059
|
return vampireCell;
|
|
@@ -64169,7 +64054,9 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
|
|
|
64169
64054
|
}
|
|
64170
64055
|
}
|
|
64171
64056
|
for (var _j3 = 0; _j3 <= maxR; _j3++) {
|
|
64172
|
-
|
|
64057
|
+
if (this.drawTable.drawPageTables[0]) {
|
|
64058
|
+
headerRowHeight += this.drawTable.drawPageTables[0].getPartRowHeight(_j3);
|
|
64059
|
+
}
|
|
64173
64060
|
}
|
|
64174
64061
|
}
|
|
64175
64062
|
return [maxR, headerRowHeight];
|
|
@@ -71359,21 +71246,6 @@ var DrawResize = /*#__PURE__*/function () {
|
|
|
71359
71246
|
changeEvent.oldDrawLines = new _SelectRange__WEBPACK_IMPORTED_MODULE_10__/* .SelectRange */ .E(this._hoEditorFactoryID).getRangeDrawLines(path, path, true, true);
|
|
71360
71247
|
hoEditorFactory.docTree.change(changeEvent);
|
|
71361
71248
|
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
71249
|
var dArea = hoEditorFactory.drawPageTree.getMainRootArea(this.drawNode);
|
|
71378
71250
|
if (dArea) {
|
|
71379
71251
|
hoEditorFactory.drawPageTree.updateDrawPage(dArea.index);
|
|
@@ -72397,7 +72269,7 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
72397
72269
|
var startChildIndex = 0;
|
|
72398
72270
|
var dHeadHeight = dTable.getHeadHeight();
|
|
72399
72271
|
var dPageTable = dTable.getDrawTableByParentArea(this);
|
|
72400
|
-
if (dHeadHeight + _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_23__/* .gDefaultRowHeight */ .dT > dRestHeight) {
|
|
72272
|
+
if (dHeadHeight + _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_23__/* .gDefaultRowHeight */ .dT > dRestHeight || !dTable.isFirstRowCanFit(dRestHeight)) {
|
|
72401
72273
|
if (dPageTable) {
|
|
72402
72274
|
dPageTable.parent.removeChild(dPageTable);
|
|
72403
72275
|
}
|
|
@@ -72577,7 +72449,7 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
72577
72449
|
// const pagePos = hoEditorFactory.drawTree.getDrawLinePagePos(dline);
|
|
72578
72450
|
if (dline instanceof _drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_18__/* .DrawTable */ .t) {
|
|
72579
72451
|
var dTable = dline;
|
|
72580
|
-
if (dTable.getHeadHeight() + _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_23__/* .gDefaultRowHeight */ .dT > restHeight) {
|
|
72452
|
+
if (dTable.getHeadHeight() + _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_23__/* .gDefaultRowHeight */ .dT > restHeight || !dTable.isFirstRowCanFit(restHeight)) {
|
|
72581
72453
|
isFull = true;
|
|
72582
72454
|
this.clearOverDitem(dlines, nextDline);
|
|
72583
72455
|
return [isFull, dTop, restHeight];
|
|
@@ -73905,7 +73777,6 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
|
|
|
73905
73777
|
set: function set(val) {
|
|
73906
73778
|
if (val !== this._dWidth) {
|
|
73907
73779
|
this._dWidth = val;
|
|
73908
|
-
// ((this as unknown) as DrawInfos).dWidth = val;
|
|
73909
73780
|
}
|
|
73910
73781
|
}
|
|
73911
73782
|
}, {
|
|
@@ -73963,98 +73834,6 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
|
|
|
73963
73834
|
}
|
|
73964
73835
|
}
|
|
73965
73836
|
}
|
|
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
73837
|
}, {
|
|
74059
73838
|
key: "getCellRestHeight",
|
|
74060
73839
|
value: function getCellRestHeight(index) {
|
|
@@ -74073,21 +73852,10 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
|
|
|
74073
73852
|
key: "copyPaintCell",
|
|
74074
73853
|
value: function copyPaintCell(destParent, r, dTop) {
|
|
74075
73854
|
var dParent = destParent;
|
|
74076
|
-
// if (!dParent)
|
|
74077
|
-
// dParent = this._cell.table.drawTable.getDrawTableByParentArea(pageIndex);
|
|
74078
73855
|
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
73856
|
var subDocArea = this._cell.drawCell._drawPageCells[0];
|
|
74087
73857
|
var destArea = this._cell.drawCell.getDrawPageCell(dParent);
|
|
74088
73858
|
if (subDocArea) {
|
|
74089
|
-
// const dPage = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.drawPages[pageIndex];
|
|
74090
|
-
// if (dPage && dPage.drawDomLevel) {
|
|
74091
73859
|
var cc = subDocArea.clone(true);
|
|
74092
73860
|
var destSubDocArea;
|
|
74093
73861
|
if (destArea) {
|
|
@@ -74096,11 +73864,6 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
|
|
|
74096
73864
|
if (!destParent.contains(destArea)) {
|
|
74097
73865
|
destParent.addChild(destSubDocArea);
|
|
74098
73866
|
}
|
|
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
73867
|
} else {
|
|
74105
73868
|
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
73869
|
destParent.addChild(destSubDocArea);
|
|
@@ -74112,12 +73875,6 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
|
|
|
74112
73875
|
if (tindex >= 0) {
|
|
74113
73876
|
destSubDocArea.removeChildAt(tindex);
|
|
74114
73877
|
}
|
|
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
73878
|
destSubDocArea.dHeight = subDocArea.dHeight;
|
|
74122
73879
|
destSubDocArea.dLeft = subDocArea.dLeft;
|
|
74123
73880
|
destSubDocArea.dTop = dTop;
|
|
@@ -74132,21 +73889,15 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
|
|
|
74132
73889
|
destSubDocArea.x = subDocArea.x;
|
|
74133
73890
|
destSubDocArea.y = dTop;
|
|
74134
73891
|
return destSubDocArea;
|
|
74135
|
-
// dPage.drawDomLevel.stage.update();
|
|
74136
|
-
// }
|
|
74137
73892
|
}
|
|
74138
|
-
|
|
74139
73893
|
return destArea;
|
|
74140
|
-
// }
|
|
74141
73894
|
}
|
|
74142
|
-
|
|
74143
73895
|
return null;
|
|
74144
73896
|
}
|
|
74145
73897
|
}, {
|
|
74146
73898
|
key: "paintCell",
|
|
74147
73899
|
value: function paintCell(dParent, dTop, dHeight, maxHeight, startDline) {
|
|
74148
73900
|
var ret = 0;
|
|
74149
|
-
// let aTop = 0;
|
|
74150
73901
|
var _this$_cell$getLeftWi = this._cell.getLeftWidth(),
|
|
74151
73902
|
_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
73903
|
aleft = _this$_cell$getLeftWi2[0],
|
|
@@ -74164,36 +73915,7 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
|
|
|
74164
73915
|
valignTop = aHeight - this._cell.drawCell.docHeight;
|
|
74165
73916
|
}
|
|
74166
73917
|
}
|
|
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
73918
|
var dPartTable = dParent;
|
|
74196
|
-
//const cellRestHeight = this.getCellRestHeight(drawPage.pageIndex);
|
|
74197
73919
|
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
73920
|
dPartCell.x = aleft;
|
|
74199
73921
|
dPartCell.y = dTop;
|
|
@@ -74217,8 +73939,6 @@ var DrawCell = /*#__PURE__*/function (_DrawRect) {
|
|
|
74217
73939
|
});
|
|
74218
73940
|
if (this._drawPageCells.length > 0) {
|
|
74219
73941
|
this._drawPageCells[0].addChild(paraNode.drawlines[0]);
|
|
74220
|
-
// paraNode.drawlines[0].x = paraNode.combineParagraph.leftMarginPixes;
|
|
74221
|
-
// paraNode.drawlines[0].y = paraNode.combineParagraph.topMarginPixes;
|
|
74222
73942
|
}
|
|
74223
73943
|
}
|
|
74224
73944
|
}
|
|
@@ -76749,23 +76469,7 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
76749
76469
|
bret = _get$call2[0],
|
|
76750
76470
|
aTop = _get$call2[1],
|
|
76751
76471
|
aRestHeight = _get$call2[2];
|
|
76752
|
-
// this._docHeight -= dTop;
|
|
76753
76472
|
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
76473
|
return [bret, aTop, aRestHeight];
|
|
76770
76474
|
}
|
|
76771
76475
|
}, {
|
|
@@ -77116,10 +76820,10 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
77116
76820
|
key: "paintCellAdress",
|
|
77117
76821
|
value: function paintCellAdress(visible) {
|
|
77118
76822
|
if (visible) {
|
|
77119
|
-
var _this$_cell$table$
|
|
77120
|
-
_this$_cell$table$
|
|
77121
|
-
row = _this$_cell$table$
|
|
77122
|
-
col = _this$_cell$table$
|
|
76823
|
+
var _this$_cell$table$get = this._cell.table.getCellInfos(this._cell),
|
|
76824
|
+
_this$_cell$table$get2 = (0,slicedToArray/* default */.Z)(_this$_cell$table$get, 2),
|
|
76825
|
+
row = _this$_cell$table$get2[0],
|
|
76826
|
+
col = _this$_cell$table$get2[1];
|
|
77123
76827
|
var strRow = this._cell.table.colToStr(col + 1).toUpperCase();
|
|
77124
76828
|
if (!this._fronAddress) {
|
|
77125
76829
|
this._fronAddress = new DrawSimpleText/* DrawSimpleText */.b("", "18px Arial", "#111");
|
|
@@ -77295,10 +76999,10 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
77295
76999
|
}, {
|
|
77296
77000
|
key: "calcCellHeight",
|
|
77297
77001
|
value: function calcCellHeight(restHeight) {
|
|
77298
|
-
var _this$_cell$table$
|
|
77299
|
-
_this$_cell$table$
|
|
77300
|
-
row = _this$_cell$table$
|
|
77301
|
-
c = _this$_cell$table$
|
|
77002
|
+
var _this$_cell$table$get3 = this._cell.table.getCellInfos(this._cell),
|
|
77003
|
+
_this$_cell$table$get4 = (0,slicedToArray/* default */.Z)(_this$_cell$table$get3, 2),
|
|
77004
|
+
row = _this$_cell$table$get4[0],
|
|
77005
|
+
c = _this$_cell$table$get4[1];
|
|
77302
77006
|
var ret = 0;
|
|
77303
77007
|
var hoeditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._cell.hoEditorFactoryID);
|
|
77304
77008
|
var dTopArr = new Array();
|
|
@@ -77463,7 +77167,6 @@ var DrawPageMarkNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
77463
77167
|
dPageMarkNodes.push(newMarkNode);
|
|
77464
77168
|
hoEditorFactory.drawPageTree.updateDrawPage(dPage.pageIndex);
|
|
77465
77169
|
}
|
|
77466
|
-
// dPage.drawDomLevel.stage.update();
|
|
77467
77170
|
} else {
|
|
77468
77171
|
var dArea = hoEditorFactory.drawPageTree.getMainRootArea(this);
|
|
77469
77172
|
if (!dArea) return;
|
|
@@ -77493,25 +77196,17 @@ var DrawPageMarkNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
77493
77196
|
var newMarkNode = DrawPageMarkNode.paintMarkNode(this._hoEditorFactoryID, this._node, dArea, _editor_SubDocManger__WEBPACK_IMPORTED_MODULE_18__/* .HeaderFooterType */ .pi.hftUnkown);
|
|
77494
77197
|
dArea.addChild(newMarkNode);
|
|
77495
77198
|
_HOEditorFactorys__WEBPACK_IMPORTED_MODULE_19__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID).drawPageTree.updateDrawPage(dArea.index);
|
|
77496
|
-
// dPage.drawDomLevel.stage.update();
|
|
77497
77199
|
dPageMarkNodes.push(newMarkNode);
|
|
77498
77200
|
}
|
|
77499
77201
|
}, {
|
|
77500
77202
|
key: "repaintPageMarkNodes",
|
|
77501
77203
|
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
77204
|
var aNode = this.node;
|
|
77509
77205
|
this.removePageMarkDrawNode(aNode, dArea);
|
|
77510
77206
|
var dPageMarkNode = DrawPageMarkNode.paintMarkNode(this._hoEditorFactoryID, aNode, dArea, type);
|
|
77511
77207
|
var dPageMarkNodes = this.node.drawPageMarkNodes;
|
|
77512
77208
|
dPageMarkNodes.push(dPageMarkNode);
|
|
77513
77209
|
dArea.addChild(dPageMarkNode);
|
|
77514
|
-
// }
|
|
77515
77210
|
}
|
|
77516
77211
|
}, {
|
|
77517
77212
|
key: "removePageMarkDrawNode",
|
|
@@ -78159,6 +77854,9 @@ var DrawPageTable = /*#__PURE__*/function (_DrawRect) {
|
|
|
78159
77854
|
if (pageRestHeight < _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_15__/* .gDefaultRowHeight */ .dT) {
|
|
78160
77855
|
break;
|
|
78161
77856
|
}
|
|
77857
|
+
if (pageRestHeight < this._table.drawTable.getRowStartLineMaxHeight(r)) {
|
|
77858
|
+
break;
|
|
77859
|
+
}
|
|
78162
77860
|
//开始行需要判断是否存在上一个未绘制完成的表格
|
|
78163
77861
|
if (r === this._startRow && index > 0 && !bStartRowFinished) {
|
|
78164
77862
|
rowRestHeight = Math.max(this._table.drawTable.getRowRestHeight(index - 1, this._startRow), _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_15__/* .gDefaultRowHeight */ .dT);
|
|
@@ -78240,7 +77938,7 @@ var DrawPageTable = /*#__PURE__*/function (_DrawRect) {
|
|
|
78240
77938
|
break;
|
|
78241
77939
|
}
|
|
78242
77940
|
}
|
|
78243
|
-
//如果某个单元格的合并多行,且当前页最后一行不是单元格的最后合并行,则需要绘制此单元格
|
|
77941
|
+
//如果某个单元格的合并多行,且当前页最后一行不是单元格的最后合并行,则需要绘制此单元格
|
|
78244
77942
|
this.paintLastLineMergeCrossCell(this._endRow, rowPaintHeight, tableRestHeight);
|
|
78245
77943
|
this._dHeight = totalHeight;
|
|
78246
77944
|
var y = this._dTop;
|
|
@@ -78794,6 +78492,10 @@ var DrawPageTable = /*#__PURE__*/function (_DrawRect) {
|
|
|
78794
78492
|
this.removeDrawCellAfterRow(r);
|
|
78795
78493
|
break;
|
|
78796
78494
|
}
|
|
78495
|
+
if (pageRestHeight < this._table.drawTable.getRowStartLineMaxHeight(r)) {
|
|
78496
|
+
this.removeDrawCellAfterRow(r);
|
|
78497
|
+
break;
|
|
78498
|
+
}
|
|
78797
78499
|
var rowFinished = true; //行是否绘制完成
|
|
78798
78500
|
var isEmptyRow = true; //是否绘制了一个单元格
|
|
78799
78501
|
for (var c = 0; c < this._table.colCount; c++) {
|
|
@@ -80755,12 +80457,6 @@ var DrawTable = /*#__PURE__*/function (_DrawRect) {
|
|
|
80755
80457
|
if (this._table.rowInfos[r].rowProperty.isSpecifyHeight) {
|
|
80756
80458
|
dHeight = rowPorpertyHeight;
|
|
80757
80459
|
}
|
|
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
80460
|
for (var c = 0; c < this._table.colCount; c++) {
|
|
80765
80461
|
var aCell = this._table.rows[r][c];
|
|
80766
80462
|
if (aCell && aCell.cellProperty.align == _editor_dom_TableProperty__WEBPACK_IMPORTED_MODULE_15__/* .VAlign */ .TR.vabottom) {
|
|
@@ -80768,13 +80464,6 @@ var DrawTable = /*#__PURE__*/function (_DrawRect) {
|
|
|
80768
80464
|
}
|
|
80769
80465
|
if (aCell && aCell.rowSpan === 1 && aCell.drawCell.dHeight > dHeight) {
|
|
80770
80466
|
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
80467
|
} else if (!aCell) {
|
|
80779
80468
|
var _this$_table$getMainC = this._table.getMainCell(r, c),
|
|
80780
80469
|
_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 +80471,6 @@ var DrawTable = /*#__PURE__*/function (_DrawRect) {
|
|
|
80782
80471
|
mr = _this$_table$getMainC2[1],
|
|
80783
80472
|
mc = _this$_table$getMainC2[2];
|
|
80784
80473
|
if (mr + mainCell.rowSpan - 1 === r && mc === c) {
|
|
80785
|
-
var cell = mainCell;
|
|
80786
80474
|
var aHeight = mainCell.drawCell.dHeight;
|
|
80787
80475
|
for (var row = r - 1; row >= mr; row--) {
|
|
80788
80476
|
aHeight -= this.table.rowInfos[row].rowHeight;
|
|
@@ -80793,36 +80481,22 @@ var DrawTable = /*#__PURE__*/function (_DrawRect) {
|
|
|
80793
80481
|
}
|
|
80794
80482
|
}
|
|
80795
80483
|
}
|
|
80796
|
-
//}
|
|
80797
80484
|
if (dHeight !== this._table.rowInfos[r].rowHeight) {
|
|
80798
|
-
//2023-09-04注释 该属性没用
|
|
80799
|
-
//if (!this._table.rowInfos[r].heightFixed) {
|
|
80800
80485
|
if (this._table.rowInfos[r].rowProperty.isSpecifyHeight) {
|
|
80801
|
-
if (dHeight > rowPorpertyHeight)
|
|
80802
|
-
|
|
80803
|
-
|
|
80486
|
+
if (dHeight > rowPorpertyHeight) {
|
|
80487
|
+
this._table.rowInfos[r].rowHeight = rowPorpertyHeight;
|
|
80488
|
+
} else {
|
|
80489
|
+
this._table.rowInfos[r].rowHeight = dHeight;
|
|
80490
|
+
}
|
|
80491
|
+
} else {
|
|
80492
|
+
this._table.rowInfos[r].rowHeight = dHeight;
|
|
80493
|
+
}
|
|
80804
80494
|
for (var _c = 0; _c < bottonAlignCell.length; _c++) {
|
|
80805
80495
|
if (bottonAlignCell[_c]) {
|
|
80806
80496
|
bottonAlignCell[_c].drawCell.needUpdate = true;
|
|
80807
80497
|
}
|
|
80808
80498
|
}
|
|
80809
80499
|
}
|
|
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
80500
|
return dHeight;
|
|
80827
80501
|
}
|
|
80828
80502
|
}, {
|
|
@@ -80879,7 +80553,7 @@ var DrawTable = /*#__PURE__*/function (_DrawRect) {
|
|
|
80879
80553
|
// let dHeight = 0;
|
|
80880
80554
|
// let dWidth = 0;
|
|
80881
80555
|
if (this._drawPageTables.length === 0) {
|
|
80882
|
-
throw new Error(
|
|
80556
|
+
throw new Error('需要先绘制表格后才能更新表格位置');
|
|
80883
80557
|
}
|
|
80884
80558
|
var index = -1;
|
|
80885
80559
|
if (prevdPageTable) index = this.drawPageTables.indexOf(prevdPageTable);
|
|
@@ -81417,6 +81091,67 @@ var DrawTable = /*#__PURE__*/function (_DrawRect) {
|
|
|
81417
81091
|
get: function get() {
|
|
81418
81092
|
return this._dHeight;
|
|
81419
81093
|
}
|
|
81094
|
+
/**
|
|
81095
|
+
*
|
|
81096
|
+
* @param r
|
|
81097
|
+
* @returns 获取指定行r中所有列中第一行的最大行高
|
|
81098
|
+
*/
|
|
81099
|
+
}, {
|
|
81100
|
+
key: "getRowStartLineMaxHeight",
|
|
81101
|
+
value: function getRowStartLineMaxHeight(r) {
|
|
81102
|
+
var startRow = -1;
|
|
81103
|
+
var endRow = -1;
|
|
81104
|
+
var inSameRow = true;
|
|
81105
|
+
//判断所有行的起始行是否一样 并且结束行也是否一样
|
|
81106
|
+
for (var c = 0; c < this._table.colCount; c++) {
|
|
81107
|
+
var _this$_table$getMainC5 = this._table.getMainCell(r, c),
|
|
81108
|
+
_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),
|
|
81109
|
+
cell = _this$_table$getMainC6[0],
|
|
81110
|
+
mr = _this$_table$getMainC6[1],
|
|
81111
|
+
mc = _this$_table$getMainC6[2];
|
|
81112
|
+
if (startRow == -1) {
|
|
81113
|
+
startRow = mr;
|
|
81114
|
+
}
|
|
81115
|
+
if (endRow == -1) {
|
|
81116
|
+
endRow = mr + cell.rowSpan - 1;
|
|
81117
|
+
}
|
|
81118
|
+
if (mr != startRow || endRow != mr + cell.rowSpan - 1) {
|
|
81119
|
+
inSameRow = false;
|
|
81120
|
+
return _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_17__/* .gDefaultRowHeight */ .dT;
|
|
81121
|
+
}
|
|
81122
|
+
}
|
|
81123
|
+
var maxRowHeight = 0;
|
|
81124
|
+
for (var _c2 = 0; _c2 < this._table.colCount; _c2++) {
|
|
81125
|
+
var _this$_table$getMainC7 = this._table.getMainCell(r, _c2),
|
|
81126
|
+
_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),
|
|
81127
|
+
_cell = _this$_table$getMainC8[0],
|
|
81128
|
+
_mr = _this$_table$getMainC8[1],
|
|
81129
|
+
_mc = _this$_table$getMainC8[2];
|
|
81130
|
+
if (_cell && _mc === _c2) {
|
|
81131
|
+
var aHeight = _cell.drawCell.drawLines[0].dHeight;
|
|
81132
|
+
if (aHeight > maxRowHeight) {
|
|
81133
|
+
maxRowHeight = aHeight;
|
|
81134
|
+
}
|
|
81135
|
+
}
|
|
81136
|
+
}
|
|
81137
|
+
return maxRowHeight;
|
|
81138
|
+
}
|
|
81139
|
+
}, {
|
|
81140
|
+
key: "isFirstRowCanFit",
|
|
81141
|
+
value: function isFirstRowCanFit(restHeight) {
|
|
81142
|
+
var _this$table$getHeadRo = this.table.getHeadRowCountHeight(),
|
|
81143
|
+
_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),
|
|
81144
|
+
headCount = _this$table$getHeadRo2[0],
|
|
81145
|
+
headHeight = _this$table$getHeadRo2[1];
|
|
81146
|
+
var startRow = headCount;
|
|
81147
|
+
if (headCount < 0) {
|
|
81148
|
+
startRow = 0;
|
|
81149
|
+
}
|
|
81150
|
+
if (this.table.rowCount > headCount && headHeight + this.getRowStartLineMaxHeight(startRow) > restHeight) {
|
|
81151
|
+
return false;
|
|
81152
|
+
}
|
|
81153
|
+
return true;
|
|
81154
|
+
}
|
|
81420
81155
|
}]);
|
|
81421
81156
|
return DrawTable;
|
|
81422
81157
|
}(_DrawRect__WEBPACK_IMPORTED_MODULE_21__/* .DrawRect */ .t);
|
|
@@ -85162,12 +84897,9 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85162
84897
|
}, {
|
|
85163
84898
|
key: "onTick",
|
|
85164
84899
|
value: function onTick(e) {
|
|
85165
|
-
// if(!(e as any).paused) {
|
|
85166
|
-
// console.log("Paused:", (e as any).paused, (e as any).delta);
|
|
85167
84900
|
if (this._activePage && this._activePage.drawSelectLevel && this._activePage.drawSelectLevel.stage) {
|
|
85168
84901
|
this._activePage.drawSelectLevel.stage.update(e);
|
|
85169
84902
|
}
|
|
85170
|
-
// }
|
|
85171
84903
|
}
|
|
85172
84904
|
}, {
|
|
85173
84905
|
key: "deleteDLines",
|
|
@@ -85427,11 +85159,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85427
85159
|
var paraNode = dline.paragraphNode;
|
|
85428
85160
|
var node = startNode;
|
|
85429
85161
|
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
85162
|
var hoeditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
85436
85163
|
var paraInfos = hoeditorFactory.docTree.getPathParagraphLastPath(endPath);
|
|
85437
85164
|
var endParaNode = paraInfos[0];
|
|
@@ -85461,14 +85188,12 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85461
85188
|
}
|
|
85462
85189
|
dline = node.drawlines[0];
|
|
85463
85190
|
paraNode = node;
|
|
85464
|
-
// inLineIndex = -1;
|
|
85465
85191
|
if (node === npEnd.node) {
|
|
85466
85192
|
break;
|
|
85467
85193
|
}
|
|
85468
85194
|
} else if (node instanceof TableNode/* TableNode */.Fh) {
|
|
85469
85195
|
node.placeDNodeAfterDrawLine(paraNode, dline, aEndPath);
|
|
85470
85196
|
dline = node.drawTable;
|
|
85471
|
-
// inLineIndex = 0;
|
|
85472
85197
|
} else {
|
|
85473
85198
|
//放置时不包含第一个节点
|
|
85474
85199
|
if (dline instanceof DrawTable/* DrawTable */.t) {
|
|
@@ -85484,11 +85209,7 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85484
85209
|
if (NodePosition/* NodePosition */.F.treePathCompare(aEndPath, hoeditorFactory.docTree.getNodeLastPath(node)) <= 0) {
|
|
85485
85210
|
break;
|
|
85486
85211
|
}
|
|
85487
|
-
// if (node === npEnd.node) {
|
|
85488
|
-
// break;
|
|
85489
|
-
// }
|
|
85490
85212
|
}
|
|
85491
|
-
|
|
85492
85213
|
var nextNode = node.nextSibling();
|
|
85493
85214
|
if (!nextNode) {
|
|
85494
85215
|
if (node instanceof MarkNode/* MarkNode */.j) {
|
|
@@ -85499,10 +85220,7 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85499
85220
|
}
|
|
85500
85221
|
node = nextNode;
|
|
85501
85222
|
startChildIndex = 0;
|
|
85502
|
-
// dline = paraNode.getLastDrawline();
|
|
85503
|
-
// dline = dline.paragraphNode.getLastDrawline();
|
|
85504
85223
|
}
|
|
85505
|
-
|
|
85506
85224
|
if (dline instanceof DrawLine/* DrawLine */.a) {
|
|
85507
85225
|
dline.fitLines();
|
|
85508
85226
|
dline.paragraphNode.updateDrawLineStyle();
|
|
@@ -85521,7 +85239,8 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85521
85239
|
var aParagraph = paragraph;
|
|
85522
85240
|
while (aParagraph) {
|
|
85523
85241
|
//如paragraph在表格内更新表格高度
|
|
85524
|
-
var
|
|
85242
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
85243
|
+
var area = hoEditorFactory.docTree.getParentRectNode(aParagraph);
|
|
85525
85244
|
if (area && area instanceof CellNode/* CellNode */.D) {
|
|
85526
85245
|
aParagraph = this.updateDrawAreaHeight(area);
|
|
85527
85246
|
if (aParagraph) {
|
|
@@ -85541,10 +85260,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85541
85260
|
var canChangeHeight = true;
|
|
85542
85261
|
var aCell = area;
|
|
85543
85262
|
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
85263
|
var _aCell$table$getCellI = aCell.table.getCellInfos(aCell),
|
|
85549
85264
|
_aCell$table$getCellI2 = (0,slicedToArray/* default */.Z)(_aCell$table$getCellI, 2),
|
|
85550
85265
|
r = _aCell$table$getCellI2[0],
|
|
@@ -85576,11 +85291,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85576
85291
|
var aEndPath = endPath;
|
|
85577
85292
|
var tables = new Array();
|
|
85578
85293
|
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
85294
|
var paraInfos = hoEditorFactory.docTree.getPathParagraphLastPath(endPath);
|
|
85585
85295
|
var endParaNode = paraInfos[0];
|
|
85586
85296
|
var paraEndPath = paraInfos[1];
|
|
@@ -85643,35 +85353,16 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85643
85353
|
}
|
|
85644
85354
|
}
|
|
85645
85355
|
}
|
|
85646
|
-
if (NodePosition/* NodePosition */.F.treePathCompare(aEndPath, hoEditorFactory.docTree.getNodeLastPath(node)) <= 0)
|
|
85647
|
-
|
|
85648
|
-
|
|
85649
|
-
// }
|
|
85356
|
+
if (NodePosition/* NodePosition */.F.treePathCompare(aEndPath, hoEditorFactory.docTree.getNodeLastPath(node)) <= 0) {
|
|
85357
|
+
break;
|
|
85358
|
+
}
|
|
85650
85359
|
}
|
|
85651
|
-
// dline = paraNode.getLastDrawline();
|
|
85652
|
-
// dline = dline.paragraphNode.getLastDrawline();
|
|
85653
85360
|
}
|
|
85654
|
-
|
|
85655
85361
|
if (dline instanceof DrawLine/* DrawLine */.a) {
|
|
85656
85362
|
dline.fitLines();
|
|
85657
85363
|
dline.paragraphNode.updateDrawLineStyle();
|
|
85658
85364
|
}
|
|
85659
85365
|
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
85366
|
endParaNode.dTop = this.getParagraphStartTop(endParaNode);
|
|
85676
85367
|
endParaNode.updateDrawInfos();
|
|
85677
85368
|
var lastParagraph = this.updateDrawAreaPos(endParaNode);
|
|
@@ -85695,19 +85386,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85695
85386
|
aline.parent.removeChild(aline);
|
|
85696
85387
|
}
|
|
85697
85388
|
}
|
|
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
85389
|
if (dline instanceof DrawLine/* DrawLine */.a) {
|
|
85712
85390
|
var paragraphNode = this.clearDrawParagraphAfterDline(dline.paragraphNode, dline, istartLineIndex, beforeChangePath);
|
|
85713
85391
|
if (dline.drawItems[istartLineIndex] instanceof DrawTextNode/* DrawTextNode */.v) {
|
|
@@ -85719,52 +85397,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85719
85397
|
var lastParagraph = this.updateDrawAreaPos(dline.paragraphNode);
|
|
85720
85398
|
this.updateDrawTreeHeight(lastParagraph);
|
|
85721
85399
|
}
|
|
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
85400
|
/**
|
|
85769
85401
|
* @author xyl
|
|
85770
85402
|
* @param path 绘制路径
|
|
@@ -85884,12 +85516,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85884
85516
|
value: function onDocChanged(e) {
|
|
85885
85517
|
//查找绘制前的绘制节点
|
|
85886
85518
|
//绘制结束位置
|
|
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
85519
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
85894
85520
|
try {
|
|
85895
85521
|
//console.time("文档change事件");
|
|
@@ -85911,9 +85537,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85911
85537
|
if (startDrawPage) {
|
|
85912
85538
|
startPageNo = startDrawPage.pageIndex;
|
|
85913
85539
|
}
|
|
85914
|
-
// const dlines = nextDrawLineInfos[0];
|
|
85915
|
-
// const dline = nextDrawLineInfos[1];
|
|
85916
|
-
// const inLineIndex = nextDrawLineInfos[2];
|
|
85917
85540
|
var nextDrawNodeInfos = this.getNextDrawNode(e.beforeChangePath);
|
|
85918
85541
|
var node = nextDrawNodeInfos[0];
|
|
85919
85542
|
var startChildIndex = nextDrawNodeInfos[1];
|
|
@@ -85947,11 +85570,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85947
85570
|
// inLineIndex,
|
|
85948
85571
|
node, startChildIndex + 1, e.afterChangePath);
|
|
85949
85572
|
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
85573
|
if (e.repaintImmediate) {
|
|
85956
85574
|
if (!dArea) {
|
|
85957
85575
|
return false;
|
|
@@ -85964,21 +85582,7 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85964
85582
|
if (dCell) {
|
|
85965
85583
|
this.updateDrawFormular(dCell.cell);
|
|
85966
85584
|
}
|
|
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
85585
|
}
|
|
85981
|
-
// }
|
|
85982
85586
|
} else if (e.action === DocTree/* DocAction */.gk.daModifyStyle) {
|
|
85983
85587
|
if (e.oldDrawLines.length <= 0) {
|
|
85984
85588
|
return false;
|
|
@@ -85998,8 +85602,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
85998
85602
|
e.beforeChangePath, e.afterChangePath, e.needUpdateParaStyle);
|
|
85999
85603
|
if (e.repaintImmediate) {
|
|
86000
85604
|
dline = e.redrawStartPositon.drawRoots[e.redrawStartPositon.index];
|
|
86001
|
-
// dendDrawLine =
|
|
86002
|
-
// e.redrawStartPositon.drawRoots[e.redrawStartPositon.index];
|
|
86003
85605
|
var _mainArea = hoEditorFactory.drawPageTree.getMainRootArea(startUpdateLine);
|
|
86004
85606
|
if (!_mainArea) return false;
|
|
86005
85607
|
_mainArea.changed = true;
|
|
@@ -86008,19 +85610,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86008
85610
|
drawTop = 0;
|
|
86009
85611
|
}
|
|
86010
85612
|
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
85613
|
}
|
|
86025
85614
|
} else if (e.action === DocTree/* DocAction */.gk.daParaStyleChange) {
|
|
86026
85615
|
if (e.oldDrawLines.length <= 0) {
|
|
@@ -86066,21 +85655,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86066
85655
|
}
|
|
86067
85656
|
var startDeleteLine = e.oldDrawTreeLines[0] instanceof DrawTable/* DrawTable */.t ? e.oldDrawTreeLines[0].drawPageTables[0] : e.oldDrawTreeLines[0];
|
|
86068
85657
|
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
85658
|
var _tables = this.deleteDLines(e.oldDrawTreeLines, iStartLineIndex, iendLineIndex);
|
|
86085
85659
|
if (iStartLineIndex !== 0) {
|
|
86086
85660
|
paragraphNode = this.clearDrawParagraphAfterDline(dline.paragraphNode, dline, inLineIndex, e.beforeChangePath);
|
|
@@ -86088,24 +85662,11 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86088
85662
|
startChildIndex = -1;
|
|
86089
85663
|
}
|
|
86090
85664
|
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
85665
|
//后续行未删除部分,添加到当前行的尾部
|
|
86102
85666
|
if (node && !(node instanceof ParagraphNode/* ParagraphNode */.C)) {
|
|
86103
|
-
var endLine = this.drawDocInsert(paragraphNode, lineIndex,
|
|
86104
|
-
// inLineIndex,
|
|
86105
|
-
node, startChildIndex + 1, e.afterChangePath);
|
|
85667
|
+
var endLine = this.drawDocInsert(paragraphNode, lineIndex, node, startChildIndex + 1, e.afterChangePath);
|
|
86106
85668
|
if (endLine instanceof DrawLine/* DrawLine */.a) endLine.fitLines();
|
|
86107
85669
|
}
|
|
86108
|
-
// }
|
|
86109
85670
|
paragraphNode.updateDrawLineStyle();
|
|
86110
85671
|
paragraphNode.updateDrawInfos();
|
|
86111
85672
|
this.updateDrawAreaPos(paragraphNode);
|
|
@@ -86121,10 +85682,7 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86121
85682
|
}
|
|
86122
85683
|
if (e.repaintImmediate) {
|
|
86123
85684
|
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) {
|
|
85685
|
+
if (dline.parent) _mainArea3 = hoEditorFactory.drawPageTree.getMainRootArea(startUpdateLine);else if (dArea) {
|
|
86128
85686
|
_mainArea3 = hoEditorFactory.drawPageTree.getMainRootArea(dArea);
|
|
86129
85687
|
}
|
|
86130
85688
|
if (_mainArea3) {
|
|
@@ -86139,13 +85697,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86139
85697
|
this.updateDrawFormular(dCell.cell);
|
|
86140
85698
|
}
|
|
86141
85699
|
}
|
|
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
85700
|
} else if (e.action === DocTree/* DocAction */.gk.daInsertParagraphBeforeTab) {
|
|
86150
85701
|
if (dCell) {
|
|
86151
85702
|
dCell.needUpdate = true;
|
|
@@ -86246,9 +85797,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86246
85797
|
//toDo 需要修改所有区域的高度
|
|
86247
85798
|
var lastParagraph = this.updateDrawAreaPos(paragraphNode);
|
|
86248
85799
|
this.updateDrawTreeHeight(lastParagraph);
|
|
86249
|
-
var _endIndex = 0;
|
|
86250
|
-
// if (paragraphNode.parentNode === null) {
|
|
86251
|
-
// const darea = this.getDrawA(dline);
|
|
86252
85800
|
if (e.repaintImmediate) {
|
|
86253
85801
|
if (!dArea) {
|
|
86254
85802
|
return false;
|
|
@@ -86278,9 +85826,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86278
85826
|
//toDo 需要修改所有区域的高度
|
|
86279
85827
|
var _lastParagraph = this.updateDrawAreaPos(paragraphNode);
|
|
86280
85828
|
this.updateDrawTreeHeight(_lastParagraph);
|
|
86281
|
-
var _endIndex2 = 0;
|
|
86282
|
-
// if (paragraphNode.parentNode === null) {
|
|
86283
|
-
// const darea = this.getDrawA(dline);
|
|
86284
85829
|
if (e.repaintImmediate) {
|
|
86285
85830
|
if (!dArea) {
|
|
86286
85831
|
return false;
|
|
@@ -86293,67 +85838,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86293
85838
|
}
|
|
86294
85839
|
}
|
|
86295
85840
|
}
|
|
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
85841
|
} finally {
|
|
86358
85842
|
this._inChanging = false;
|
|
86359
85843
|
}
|
|
@@ -86373,7 +85857,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86373
85857
|
}
|
|
86374
85858
|
}
|
|
86375
85859
|
}
|
|
86376
|
-
//console.timeEnd("文档change事件");
|
|
86377
85860
|
return true;
|
|
86378
85861
|
}
|
|
86379
85862
|
}, {
|
|
@@ -86381,290 +85864,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86381
85864
|
value: function onDocChanging(e) {
|
|
86382
85865
|
return true;
|
|
86383
85866
|
}
|
|
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
85867
|
}, {
|
|
86669
85868
|
key: "onSelectChanged",
|
|
86670
85869
|
value: function onSelectChanged(e) {
|
|
@@ -86672,31 +85871,14 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86672
85871
|
if (e.newRange.startPath === "" || e.newRange.endPath === "") {
|
|
86673
85872
|
return false;
|
|
86674
85873
|
}
|
|
86675
|
-
// if (this._inChanging) {
|
|
86676
|
-
// setTimeout(() => {
|
|
86677
|
-
// this.onSelectChanged(e);
|
|
86678
|
-
// }, 200);
|
|
86679
|
-
// }
|
|
86680
|
-
var startNP = hoEditorFactory.docTree.findNodePositionByPath(e.newRange.startPath);
|
|
86681
85874
|
var endNp = hoEditorFactory.docTree.findNodePositionByPath(e.newRange.endPath);
|
|
86682
85875
|
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
85876
|
var pEndPoint;
|
|
86689
85877
|
if (e.newRange.endPath === e.newRange.startPath) {
|
|
86690
85878
|
pEndPoint = pStartPoint;
|
|
86691
85879
|
} else {
|
|
86692
85880
|
pEndPoint = StagePosition/* StagePosition */.M.getStagePosByPath(this._hoEditorFactoryID, e.newRange.endPath);
|
|
86693
85881
|
}
|
|
86694
|
-
// if (pStartPoint.dline instanceof DrawLine && !pEndPoint.dline.stage) {
|
|
86695
|
-
// setTimeout(() => {
|
|
86696
|
-
// this.onSelectChanged(e);
|
|
86697
|
-
// }, 200);
|
|
86698
|
-
// }
|
|
86699
|
-
//this._selectRange.clearAllSelectShape;
|
|
86700
85882
|
this._selectRange.spStart = pStartPoint;
|
|
86701
85883
|
this._selectRange.spEnd = pEndPoint;
|
|
86702
85884
|
this.drawSelectRange();
|
|
@@ -86910,38 +86092,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86910
86092
|
}
|
|
86911
86093
|
return [droots, path];
|
|
86912
86094
|
}
|
|
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
86095
|
/**
|
|
86946
86096
|
* @author xyl
|
|
86947
86097
|
* @param dPage 绘制页
|
|
@@ -86981,12 +86131,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
86981
86131
|
if (lineIndex === 0) {
|
|
86982
86132
|
selectStart = dLine.paragraphNode.getNodePath();
|
|
86983
86133
|
} else {
|
|
86984
|
-
//取上一行的最后一个绘制点
|
|
86985
|
-
// console.log("line", lineIndex);
|
|
86986
|
-
// console.log(
|
|
86987
|
-
// "length",
|
|
86988
|
-
// dLine.paragraphNode.drawlines[lineIndex - 1].drawItems.length
|
|
86989
|
-
// );
|
|
86990
86134
|
var dNode = dLine.paragraphNode.drawlines[lineIndex - 1].drawItems[dLine.paragraphNode.drawlines[lineIndex - 1].drawItems.length - 1];
|
|
86991
86135
|
if ((0,IDrawInfos/* instanceOfIDrawInfos */.r)(dNode)) {
|
|
86992
86136
|
var node = dNode.node;
|
|
@@ -87036,16 +86180,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87036
86180
|
dPage = hoEditorFactory.drawPageTree.getDrawPageByDNode(dPageTable);
|
|
87037
86181
|
}
|
|
87038
86182
|
}
|
|
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
86183
|
var dline = this.getDrawLineByDNode(dNode);
|
|
87050
86184
|
dPage = hoEditorFactory.drawPageTree.getDrawPageByDNode(dline);
|
|
87051
86185
|
if (strPath.startsWith(DocTree/* gHeaderPath */.Yh) || strPath.startsWith(DocTree/* gFooterPath */.LE)) {
|
|
@@ -87091,7 +86225,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87091
86225
|
} else {
|
|
87092
86226
|
this._caretTimeOutCount += 1;
|
|
87093
86227
|
if (this._caretTimeOutCount > 5) {
|
|
87094
|
-
// this.rebuildAllDrawLine();
|
|
87095
86228
|
this._caretTimeOutCount = 0;
|
|
87096
86229
|
return;
|
|
87097
86230
|
} else setTimeout(function () {
|
|
@@ -87130,13 +86263,11 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87130
86263
|
}, {
|
|
87131
86264
|
key: "moveCaretToDitem",
|
|
87132
86265
|
value: function moveCaretToDitem(dPage, dLine, index) {
|
|
87133
|
-
// this._caret.visible = true;
|
|
87134
86266
|
var dParent = dLine.parent;
|
|
87135
86267
|
while (dParent && !(dParent instanceof DrawArea/* DrawArea */.l)) {
|
|
87136
86268
|
dParent = dParent.parent;
|
|
87137
86269
|
}
|
|
87138
86270
|
if (!dParent || !(dParent instanceof DrawArea/* DrawArea */.l)) {
|
|
87139
|
-
// throw new Error(`错误的光标位置`);
|
|
87140
86271
|
return;
|
|
87141
86272
|
}
|
|
87142
86273
|
var dPlace = dParent;
|
|
@@ -87155,7 +86286,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87155
86286
|
dest.x += dLine.dWidth / 2;
|
|
87156
86287
|
}
|
|
87157
86288
|
}
|
|
87158
|
-
//this._caret.dLine = dLine;
|
|
87159
86289
|
this._caret.height = dLine.dHeight + dLine.paragraphNode.combineParagraph.lineSpace;
|
|
87160
86290
|
// 只读模式
|
|
87161
86291
|
if (this._paintStatus !== PaintState.psReadOnly) {
|
|
@@ -87180,18 +86310,7 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87180
86310
|
}
|
|
87181
86311
|
}
|
|
87182
86312
|
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
86313
|
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
86314
|
if (this._paintStatus !== PaintState.psReadOnly) {
|
|
87196
86315
|
if (dNode instanceof DrawSignNode/* DrawSignNode */.V) {
|
|
87197
86316
|
this._caret.setStagePosition(_dest.x - dNode.dWidth, _dest.y);
|
|
@@ -87311,38 +86430,9 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87311
86430
|
}, {
|
|
87312
86431
|
key: "clearAllPage",
|
|
87313
86432
|
value: function clearAllPage() {
|
|
87314
|
-
// this._activePage = null;
|
|
87315
86433
|
for (var i = 0; i < this._drawPages.length; i++) {
|
|
87316
86434
|
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
86435
|
}
|
|
87345
|
-
|
|
87346
86436
|
this._drawPages.length = 0;
|
|
87347
86437
|
}
|
|
87348
86438
|
// 清理绘制树
|
|
@@ -87427,27 +86517,10 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87427
86517
|
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee$(_context) {
|
|
87428
86518
|
while (1) switch (_context.prev = _context.next) {
|
|
87429
86519
|
case 0:
|
|
87430
|
-
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
87431
|
-
// if (!dlines) {
|
|
87432
|
-
// console.log("无法根据文档路径找到绘制树:" + strPath);
|
|
87433
|
-
// return;
|
|
87434
|
-
// }
|
|
86520
|
+
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
87435
86521
|
pageIndex = 0;
|
|
87436
86522
|
this.clearDrawContainer(dlines);
|
|
87437
86523
|
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
86524
|
dcChangeEvent = new NodeChangeEvent/* NodeChangeEvent */.G(this._hoEditorFactoryID, DocTree/* DocAction */.gk.daInsert, nodes[0].getNodePath(),
|
|
87452
86525
|
//"main/0",
|
|
87453
86526
|
hoEditorFactory.docTree.getNodeLastPath(nodes[nodes.length - 1]));
|
|
@@ -87463,15 +86536,7 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87463
86536
|
return _buildDrawTree.apply(this, arguments);
|
|
87464
86537
|
}
|
|
87465
86538
|
return buildDrawTree;
|
|
87466
|
-
}()
|
|
87467
|
-
// return;
|
|
87468
|
-
// }
|
|
87469
|
-
// public updateByRange() {
|
|
87470
|
-
// return;
|
|
87471
|
-
// }
|
|
87472
|
-
// public updateDrawtreeRange(range: DomRange): void {
|
|
87473
|
-
// return;
|
|
87474
|
-
// }
|
|
86539
|
+
}()
|
|
87475
86540
|
/**
|
|
87476
86541
|
* @author xyl
|
|
87477
86542
|
* @param nodePath 树节点路径
|
|
@@ -87510,10 +86575,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87510
86575
|
value: function getDNodeByPath(strPath) {
|
|
87511
86576
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
87512
86577
|
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
86578
|
if (np && np.node) {
|
|
87518
86579
|
if (np.childIndex >= 0) {
|
|
87519
86580
|
if (np.node instanceof TextNode/* TextNode */.R) {
|
|
@@ -87577,78 +86638,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87577
86638
|
}
|
|
87578
86639
|
return ret;
|
|
87579
86640
|
}
|
|
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
86641
|
//激活页
|
|
87653
86642
|
}, {
|
|
87654
86643
|
key: "getLevel",
|
|
@@ -87664,27 +86653,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87664
86653
|
} while (pnode !== null);
|
|
87665
86654
|
return iret;
|
|
87666
86655
|
}
|
|
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
86656
|
}, {
|
|
87689
86657
|
key: "getDrawLineByDNode",
|
|
87690
86658
|
value: function getDrawLineByDNode(dNode) {
|
|
@@ -87701,7 +86669,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87701
86669
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
87702
86670
|
var dLine = hoEditorFactory.docTree.getNodeParaNode(dNode.node).getLastDrawline();
|
|
87703
86671
|
return dLine;
|
|
87704
|
-
// throw new Error(`未找到路径${((dNode as unknown) as DrawInfos).node.getNodePath()}的绘制行`)
|
|
87705
86672
|
}
|
|
87706
86673
|
/**
|
|
87707
86674
|
* @author xyl
|
|
@@ -87732,27 +86699,7 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87732
86699
|
var hoeditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
87733
86700
|
var prevPara = hoeditorFactory.docTree.getSameRectPrevParanode(paraNode);
|
|
87734
86701
|
var dTop = 0;
|
|
87735
|
-
// const pNode = paraNode.parentNode;
|
|
87736
86702
|
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
86703
|
dTop = paraNode.combineParagraph.topMarginPixes;
|
|
87757
86704
|
}
|
|
87758
86705
|
//存在上一个同区域段落节点
|
|
@@ -87790,9 +86737,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87790
86737
|
} else {
|
|
87791
86738
|
//页的起始段茖
|
|
87792
86739
|
var dpageIndex = pageNo;
|
|
87793
|
-
// if (!paraNode.rootPath.startsWith(gMainPath) && this._activePage) {
|
|
87794
|
-
// dpageIndex = this._activePage.pageIndex;
|
|
87795
|
-
// }
|
|
87796
86740
|
return new PagePaintPosition/* PagePaintPosition */.O(this._hoEditorFactoryID, dpageIndex, paraNode.combineParagraph.leftMarginPixes, paraNode.combineParagraph.topMarginPixes);
|
|
87797
86741
|
}
|
|
87798
86742
|
} else {
|
|
@@ -87830,8 +86774,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87830
86774
|
key: "addPage",
|
|
87831
86775
|
value: function addPage() {
|
|
87832
86776
|
var dpage = new DrawPage(this._hoEditorFactoryID, this._drawPages.length //,
|
|
87833
|
-
//HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree,
|
|
87834
|
-
//this
|
|
87835
86777
|
);
|
|
87836
86778
|
|
|
87837
86779
|
this._drawPages.push(dpage);
|
|
@@ -87851,14 +86793,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87851
86793
|
//将拉置排序
|
|
87852
86794
|
var aRange = this._selectRange.normalize();
|
|
87853
86795
|
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
86796
|
aRange.clearAllSelectShape();
|
|
87863
86797
|
if (aRange.spStart.path.indexOf('-') > 0 || aRange.spEnd.path.indexOf('-') > 0) {
|
|
87864
86798
|
return;
|
|
@@ -87871,22 +86805,14 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87871
86805
|
return;
|
|
87872
86806
|
}
|
|
87873
86807
|
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
86808
|
var bInSameRect = NodePosition/* NodePosition */.F.pathInSameRect(this._hoEditorFactoryID, aRange.spStart.path, aRange.spEnd.path);
|
|
87880
86809
|
//选区变化后,删除不在选区内的绘制块内容
|
|
87881
|
-
// const shapeMap = aRange.clearNotInRangeShape(aRange, istart, iend);
|
|
87882
86810
|
var dPage = aRange.spStart.page;
|
|
87883
86811
|
var dStartDline = aRange.spStart.dline;
|
|
87884
86812
|
var istart = 0;
|
|
87885
|
-
if (dStartDline instanceof DrawLine/* DrawLine */.a)
|
|
87886
|
-
|
|
87887
|
-
|
|
87888
|
-
// DrawLine | DrawTable
|
|
87889
|
-
// >();
|
|
86813
|
+
if (dStartDline instanceof DrawLine/* DrawLine */.a) {
|
|
86814
|
+
istart = arrDrawDlines.indexOf(dStartDline);
|
|
86815
|
+
}
|
|
87890
86816
|
for (var i = istart; i < arrDrawDlines.length; i++) {
|
|
87891
86817
|
var left = 0;
|
|
87892
86818
|
var dnextDline = arrDrawDlines[i];
|
|
@@ -87895,7 +86821,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87895
86821
|
}
|
|
87896
86822
|
var right = 1 + dnextDline.paragraphNode.combineParagraph.charSpace;
|
|
87897
86823
|
dPage = hoeditorfacotry.drawPageTree.getDrawPageByDNode(dnextDline);
|
|
87898
|
-
// const idItemStart = nextRoots.indexOf(dnextDline);
|
|
87899
86824
|
//处理开始行的部分选中
|
|
87900
86825
|
if (dnextDline === aRange.spStart.dline && aRange.spStart.index >= 0) {
|
|
87901
86826
|
var ditem = dnextDline.drawItems[aRange.spStart.index];
|
|
@@ -87907,7 +86832,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87907
86832
|
left = ditem.x + ditem.dWidth + dnextDline.charSpace;
|
|
87908
86833
|
}
|
|
87909
86834
|
}
|
|
87910
|
-
// if (!dPage) dPage = this.getDrawPageByDomStage(dnextDline.stage);
|
|
87911
86835
|
//处理结束行的部分选中
|
|
87912
86836
|
if (dnextDline === aRange.spEnd.dline) {
|
|
87913
86837
|
if (aRange.spEnd.index >= 0) {
|
|
@@ -87928,16 +86852,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87928
86852
|
right = _ditem2.x + _ditem2.dWidth + dnextDline.charSpace;
|
|
87929
86853
|
}
|
|
87930
86854
|
}
|
|
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
86855
|
if (dPage && dPage.selectContainer) {
|
|
87942
86856
|
var shape = new DrawSelect(this._hoEditorFactoryID, dPage.pageIndex, dnextDline, left, right, bInSameRect, aRange.spStart.dline.paragraphNode.parentNode, aRange.spEnd.dline.paragraphNode.parentNode, "blue");
|
|
87943
86857
|
shape.name = "select";
|
|
@@ -87948,27 +86862,12 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
87948
86862
|
}
|
|
87949
86863
|
this.selectRange.addSelectShape(shape);
|
|
87950
86864
|
}
|
|
87951
|
-
// }
|
|
87952
|
-
// if (dnextDline === aRange.spEnd.dline) {
|
|
87953
|
-
// break;
|
|
87954
|
-
// }
|
|
87955
|
-
// const oldDline: DrawLine | DrawTable = dnextDline;
|
|
87956
86865
|
}
|
|
87957
|
-
|
|
87958
86866
|
for (var j = dPages.length - 1; j >= 0; j--) {
|
|
87959
86867
|
var aPage = dPages[j];
|
|
87960
86868
|
if (aPage && aPage.drawSelectLevel && aPage.drawSelectLevel.stage) aPage.drawSelectLevel.stage.update();
|
|
87961
86869
|
}
|
|
87962
86870
|
}
|
|
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
86871
|
}
|
|
87973
86872
|
}, {
|
|
87974
86873
|
key: "drawMultiCustomRange",
|
|
@@ -88026,7 +86925,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88026
86925
|
left = ditem.x + ditem.dWidth + dnextDline.charSpace;
|
|
88027
86926
|
}
|
|
88028
86927
|
}
|
|
88029
|
-
// if (!dPage) dPage = this.getDrawPageByDomStage(dnextDline.stage);
|
|
88030
86928
|
//处理结束行的部分选中
|
|
88031
86929
|
if (dnextDline === aRange.spEnd.dline) {
|
|
88032
86930
|
if (aRange.spEnd.index >= 0) {
|
|
@@ -88050,8 +86948,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88050
86948
|
var color = hoeditorfacotry.option.getColorByLevel(15);
|
|
88051
86949
|
if (dPage && dPage.selectContainer) {
|
|
88052
86950
|
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
86951
|
dPage.selectContainer.addChild(shape);
|
|
88056
86952
|
if (dPages.indexOf(dPage) < 0) {
|
|
88057
86953
|
dPages.push(dPage);
|
|
@@ -88065,15 +86961,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88065
86961
|
if (aPage && aPage.drawSelectLevel && aPage.drawSelectLevel.stage) aPage.drawSelectLevel.stage.update();
|
|
88066
86962
|
}
|
|
88067
86963
|
}
|
|
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
86964
|
}
|
|
88078
86965
|
}, {
|
|
88079
86966
|
key: "insertDline",
|
|
@@ -88141,126 +87028,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88141
87028
|
}
|
|
88142
87029
|
}, listDrawLineByPathRange);
|
|
88143
87030
|
})
|
|
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
87031
|
}, {
|
|
88265
87032
|
key: "updateDlineLeftTop",
|
|
88266
87033
|
value: function updateDlineLeftTop(hoEditorFactory, dline) {
|
|
@@ -88307,9 +87074,7 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88307
87074
|
_dline3.drawPageTables[0].y = hoEditorFactory.firstPageStartTop;
|
|
88308
87075
|
} else {
|
|
88309
87076
|
_dline3.dTop = hoEditorFactory.firstPageStartTop;
|
|
88310
|
-
// dline.y = hoEditorFactory.firstPageStartTop;
|
|
88311
87077
|
}
|
|
88312
|
-
|
|
88313
87078
|
this.updateDlineLeftTop(hoEditorFactory, _dline3);
|
|
88314
87079
|
}
|
|
88315
87080
|
}
|
|
@@ -88353,8 +87118,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88353
87118
|
while (1) switch (_context3.prev = _context3.next) {
|
|
88354
87119
|
case 0:
|
|
88355
87120
|
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
87121
|
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
88359
87122
|
if (hoEditorFactory.firstPageStartTop > 0) {
|
|
88360
87123
|
this.drawPages[0].storeDrawHeader.visible = false;
|
|
@@ -88603,7 +87366,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88603
87366
|
key: "updatePageCountNodes",
|
|
88604
87367
|
value: function updatePageCountNodes() {
|
|
88605
87368
|
var _this4 = this;
|
|
88606
|
-
// const pageCount = this.drawPages.length;
|
|
88607
87369
|
var hoeditfactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
88608
87370
|
this.pageCountNodes.forEach(function (value, key) {
|
|
88609
87371
|
value.drawNodes[0].updatePaint();
|
|
@@ -88613,66 +87375,14 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88613
87375
|
hoeditfactory.subDocManger.updateAllSameSubDoc(dArea.index, dArea.hftType, false, false);
|
|
88614
87376
|
}
|
|
88615
87377
|
}
|
|
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
87378
|
});
|
|
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
87379
|
}
|
|
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
87380
|
}, {
|
|
88669
87381
|
key: "repaintPageMarkNodes",
|
|
88670
87382
|
value: function repaintPageMarkNodes(dPage, strPath) {
|
|
88671
87383
|
var arrNodes = this.getSubDocPageMarkNodes(strPath);
|
|
88672
87384
|
for (var i = arrNodes.length - 1; i >= 0; i--) {
|
|
88673
87385
|
arrNodes[i].drawNodes[0].updatePaint();
|
|
88674
|
-
// this.removePageMarkDrawNode(arrNodes[i]);
|
|
88675
|
-
// this.drawAPageMark(dPage, arrNodes[i]);
|
|
88676
87386
|
}
|
|
88677
87387
|
}
|
|
88678
87388
|
}, {
|
|
@@ -88691,23 +87401,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88691
87401
|
});
|
|
88692
87402
|
return ret;
|
|
88693
87403
|
}
|
|
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
87404
|
}, {
|
|
88712
87405
|
key: "clear",
|
|
88713
87406
|
value: function clear(dlines) {
|
|
@@ -88729,11 +87422,11 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88729
87422
|
dline.uncache();
|
|
88730
87423
|
for (var _i2 = 0; _i2 < dline.drawItems.length - 1; _i2++) {
|
|
88731
87424
|
dline.drawItems[_i2].removeAllEventListeners();
|
|
88732
|
-
if (dline.drawItems[_i2] instanceof DrawContainer/* DrawContainer */.H)
|
|
87425
|
+
if (dline.drawItems[_i2] instanceof DrawContainer/* DrawContainer */.H) {
|
|
87426
|
+
dline.drawItems[_i2].removeAllChildren();
|
|
87427
|
+
}
|
|
88733
87428
|
dline.drawItems[_i2].drawItems.length = 0;
|
|
88734
|
-
// this.removeChild(this._drawItems[i]);
|
|
88735
87429
|
}
|
|
88736
|
-
|
|
88737
87430
|
dline.removeAllChildren();
|
|
88738
87431
|
dline.drawItems.length = 0;
|
|
88739
87432
|
}
|
|
@@ -88766,21 +87459,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88766
87459
|
this._pageNumNodes = new Map();
|
|
88767
87460
|
this._pageCountNodes = new Map();
|
|
88768
87461
|
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
87462
|
this._drawPages.splice(0, this._drawPages.length);
|
|
88785
87463
|
if (this._drawPageCount) {
|
|
88786
87464
|
this._drawPageCount.count = 0;
|
|
@@ -88810,9 +87488,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88810
87488
|
for (var c = 0; c < tb.colCount; c++) {
|
|
88811
87489
|
var cell = tb.rows[r][c];
|
|
88812
87490
|
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
87491
|
cell.drawCell.updateHeight();
|
|
88817
87492
|
var row = r;
|
|
88818
87493
|
if (cell.rowSpan > 1) {
|
|
@@ -88838,9 +87513,7 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88838
87513
|
_hoEditorFactory$subD2 = (0,slicedToArray/* default */.Z)(_hoEditorFactory$subD, 2),
|
|
88839
87514
|
headerIndex = _hoEditorFactory$subD2[0],
|
|
88840
87515
|
dRoots = _hoEditorFactory$subD2[1];
|
|
88841
|
-
// const dAreaIndex=hoEditorFactory.subDocManger.getHeaderIndexByRoots(dRoots);
|
|
88842
87516
|
hoEditorFactory.subDocManger.copySubDocToPages(hoEditorFactory.drawPageTree.drawHeaders[headerIndex], pageIndex, SubDocManger/* HeaderFooterType */.pi.hftHead);
|
|
88843
|
-
// this.subDocManger.paintSubDoc(pageIndex, HeaderFooterType.hftHead);
|
|
88844
87517
|
}
|
|
88845
87518
|
}, {
|
|
88846
87519
|
key: "paintFooter",
|
|
@@ -88850,9 +87523,7 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88850
87523
|
_hoEditorFactory$subD4 = (0,slicedToArray/* default */.Z)(_hoEditorFactory$subD3, 2),
|
|
88851
87524
|
footerIndex = _hoEditorFactory$subD4[0],
|
|
88852
87525
|
dRoots = _hoEditorFactory$subD4[1];
|
|
88853
|
-
// const dAreaIndex=hoEditorFactory.subDocManger.getFooterIndexByRoots(dRoots);
|
|
88854
87526
|
hoEditorFactory.subDocManger.copySubDocToPages(hoEditorFactory.drawPageTree.drawFooters[footerIndex], pageIndex, SubDocManger/* HeaderFooterType */.pi.hftFoot);
|
|
88855
|
-
// this.subDocManger.paintSubDoc(pageIndex, HeaderFooterType.hftFoot);
|
|
88856
87527
|
}
|
|
88857
87528
|
}, {
|
|
88858
87529
|
key: "updateDrawFormular",
|
|
@@ -88862,7 +87533,6 @@ var DrawTree = /*#__PURE__*/function () {
|
|
|
88862
87533
|
var pnode = value.getParentCell();
|
|
88863
87534
|
if (cell.table == pnode.table) {
|
|
88864
87535
|
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
87536
|
value.updateResult();
|
|
88867
87537
|
value.getParentCell().drawCell.needUpdate = true;
|
|
88868
87538
|
isNeedUpdate = true;
|
|
@@ -169823,7 +168493,7 @@ var map = {
|
|
|
169823
168493
|
"./dateDialog/DateDialog.vue": 14581,
|
|
169824
168494
|
"./delimiter/Delimiter.vue": 93230,
|
|
169825
168495
|
"./expressionForm/ExpressionForm.vue": 30852,
|
|
169826
|
-
"./findReplace/FindReplace.vue":
|
|
168496
|
+
"./findReplace/FindReplace.vue": 33693,
|
|
169827
168497
|
"./gestation/Gestation.vue": 20329,
|
|
169828
168498
|
"./hoprint/HoPrint.vue": 79228,
|
|
169829
168499
|
"./listsource/ListSource.vue": 30685,
|
|
@@ -169839,7 +168509,7 @@ var map = {
|
|
|
169839
168509
|
"./qrCode/QrCode.vue": 13820,
|
|
169840
168510
|
"./radioCheckBox/RadioCheckbox.vue": 64515,
|
|
169841
168511
|
"./selectDialog/SelectDialog.vue": 73791,
|
|
169842
|
-
"./sign/Sign.vue":
|
|
168512
|
+
"./sign/Sign.vue": 40460,
|
|
169843
168513
|
"./specialChars/HoSpecialChars.vue": 75058,
|
|
169844
168514
|
"./table/TableCellPoper.vue": 21166,
|
|
169845
168515
|
"./table/TableCellPoper1.vue": 44645,
|
|
@@ -208189,7 +206859,6 @@ var DrawSelectLevel = /*#__PURE__*/function () {
|
|
|
208189
206859
|
if (hoeditorfactory.drawTree.selectRange.beginRangeSelect && (parseInt(aevent.nativeEvent.buttons) && 1) === 1) {
|
|
208190
206860
|
var _hoeditorfactory$draw2;
|
|
208191
206861
|
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
206862
|
hoeditorfactory.drawTree.activePage = dPage;
|
|
208194
206863
|
}
|
|
208195
206864
|
var endPos = hoeditorfactory.drawTree.getStagePosition(dPage, dPage.activeDrawRect, aevent.stageX, aevent.stageY);
|
|
@@ -210476,7 +209145,7 @@ var TextNode = __webpack_require__(27198);
|
|
|
210476
209145
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
210477
209146
|
var ParagraphNode = __webpack_require__(67945);
|
|
210478
209147
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
210479
|
-
/* harmony default export */ var version = ('3.1.
|
|
209148
|
+
/* harmony default export */ var version = ('3.1.168');
|
|
210480
209149
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
210481
209150
|
var PoperTipText = __webpack_require__(84531);
|
|
210482
209151
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|
|
@@ -211587,7 +210256,6 @@ var DrawPageTable = __webpack_require__(15694);
|
|
|
211587
210256
|
|
|
211588
210257
|
|
|
211589
210258
|
|
|
211590
|
-
|
|
211591
210259
|
|
|
211592
210260
|
|
|
211593
210261
|
var NeedDrawPageInfo = /*#__PURE__*/function () {
|
|
@@ -211921,21 +210589,12 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
211921
210589
|
if (drawArea.allowAcrossPage) restHeight = drawArea.maxHeight - dTop;
|
|
211922
210590
|
}
|
|
211923
210591
|
// 判断是否已经满页
|
|
211924
|
-
if (dline instanceof DrawTable/* DrawTable */.t && restHeight < hoEditorFactory.defaultLineHeight || dline instanceof DrawLine/* DrawLine */.a && restHeight < dline.dHeight && dTop > 0) {
|
|
210592
|
+
if (dline instanceof DrawTable/* DrawTable */.t && (restHeight < hoEditorFactory.defaultLineHeight || !dline.isFirstRowCanFit(restHeight)) || dline instanceof DrawLine/* DrawLine */.a && restHeight < dline.dHeight && dTop > 0) {
|
|
211925
210593
|
if (dline instanceof DrawLine/* DrawLine */.a && restHeight >= hoEditorFactory.defaultLineHeight) {
|
|
211926
210594
|
if (drawArea.contains(dline)) {
|
|
211927
210595
|
drawArea.removeChild(dline);
|
|
211928
210596
|
}
|
|
211929
210597
|
}
|
|
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
210598
|
if (drawArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
|
|
211940
210599
|
//当前已经満页,绘制批注页码等信息
|
|
211941
210600
|
this.afterAreaFinishPaint(drawArea);
|
|
@@ -211956,15 +210615,9 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
211956
210615
|
if (drawArea.allowAcrossPage) {
|
|
211957
210616
|
restHeight = drawArea.maxHeight - dTop;
|
|
211958
210617
|
}
|
|
211959
|
-
/*绘制优化
|
|
211960
|
-
//if (!isNew && hoEditorFactory.isUseDrawingOptimization) {
|
|
211961
|
-
if (hoEditorFactory.isUseDrawingOptimization) {
|
|
211962
|
-
break;
|
|
211963
|
-
}
|
|
211964
|
-
*/
|
|
211965
210618
|
}
|
|
211966
210619
|
}
|
|
211967
|
-
//当前行不会触发满页,正常绘制
|
|
210620
|
+
//当前行不会触发满页,正常绘制
|
|
211968
210621
|
var _dobj = dRoots[nextLine];
|
|
211969
210622
|
var cbParagraph = _dobj.paragraphNode.combineParagraph;
|
|
211970
210623
|
if (_dobj instanceof DrawTable/* DrawTable */.t) {
|
|
@@ -211990,8 +210643,6 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
211990
210643
|
if (drawArea.allowAcrossPage) restHeight = drawArea.maxHeight - dTop;
|
|
211991
210644
|
if (restHeight < TableNode/* gDefaultRowHeight */.dT && drawArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
|
|
211992
210645
|
drawArea.endDline = nextLine - 1;
|
|
211993
|
-
// drawArea.stage.update();
|
|
211994
|
-
// this.updateDrawPage(drawArea.pageIndex);
|
|
211995
210646
|
this._startNeedUpdatePage = Math.min(drawArea.pageIndex, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
|
|
211996
210647
|
this._endNeedUpdatePage = Math.max(drawArea.pageIndex, this._endNeedUpdatePage);
|
|
211997
210648
|
pageIsFull.set(drawArea.index, true);
|
|
@@ -212014,7 +210665,6 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212014
210665
|
if (drawArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
|
|
212015
210666
|
this._startNeedUpdatePage = Math.min(drawArea.pageIndex, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
|
|
212016
210667
|
this._endNeedUpdatePage = Math.max(drawArea.pageIndex, this._endNeedUpdatePage);
|
|
212017
|
-
// drawArea.stage.update();
|
|
212018
210668
|
drawArea = this.getNextDrawArea(drawArea)[0];
|
|
212019
210669
|
dTop = 0;
|
|
212020
210670
|
if (drawArea.allowAcrossPage) {
|
|
@@ -212031,12 +210681,10 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212031
210681
|
restHeight -= cbParagraph.lineSpace;
|
|
212032
210682
|
}
|
|
212033
210683
|
} else {
|
|
212034
|
-
//普通行绘制,检查是否满页,満页后需要新起一页绘制
|
|
210684
|
+
//普通行绘制,检查是否满页,満页后需要新起一页绘制
|
|
212035
210685
|
if (_dobj.dHeight > restHeight && dTop > 0) {
|
|
212036
210686
|
if (drawArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
|
|
212037
210687
|
drawArea.endDline = nextLine - 1;
|
|
212038
|
-
// drawArea.stage.update();
|
|
212039
|
-
// this.updateDrawPage(drawArea.pageIndex);
|
|
212040
210688
|
this._startNeedUpdatePage = Math.min(drawArea.pageIndex, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
|
|
212041
210689
|
this._endNeedUpdatePage = Math.max(drawArea.pageIndex, this._endNeedUpdatePage);
|
|
212042
210690
|
pageIsFull.set(drawArea.index, true);
|
|
@@ -212054,7 +210702,6 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212054
210702
|
}
|
|
212055
210703
|
drawArea.addChild(_dobj);
|
|
212056
210704
|
_dobj.y = dTop;
|
|
212057
|
-
// dobj.x = cbParagraph.leftMarginPixes;
|
|
212058
210705
|
}
|
|
212059
210706
|
//修改下一行的绘制起始位置
|
|
212060
210707
|
dTop = _dobj.y + _dobj.dHeight + _dobj.paragraphNode.combineParagraph.lineSpace;
|
|
@@ -212063,9 +210710,6 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212063
210710
|
}
|
|
212064
210711
|
if (nextLine >= endLine) break;else nextLine += 1;
|
|
212065
210712
|
}
|
|
212066
|
-
// if (mainArea.stage) {
|
|
212067
|
-
// mainArea.stage.update();
|
|
212068
|
-
// }
|
|
212069
210713
|
var mainIndex = Math.min(nextLine, endLine, startUpdateLine);
|
|
212070
210714
|
//绘制完成,清理多出来的绘制页
|
|
212071
210715
|
if (drawArea instanceof DrawPageMainDoc/* DrawPageMainDoc */.$ && mainIndex === dRoots.length - 1) {
|
|
@@ -212075,7 +210719,6 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212075
210719
|
this._drawMainDocs.splice(areaIndex + 1, this._drawMainDocs.length);
|
|
212076
210720
|
hoEditorFactory.drawTree.drawPageCount.count = hoEditorFactory.drawTree.drawPages.length;
|
|
212077
210721
|
this.afterAreaFinishPaint(drawArea);
|
|
212078
|
-
// drawArea.stage.update();
|
|
212079
210722
|
this._startNeedUpdatePage = Math.min(drawArea.pageIndex, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
|
|
212080
210723
|
this._endNeedUpdatePage = Math.max(drawArea.pageIndex, this._endNeedUpdatePage);
|
|
212081
210724
|
if (hoEditorFactory.drawTree.drawPages.length !== this._oldPageCount) {
|
|
@@ -212084,23 +210727,6 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212084
210727
|
}
|
|
212085
210728
|
return;
|
|
212086
210729
|
}
|
|
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
210730
|
var dobj = dRoots[mainIndex];
|
|
212105
210731
|
var startDrawLine;
|
|
212106
210732
|
var redrawPostion = hoEditorFactory.drawTree.getDlineDrawRootLists(dobj)[0];
|
|
@@ -212134,22 +210760,12 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212134
210760
|
//对于新插入的内容绘制完成后(一直到最后一个插入的段落结束),后续的段落需要进行移动位置,则调用update
|
|
212135
210761
|
this.update(mainArea, dMainRoots, drawTop, mainIndex, mainIndex, true);
|
|
212136
210762
|
} 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
210763
|
hoEditorFactory.drawTree.inViewPages.forEach(function (i) {
|
|
212141
210764
|
_this.updateDrawPage(i);
|
|
212142
210765
|
});
|
|
212143
|
-
// }
|
|
212144
|
-
// for (let i = this._endNeedUpdatePage; i >= this._startNeedUpdatePage; i--) {
|
|
212145
|
-
// this.updateDrawPage(i);
|
|
212146
|
-
// }
|
|
212147
210766
|
this._startNeedUpdatePage = -1;
|
|
212148
210767
|
this._endNeedUpdatePage = -1;
|
|
212149
210768
|
}
|
|
212150
|
-
// if (HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.paintStatus === PaintState.psReview) {
|
|
212151
|
-
// drawArea.drawComments();
|
|
212152
|
-
// }
|
|
212153
210769
|
}
|
|
212154
210770
|
}, {
|
|
212155
210771
|
key: "paintDrawPageCell",
|
|
@@ -212212,33 +210828,14 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212212
210828
|
nextLine += 1;
|
|
212213
210829
|
continue;
|
|
212214
210830
|
}
|
|
212215
|
-
if (dline instanceof DrawTable/* DrawTable */.t && restHeight < hoEditorFactory.defaultLineHeight || dline instanceof DrawLine/* DrawLine */.a && restHeight < dline.dHeight) {
|
|
210831
|
+
if (dline instanceof DrawTable/* DrawTable */.t && (restHeight < hoEditorFactory.defaultLineHeight || !dline.isFirstRowCanFit(restHeight)) || dline instanceof DrawLine/* DrawLine */.a && restHeight < dline.dHeight) {
|
|
212216
210832
|
if (dline instanceof DrawLine/* DrawLine */.a && restHeight >= hoEditorFactory.defaultLineHeight) {
|
|
212217
210833
|
if (drawArea.contains(dline)) {
|
|
212218
210834
|
drawArea.removeChild(dline);
|
|
212219
210835
|
}
|
|
212220
210836
|
}
|
|
212221
210837
|
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
210838
|
}
|
|
212241
|
-
|
|
212242
210839
|
var _dobj2 = dRoots[nextLine];
|
|
212243
210840
|
var cbParagraph = _dobj2.paragraphNode.combineParagraph;
|
|
212244
210841
|
if (_dobj2 instanceof DrawTable/* DrawTable */.t) {
|
|
@@ -212291,49 +210888,14 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212291
210888
|
if (nextLine > startLine || nextLine === startLine && !drawArea.contains(_dobj2)) {
|
|
212292
210889
|
drawArea.addChild(_dobj2);
|
|
212293
210890
|
_dobj2.y = dTop;
|
|
212294
|
-
//dobj.x = cbParagraph.leftMarginPixes;
|
|
212295
210891
|
}
|
|
212296
|
-
|
|
212297
210892
|
dTop = _dobj2.y + _dobj2.dHeight + _dobj2.paragraphNode.combineParagraph.lineSpace;
|
|
212298
210893
|
if (drawArea.allowAcrossPage && mainArea.allowAcrossPage) restHeight = drawArea.maxHeight - dTop;
|
|
212299
210894
|
}
|
|
212300
210895
|
if (nextLine >= endLine) break;else nextLine += 1;
|
|
212301
210896
|
}
|
|
212302
|
-
// if (mainArea.stage) {
|
|
212303
|
-
// mainArea.stage.update();
|
|
212304
|
-
// }
|
|
212305
210897
|
var mainIndex = Math.min(nextLine, endLine, startUpdateLine);
|
|
212306
210898
|
//正文绘制完毕 最后一行不需要执行更新
|
|
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
210899
|
var dobj = dRoots[mainIndex];
|
|
212338
210900
|
var startDrawLine;
|
|
212339
210901
|
var redrawPostion = hoEditorFactory.drawTree.getDlineDrawRootLists(dobj)[0];
|
|
@@ -212358,7 +210920,9 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212358
210920
|
startDrawLine = dobj;
|
|
212359
210921
|
}
|
|
212360
210922
|
var drawTop = startDrawLine.y;
|
|
212361
|
-
if (startDrawLine instanceof DrawPageTable/* DrawPageTable */.ox && !mainArea.contains(startDrawLine))
|
|
210923
|
+
if (startDrawLine instanceof DrawPageTable/* DrawPageTable */.ox && !mainArea.contains(startDrawLine)) {
|
|
210924
|
+
drawTop = 0;
|
|
210925
|
+
}
|
|
212362
210926
|
this.update(mainArea, dMainRoots, drawTop, mainIndex, mainIndex);
|
|
212363
210927
|
} finally {
|
|
212364
210928
|
if (hoEditorFactory.drawTree.drawPages.length !== pageCount) {
|
|
@@ -212376,8 +210940,6 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212376
210940
|
if (!drawArea) {
|
|
212377
210941
|
return;
|
|
212378
210942
|
}
|
|
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
210943
|
try {
|
|
212382
210944
|
if (this._oldPageCount === 0) {
|
|
212383
210945
|
this._oldPageCount = hoEditorFactory.drawTree.drawPages.length;
|
|
@@ -212466,54 +211028,12 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
212466
211028
|
if (this._oldPageCount !== hoEditorFactory.drawTree.drawPages.length) {
|
|
212467
211029
|
hoEditorFactory.drawTree.updatePageCountNodes();
|
|
212468
211030
|
}
|
|
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
211031
|
if (!callFromPaint) {
|
|
212481
211032
|
hoEditorFactory.drawTree.inViewPages.forEach(function (i) {
|
|
212482
211033
|
_this2.updateDrawPage(i);
|
|
212483
211034
|
});
|
|
212484
211035
|
}
|
|
212485
|
-
// }
|
|
212486
211036
|
}
|
|
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
211037
|
}
|
|
212518
211038
|
}, {
|
|
212519
211039
|
key: "calcMainDocPosition",
|
|
@@ -241191,7 +239711,7 @@ var HoFooter_component = (0,componentNormalizer/* default */.Z)(
|
|
|
241191
239711
|
// EXTERNAL MODULE: ./src/components/controls/ControlModal.vue + 3 modules
|
|
241192
239712
|
var ControlModal = __webpack_require__(10597);
|
|
241193
239713
|
// EXTERNAL MODULE: ./src/components/controls/findReplace/FindReplace.vue + 5 modules
|
|
241194
|
-
var FindReplace = __webpack_require__(
|
|
239714
|
+
var FindReplace = __webpack_require__(33693);
|
|
241195
239715
|
;// CONCATENATED MODULE: ./src/components/controls/findReplace/index.ts
|
|
241196
239716
|
|
|
241197
239717
|
/* harmony default export */ var findReplace = (FindReplace["default"]);
|