hoeditor-web 3.1.206 → 3.1.208
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 +1 -15845
- package/lib/hoeditor.umd.js +394 -535
- package/lib/hoeditor.umd.min.js +2 -2
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -110085,8 +110085,8 @@ var staticRenderFns = [];
|
|
|
110085
110085
|
|
|
110086
110086
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
110087
110087
|
var es_array_push = __webpack_require__(44114);
|
|
110088
|
-
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ImageNode.ts
|
|
110089
|
-
var ImageNode = __webpack_require__(
|
|
110088
|
+
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ImageNode.ts
|
|
110089
|
+
var ImageNode = __webpack_require__(82655);
|
|
110090
110090
|
// EXTERNAL MODULE: ./src/HOEditorFactorys.ts
|
|
110091
110091
|
var HOEditorFactorys = __webpack_require__(57703);
|
|
110092
110092
|
// EXTERNAL MODULE: ./src/components/controls/colorPicker/HoColorPickers.vue + 5 modules
|
|
@@ -110734,8 +110734,8 @@ var es_json_stringify = __webpack_require__(33110);
|
|
|
110734
110734
|
var esnext_iterator_constructor = __webpack_require__(98992);
|
|
110735
110735
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.iterator.for-each.js
|
|
110736
110736
|
var esnext_iterator_for_each = __webpack_require__(3949);
|
|
110737
|
-
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ImageNode.ts
|
|
110738
|
-
var ImageNode = __webpack_require__(
|
|
110737
|
+
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ImageNode.ts
|
|
110738
|
+
var ImageNode = __webpack_require__(82655);
|
|
110739
110739
|
// EXTERNAL MODULE: ./src/HOEditorFactorys.ts
|
|
110740
110740
|
var HOEditorFactorys = __webpack_require__(57703);
|
|
110741
110741
|
// EXTERNAL MODULE: ./src/components/controls/colorPicker/HoColorPickers.vue + 5 modules
|
|
@@ -117303,7 +117303,7 @@ class SubDocManger {
|
|
|
117303
117303
|
/* harmony import */ var _treeNode_MedicalExpressionNode__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(14851);
|
|
117304
117304
|
/* harmony import */ var _treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(65018);
|
|
117305
117305
|
/* harmony import */ var _treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(39885);
|
|
117306
|
-
/* harmony import */ var _treeNode_ImageNode__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(
|
|
117306
|
+
/* harmony import */ var _treeNode_ImageNode__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(82655);
|
|
117307
117307
|
/* harmony import */ var _treeNode_BarcodeNode__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(30942);
|
|
117308
117308
|
/* harmony import */ var _treeNode_QrcodeNode__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(33498);
|
|
117309
117309
|
/* harmony import */ var _treeNode_TableNode__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(30486);
|
|
@@ -120525,10 +120525,6 @@ class DocController {
|
|
|
120525
120525
|
const startPath = domRange.startPath;
|
|
120526
120526
|
const endPath = domRange.endPath;
|
|
120527
120527
|
const ePNode = hoEditorFactory.docTree.getParentNode(endPath); //结束节点的父节点
|
|
120528
|
-
// const eStyleIndex =
|
|
120529
|
-
// domRange.npEnd.node instanceof TextNode
|
|
120530
|
-
// ? domRange.npEnd.node.styleIndex
|
|
120531
|
-
// : 0;
|
|
120532
120528
|
const endNode = new _treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_37__/* .MarkNode */ .y(this._hoEditorFactoryID, domRange.npStart.roots, ePNode, _treeNode_BaseNode__WEBPACK_IMPORTED_MODULE_15__/* .NodeType */ .Z6.ntMark, commentID, 0, _treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_37__/* .MarkNodeType */ .g.mtEnd);
|
|
120533
120529
|
endNode.MarkNodeType = _treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_37__/* .MarkNodeType */ .g.mtEnd;
|
|
120534
120530
|
endNode.isReadOnly = true;
|
|
@@ -120547,15 +120543,6 @@ class DocController {
|
|
|
120547
120543
|
hoEditorFactory.undoService.begin();
|
|
120548
120544
|
hoEditorFactory.undoService.add(new _undoRedo_NodeStyleUndoUnit__WEBPACK_IMPORTED_MODULE_24__/* .NodeStyleUndoUnit */ ._(this._hoEditorFactoryID, startPath, endPath, new _undoRedo_NodeStyleUndoUnit__WEBPACK_IMPORTED_MODULE_24__/* .Operate */ .l('insertComment', commentID)));
|
|
120549
120545
|
hoEditorFactory.undoService.commit();
|
|
120550
|
-
// const newEndpath = endNode.getNodePath();
|
|
120551
|
-
// const newRange = new DomRange(
|
|
120552
|
-
// this._hoEditorFactoryID,
|
|
120553
|
-
// newEndpath,
|
|
120554
|
-
// newEndpath
|
|
120555
|
-
// );
|
|
120556
|
-
// const cgEvent = new SelectionChangeEvent(newRange, newRange); //选中范围变化事件
|
|
120557
|
-
// hoEditorFactory.docTree.selectChange(cgEvent);
|
|
120558
|
-
// hoEditorFactory.docTree.curDomRange = newRange;
|
|
120559
120546
|
}
|
|
120560
120547
|
/**
|
|
120561
120548
|
* 删除批注
|
|
@@ -128094,7 +128081,6 @@ class CellNode extends _RectNode__WEBPACK_IMPORTED_MODULE_22__/* .RectNode */ .P
|
|
|
128094
128081
|
this._colSpan = colSpan;
|
|
128095
128082
|
this._table = pNode;
|
|
128096
128083
|
this._row = row;
|
|
128097
|
-
//this._valign = VAlign.vatop;
|
|
128098
128084
|
this._cellProperty = cellProperty;
|
|
128099
128085
|
this.cell2DrawNode(r, c);
|
|
128100
128086
|
}
|
|
@@ -128187,11 +128173,6 @@ class CellNode extends _RectNode__WEBPACK_IMPORTED_MODULE_22__/* .RectNode */ .P
|
|
|
128187
128173
|
this.clearDrawNodes(0, this.drawNodes.length - 1);
|
|
128188
128174
|
}
|
|
128189
128175
|
cell2DrawNodeRange(r, c) {
|
|
128190
|
-
// let dHeight = 0;
|
|
128191
|
-
// let dWidth = 0;
|
|
128192
|
-
// const [r, c] = this._table.getCellInfos(this);
|
|
128193
|
-
// const dLeft = this._table.colInfos[c].dLeft;
|
|
128194
|
-
// const dTop = this._table.rowInfos[r].rowBaseDTop;
|
|
128195
128176
|
let aWidth = 0;
|
|
128196
128177
|
for (let i = c; i <= c + this._colSpan - 1; i++) {
|
|
128197
128178
|
if (this._table.colInfos[i]) {
|
|
@@ -130526,253 +130507,59 @@ class GestationNode extends _ControlNode__WEBPACK_IMPORTED_MODULE_7__/* .Control
|
|
|
130526
130507
|
|
|
130527
130508
|
/***/ }),
|
|
130528
130509
|
|
|
130529
|
-
/***/
|
|
130510
|
+
/***/ 82655:
|
|
130530
130511
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
130531
130512
|
|
|
130532
130513
|
"use strict";
|
|
130533
|
-
|
|
130534
|
-
|
|
130535
|
-
|
|
130536
|
-
|
|
130537
|
-
|
|
130538
|
-
|
|
130539
|
-
|
|
130540
|
-
var
|
|
130541
|
-
|
|
130542
|
-
var
|
|
130543
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
130544
|
-
var es_array_push = __webpack_require__(44114);
|
|
130545
|
-
// EXTERNAL MODULE: ./src/yuki-createjs/index.ts
|
|
130546
|
-
var yuki_createjs = __webpack_require__(56419);
|
|
130547
|
-
// EXTERNAL MODULE: ./src/editor/draw/drawNode/DrawCombineNode.ts
|
|
130548
|
-
var DrawCombineNode = __webpack_require__(10431);
|
|
130549
|
-
// EXTERNAL MODULE: ./src/editor/draw/DrawResize.ts
|
|
130550
|
-
var DrawResize = __webpack_require__(36883);
|
|
130551
|
-
// EXTERNAL MODULE: ./src/HOEditorFactorys.ts
|
|
130552
|
-
var HOEditorFactorys = __webpack_require__(57703);
|
|
130553
|
-
// EXTERNAL MODULE: ./src/editor/SubDocManger.ts
|
|
130554
|
-
var SubDocManger = __webpack_require__(63942);
|
|
130555
|
-
// EXTERNAL MODULE: ./src/editor/events/NodeChangeEvent.ts
|
|
130556
|
-
var NodeChangeEvent = __webpack_require__(3530);
|
|
130557
|
-
// EXTERNAL MODULE: ./src/editor/dom/DocTree.ts
|
|
130558
|
-
var DocTree = __webpack_require__(86247);
|
|
130559
|
-
// EXTERNAL MODULE: ./src/editor/draw/SelectRange.ts
|
|
130560
|
-
var SelectRange = __webpack_require__(49576);
|
|
130561
|
-
;// ./src/editor/draw/drawNode/DrawImageNode.ts
|
|
130562
|
-
|
|
130563
|
-
/*
|
|
130564
|
-
* @Author: your name
|
|
130565
|
-
* @Date: 2020-11-11 11:04:19
|
|
130566
|
-
* @LastEditTime: 2024-02-04 10:59:15
|
|
130567
|
-
* @LastEditors: liyanan 2441631434@qq.com
|
|
130568
|
-
* @Description: In User Settings Edit
|
|
130569
|
-
* @FilePath: \hoeditor-web\src\editor\draw\drawNode\DrawImageNode.ts
|
|
130570
|
-
*/
|
|
130571
|
-
|
|
130572
|
-
|
|
130573
|
-
|
|
130514
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
130515
|
+
/* harmony export */ K: function() { return /* binding */ ImageNode; }
|
|
130516
|
+
/* harmony export */ });
|
|
130517
|
+
/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(49850);
|
|
130518
|
+
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32356);
|
|
130519
|
+
/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44114);
|
|
130520
|
+
/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
130521
|
+
/* harmony import */ var _editor_draw_drawNode_DrawImageNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90479);
|
|
130522
|
+
/* harmony import */ var _BaseNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29269);
|
|
130523
|
+
/* harmony import */ var _CellNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(90900);
|
|
130574
130524
|
|
|
130575
130525
|
|
|
130576
130526
|
|
|
130577
130527
|
|
|
130578
130528
|
|
|
130579
|
-
class
|
|
130580
|
-
constructor(hoeditfactoryID, rootPath, node, index, imagePath, dWidth, dHeight,
|
|
130581
|
-
//scaleX: number,
|
|
130582
|
-
//scaleY: number
|
|
130583
|
-
markImagePath) {
|
|
130584
|
-
super(hoeditfactoryID, rootPath, node, index);
|
|
130585
|
-
(0,defineProperty/* default */.A)(this, "_imagePath", void 0);
|
|
130586
|
-
(0,defineProperty/* default */.A)(this, "_markImagePath", void 0);
|
|
130587
|
-
(0,defineProperty/* default */.A)(this, "_scaleX", void 0);
|
|
130588
|
-
(0,defineProperty/* default */.A)(this, "_scaleY", void 0);
|
|
130589
|
-
(0,defineProperty/* default */.A)(this, "_imageY", void 0);
|
|
130590
|
-
(0,defineProperty/* default */.A)(this, "_drawResize", void 0);
|
|
130591
|
-
(0,defineProperty/* default */.A)(this, "_id", void 0);
|
|
130592
|
-
(0,defineProperty/* default */.A)(this, "_bitMap", void 0);
|
|
130593
|
-
const hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.O.instance().getFactory(hoeditfactoryID);
|
|
130594
|
-
const bounds = hoEditorFactory.vueController.getMainBounds(dWidth, dHeight);
|
|
130595
|
-
this.dWidth = Number(bounds.imageWidth);
|
|
130596
|
-
this.dHeight = Number(bounds.imageHeight);
|
|
130597
|
-
this._imagePath = imagePath;
|
|
130598
|
-
this._markImagePath = markImagePath;
|
|
130599
|
-
this._imageY = -this.dHeight;
|
|
130600
|
-
this.insertImage();
|
|
130601
|
-
this._drawResize = new DrawResize/* DrawResize */.z(hoeditfactoryID, this.node, this, this._imageY);
|
|
130602
|
-
}
|
|
130603
|
-
get markImagePath() {
|
|
130604
|
-
return this._markImagePath;
|
|
130605
|
-
}
|
|
130606
|
-
get imagePath() {
|
|
130607
|
-
return this._imagePath;
|
|
130608
|
-
}
|
|
130609
|
-
get drawResize() {
|
|
130610
|
-
return this._drawResize;
|
|
130611
|
-
}
|
|
130612
|
-
insertImage() {
|
|
130613
|
-
const drawNode = this;
|
|
130614
|
-
const image = new Image();
|
|
130615
|
-
// const markImage = new Image();
|
|
130616
|
-
// let markImageBitmap!: createjs.Bitmap;
|
|
130617
|
-
image.src = this.imagePath;
|
|
130618
|
-
this._bitMap = new createjs.Bitmap(image);
|
|
130619
|
-
const hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.O.instance().getFactory(drawNode.node.hoEditorFactoryID);
|
|
130620
|
-
this._bitMap.y = this._imageY;
|
|
130621
|
-
this._bitMap.x = 0;
|
|
130622
|
-
this._bitMap.name = this.node.id;
|
|
130623
|
-
this._bitMap.setBounds(0, 0, drawNode.dWidth, drawNode.dHeight);
|
|
130624
|
-
hoEditorFactory.loadImageCount++;
|
|
130625
|
-
this.addChild(this._bitMap);
|
|
130626
|
-
image.onload = () => {
|
|
130627
|
-
const hitWidth = image.naturalWidth !== 0 ? image.naturalWidth : image.width;
|
|
130628
|
-
const hitHeight = image.naturalHeight !== 0 ? image.naturalHeight : image.height;
|
|
130629
|
-
this._bitMap.setTransform(0, drawNode._imageY, drawNode.dWidth / hitWidth, drawNode.dHeight / hitHeight);
|
|
130630
|
-
this._bitMap.setBounds(0, 0, image.naturalWidth, image.naturalHeight);
|
|
130631
|
-
const hitArea = new createjs.Shape();
|
|
130632
|
-
hitArea.graphics.beginFill('#000').drawRect(0, 0, hitWidth, hitHeight);
|
|
130633
|
-
this._bitMap.hitArea = hitArea;
|
|
130634
|
-
// 压缩页眉中的图片
|
|
130635
|
-
if (this.node.rootPath.includes('header') || this.node.rootPath.includes('footer')) {
|
|
130636
|
-
const canvas = document.createElement('canvas');
|
|
130637
|
-
const ctx = canvas.getContext('2d');
|
|
130638
|
-
canvas.width = this.dWidth * 2;
|
|
130639
|
-
canvas.height = this.dHeight * 2;
|
|
130640
|
-
canvas.style.width = this.dWidth + 'px';
|
|
130641
|
-
canvas.style.height = this.dHeight + 'px';
|
|
130642
|
-
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
130643
|
-
ctx.fillStyle = '#FFFFFF';
|
|
130644
|
-
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
130645
|
-
ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
|
|
130646
|
-
const base64 = canvas.toDataURL('image/jpeg', 0.92);
|
|
130647
|
-
if (base64 < this.node.imageDataBase64String) {
|
|
130648
|
-
this.node.imageDataBase64String = base64;
|
|
130649
|
-
}
|
|
130650
|
-
}
|
|
130651
|
-
this.updateSign();
|
|
130652
|
-
hoEditorFactory.loadImageCount--;
|
|
130653
|
-
};
|
|
130654
|
-
if (this.markImagePath != '') {
|
|
130655
|
-
this.insertMarkImage();
|
|
130656
|
-
}
|
|
130657
|
-
image.onerror = () => {
|
|
130658
|
-
hoEditorFactory.loadImageCount--;
|
|
130659
|
-
if (!drawNode.node.isBackFill) {
|
|
130660
|
-
const path = this.node.previousLeaf().getNodePath();
|
|
130661
|
-
hoEditorFactory.docTree.deleteNode(this.node);
|
|
130662
|
-
const changeEvent = new NodeChangeEvent/* NodeChangeEvent */.b(this._hoEditorFactoryID, DocTree/* DocAction */.LC.daModifyStyle, path, path);
|
|
130663
|
-
changeEvent.oldEndPath = path;
|
|
130664
|
-
changeEvent.afterChangePath = path;
|
|
130665
|
-
changeEvent.oldDrawLines = new SelectRange/* SelectRange */.u(this._hoEditorFactoryID).getRangeDrawLines(path, path, true, true);
|
|
130666
|
-
hoEditorFactory.docTree.change(changeEvent);
|
|
130667
|
-
}
|
|
130668
|
-
};
|
|
130669
|
-
}
|
|
130670
|
-
insertMarkImage() {
|
|
130671
|
-
const drawNode = this;
|
|
130672
|
-
const hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.O.instance().getFactory(drawNode.node.hoEditorFactoryID);
|
|
130673
|
-
const markImage = new Image();
|
|
130674
|
-
let markImageBitmap;
|
|
130675
|
-
markImage.src = this.markImagePath;
|
|
130676
|
-
hoEditorFactory.loadImageCount++;
|
|
130677
|
-
markImageBitmap = new createjs.Bitmap(markImage);
|
|
130678
|
-
//markImageBitmap.y = this._imageY;
|
|
130679
|
-
//markImageBitmap.x = 0;
|
|
130680
|
-
markImageBitmap.name = this.node.id;
|
|
130681
|
-
markImageBitmap.setBounds(0, 0, drawNode.dWidth, drawNode.dHeight);
|
|
130682
|
-
drawNode.addChild(markImageBitmap);
|
|
130683
|
-
//hoEditorFactory.loadImageCount++;
|
|
130684
|
-
markImage.onload = () => {
|
|
130685
|
-
markImageBitmap.x = 0;
|
|
130686
|
-
markImageBitmap.y = 0;
|
|
130687
|
-
const hitWidth = markImage.naturalWidth !== 0 ? markImage.naturalWidth : markImage.width;
|
|
130688
|
-
const hitHeight = markImage.naturalHeight !== 0 ? markImage.naturalHeight : markImage.height;
|
|
130689
|
-
markImageBitmap.setTransform(0, drawNode._imageY, drawNode.dWidth / hitWidth, drawNode.dHeight / hitHeight);
|
|
130690
|
-
const hitArea = new createjs.Shape();
|
|
130691
|
-
hitArea.graphics.beginFill('#000000').drawRect(0, 0, hitWidth, hitHeight);
|
|
130692
|
-
this.updateSign();
|
|
130693
|
-
hoEditorFactory.loadImageCount--;
|
|
130694
|
-
};
|
|
130695
|
-
markImage.onerror = () => {
|
|
130696
|
-
hoEditorFactory.loadImageCount--;
|
|
130697
|
-
const path = this.node.previousLeaf().getNodePath();
|
|
130698
|
-
hoEditorFactory.docTree.deleteNode(this.node);
|
|
130699
|
-
const changeEvent = new NodeChangeEvent/* NodeChangeEvent */.b(this._hoEditorFactoryID, DocTree/* DocAction */.LC.daModifyStyle, path, path);
|
|
130700
|
-
changeEvent.oldEndPath = path;
|
|
130701
|
-
changeEvent.afterChangePath = path;
|
|
130702
|
-
changeEvent.oldDrawLines = new SelectRange/* SelectRange */.u(this._hoEditorFactoryID).getRangeDrawLines(path, path, true, true);
|
|
130703
|
-
hoEditorFactory.docTree.change(changeEvent);
|
|
130704
|
-
};
|
|
130705
|
-
}
|
|
130706
|
-
updateSign() {
|
|
130707
|
-
const hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.O.instance().getFactory(this.node.hoEditorFactoryID);
|
|
130708
|
-
const dArea = hoEditorFactory.drawPageTree.getMainRootArea(this);
|
|
130709
|
-
if (dArea && hoEditorFactory.drawTree.drawPages[dArea.index]) {
|
|
130710
|
-
const atype = hoEditorFactory.subDocManger.getHeaderFooterType(this.node.getNodePath());
|
|
130711
|
-
if (atype === SubDocManger/* HeaderFooterType */.lr.hftHead && dArea != hoEditorFactory.drawTree.drawPages[dArea.index].drawHeader) {
|
|
130712
|
-
hoEditorFactory.subDocManger.updateAllSameSubDoc(dArea.index, atype, false, false);
|
|
130713
|
-
} else {
|
|
130714
|
-
if (atype === SubDocManger/* HeaderFooterType */.lr.hftFoot && dArea != hoEditorFactory.drawTree.drawPages[dArea.index].drawFooter) {
|
|
130715
|
-
hoEditorFactory.subDocManger.updateAllSameSubDoc(dArea.index, atype, false, false);
|
|
130716
|
-
}
|
|
130717
|
-
}
|
|
130718
|
-
hoEditorFactory.drawPageTree.updateDrawPage(dArea.index);
|
|
130719
|
-
}
|
|
130720
|
-
}
|
|
130721
|
-
clone() {
|
|
130722
|
-
const aConTainer = new createjs.Container();
|
|
130723
|
-
const bitMap = this._bitMap.clone();
|
|
130724
|
-
bitMap.name = this.node.id;
|
|
130725
|
-
if (this._cloneProps) {
|
|
130726
|
-
this._cloneProps(aConTainer);
|
|
130727
|
-
}
|
|
130728
|
-
aConTainer.removeAllChildren();
|
|
130729
|
-
aConTainer.addChild(bitMap);
|
|
130730
|
-
return aConTainer;
|
|
130731
|
-
}
|
|
130732
|
-
}
|
|
130733
|
-
// EXTERNAL MODULE: ./src/editor/dom/treeNode/BaseNode.ts
|
|
130734
|
-
var BaseNode = __webpack_require__(29269);
|
|
130735
|
-
;// ./src/editor/dom/treeNode/ImageNode.ts
|
|
130736
|
-
|
|
130737
|
-
|
|
130738
|
-
|
|
130739
|
-
|
|
130740
|
-
class ImageNode extends BaseNode/* BaseNode */.Yp {
|
|
130529
|
+
class ImageNode extends _BaseNode__WEBPACK_IMPORTED_MODULE_4__/* .BaseNode */ .Yp {
|
|
130741
130530
|
// 内部标识符
|
|
130742
130531
|
constructor(hoEditorFactoryID, rootNodes, pNode, nodeType, id, imageDataBase64String, width, height,
|
|
130743
130532
|
//scaleX?: number,
|
|
130744
130533
|
//scaleY?: number,
|
|
130745
130534
|
options, markImage, imageJson) {
|
|
130746
130535
|
super(hoEditorFactoryID, rootNodes, pNode, nodeType);
|
|
130747
|
-
(0,
|
|
130536
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_id", void 0);
|
|
130748
130537
|
//编号ID
|
|
130749
|
-
(0,
|
|
130538
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_dataId", void 0);
|
|
130750
130539
|
// dataId
|
|
130751
|
-
(0,
|
|
130540
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_width", void 0);
|
|
130752
130541
|
//节点宽
|
|
130753
|
-
(0,
|
|
130542
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_height", void 0);
|
|
130754
130543
|
//节点高
|
|
130755
|
-
(0,
|
|
130544
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_scaleX", void 0);
|
|
130756
130545
|
//图片X轴缩放比例
|
|
130757
|
-
(0,
|
|
130546
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_scaleY", void 0);
|
|
130758
130547
|
//图片Y轴缩放比例
|
|
130759
|
-
(0,
|
|
130548
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_imageDataBase64String", void 0);
|
|
130760
130549
|
//图片base64码 原图
|
|
130761
|
-
(0,
|
|
130550
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_isFormula", void 0);
|
|
130762
130551
|
//是否是计算公式
|
|
130763
|
-
(0,
|
|
130552
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_remark", void 0);
|
|
130764
130553
|
//扩展字段
|
|
130765
|
-
(0,
|
|
130554
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_markImage", void 0);
|
|
130766
130555
|
// 修改层
|
|
130767
|
-
(0,
|
|
130556
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_imageJson", void 0);
|
|
130768
130557
|
// 修改层json信息
|
|
130769
|
-
(0,
|
|
130558
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_isBackFill", void 0);
|
|
130770
130559
|
//是否是回填的
|
|
130771
|
-
(0,
|
|
130560
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, "_innerIdentifier", void 0);
|
|
130772
130561
|
this._id = id;
|
|
130773
130562
|
this._dataId = id;
|
|
130774
|
-
this._width = width;
|
|
130775
|
-
this._height = height;
|
|
130776
130563
|
this._imageDataBase64String = imageDataBase64String;
|
|
130777
130564
|
this._remark = "";
|
|
130778
130565
|
this._isFormula = options !== null && options !== void 0 && options.isFormula ? options.isFormula : false;
|
|
@@ -130782,6 +130569,11 @@ class ImageNode extends BaseNode/* BaseNode */.Yp {
|
|
|
130782
130569
|
this.innerIdentifier = (options === null || options === void 0 ? void 0 : options.innerIdentifier) || '';
|
|
130783
130570
|
//this._scaleX = scaleX ? scaleX : 1;
|
|
130784
130571
|
//this._scaleY = scaleY ? scaleY : 1;
|
|
130572
|
+
if (this.parentNode && this.parentNode instanceof _CellNode__WEBPACK_IMPORTED_MODULE_5__/* .CellNode */ .H) {
|
|
130573
|
+
// height -= 10;
|
|
130574
|
+
}
|
|
130575
|
+
this._width = width;
|
|
130576
|
+
this._height = height;
|
|
130785
130577
|
this.node2DrawNodeRange(0, 0);
|
|
130786
130578
|
}
|
|
130787
130579
|
get hoEditorFactoryID() {
|
|
@@ -130901,7 +130693,7 @@ class ImageNode extends BaseNode/* BaseNode */.Yp {
|
|
|
130901
130693
|
//根据可放置的宽度,将普通组件转换成绘制组件
|
|
130902
130694
|
node2DrawNodeRange(startIndex, endIndex) {
|
|
130903
130695
|
this._drawNodes.length = 0;
|
|
130904
|
-
const dNode = new DrawImageNode(this._hoEditorFactoryID, this._rootPath, this, 0, this.imageDataBase64String, this.width, this.height,
|
|
130696
|
+
const dNode = new _editor_draw_drawNode_DrawImageNode__WEBPACK_IMPORTED_MODULE_3__/* .DrawImageNode */ .I(this._hoEditorFactoryID, this._rootPath, this, 0, this.imageDataBase64String, this.width, this.height,
|
|
130905
130697
|
//this.scaleX,
|
|
130906
130698
|
//this.scaleY
|
|
130907
130699
|
this.markImage);
|
|
@@ -130942,7 +130734,7 @@ class ImageNode extends BaseNode/* BaseNode */.Yp {
|
|
|
130942
130734
|
//const scaleX = drawImageNode.children[0].scaleX;
|
|
130943
130735
|
//const scaleY = drawImageNode.children[0].scaleY;
|
|
130944
130736
|
const retObj = {
|
|
130945
|
-
nodeType:
|
|
130737
|
+
nodeType: _BaseNode__WEBPACK_IMPORTED_MODULE_4__/* .NodeType */ .Z6[this.nodeType],
|
|
130946
130738
|
imageType: "Image",
|
|
130947
130739
|
id: this.id,
|
|
130948
130740
|
dataId: this.dataId,
|
|
@@ -130989,7 +130781,7 @@ class ImageNode extends BaseNode/* BaseNode */.Yp {
|
|
|
130989
130781
|
const isFormula = json.isFormula == true || json.isFormula === "true" ? true : false;
|
|
130990
130782
|
const isBackFill = json.isBackFill == true || json.isBackFill === "true" ? true : false;
|
|
130991
130783
|
const innerIdentifier = json.innerIdentifier || '';
|
|
130992
|
-
return new ImageNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null,
|
|
130784
|
+
return new ImageNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, _BaseNode__WEBPACK_IMPORTED_MODULE_4__/* .NodeType */ .Z6.ntImage, json.id, json.imageDataBase64String, width, height,
|
|
130993
130785
|
//scaleX,
|
|
130994
130786
|
//scaleY,
|
|
130995
130787
|
{
|
|
@@ -130999,7 +130791,7 @@ class ImageNode extends BaseNode/* BaseNode */.Yp {
|
|
|
130999
130791
|
}, json.markImage, json.imageJson);
|
|
131000
130792
|
}
|
|
131001
130793
|
getTagNameCn() {
|
|
131002
|
-
return /*#__PURE__*/(0,
|
|
130794
|
+
return /*#__PURE__*/(0,_i18n__WEBPACK_IMPORTED_MODULE_0__/* .i18nHelper */ .p)("04-001-009-EMR.3.3.344",null,"图片");
|
|
131003
130795
|
}
|
|
131004
130796
|
}
|
|
131005
130797
|
|
|
@@ -138266,8 +138058,6 @@ class TableNode extends _RectNode__WEBPACK_IMPORTED_MODULE_17__/* .RectNode */ .
|
|
|
138266
138058
|
mainCell.drawCell.needUpdate = true;
|
|
138267
138059
|
rowsSpanChangedCell.push(mainCell);
|
|
138268
138060
|
}
|
|
138269
|
-
//this.cellsMerge(mr, mc, mainCell.rowSpan, mainCell.colSpan);
|
|
138270
|
-
//set_ColSpan
|
|
138271
138061
|
}
|
|
138272
138062
|
}
|
|
138273
138063
|
c -= 1;
|
|
@@ -138283,7 +138073,6 @@ class TableNode extends _RectNode__WEBPACK_IMPORTED_MODULE_17__/* .RectNode */ .
|
|
|
138283
138073
|
rowProperty.withFormula = copyRowProperty.withFormula;
|
|
138284
138074
|
const rowsInfo = new RowInfos(this, rowProperty);
|
|
138285
138075
|
rowsInfo.rowHeight = this._rowInfos[copyIndex].rowHeight;
|
|
138286
|
-
//rowsInfo.heightFixed = this._rowInfos[copyIndex].heightFixed;
|
|
138287
138076
|
this._rowInfos.splice(r + i, 0, rowsInfo);
|
|
138288
138077
|
c = 0;
|
|
138289
138078
|
while (c < this._colCount) {
|
|
@@ -143503,11 +143292,11 @@ class TextInputFieldNode extends BaseCombineNode/* BaseCombineNode */.h {
|
|
|
143503
143292
|
this._childNodes2.length = 0;
|
|
143504
143293
|
const hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.O.instance().getFactory(this._hoEditorFactoryID);
|
|
143505
143294
|
const curStyleIndex = hoEditorFactory.docTree.curStyleIndex;
|
|
143506
|
-
const cbStyle = hoEditorFactory.docTree.styles[curStyleIndex].combineStyle;
|
|
143507
|
-
const dHeight = hoEditorFactory.getFontHeightByFontSize(cbStyle.size);
|
|
143508
|
-
const istart = Math.max(startIndex, 0);
|
|
143509
|
-
const iend = Math.min(endIndex, this.text.length - 1);
|
|
143510
|
-
const astyle = hoEditorFactory.docTree.styles[0];
|
|
143295
|
+
// const cbStyle = hoEditorFactory.docTree.styles[curStyleIndex].combineStyle;
|
|
143296
|
+
// const dHeight = hoEditorFactory.getFontHeightByFontSize(cbStyle.size);
|
|
143297
|
+
// const istart = Math.max(startIndex, 0);
|
|
143298
|
+
// const iend = Math.min(endIndex, this.text.length - 1);
|
|
143299
|
+
// const astyle = hoEditorFactory.docTree.styles[0];
|
|
143511
143300
|
const index = curStyleIndex;
|
|
143512
143301
|
// if (this.enableGlobalColor) {
|
|
143513
143302
|
// index = astyle.changeStyleString("fontBackColor", "transparent");
|
|
@@ -143532,6 +143321,17 @@ class TextInputFieldNode extends BaseCombineNode/* BaseCombineNode */.h {
|
|
|
143532
143321
|
}
|
|
143533
143322
|
this._childNodes.splice(1, 0, new TextNode/* TextNode */.E(this._hoEditorFactoryID, this.rootNodes, this, BaseNode/* NodeType */.Z6.ntText, this.text, index));
|
|
143534
143323
|
}
|
|
143324
|
+
// if(this.name == '现病史' || this.name == "请输入") {
|
|
143325
|
+
// console.log("++++++");
|
|
143326
|
+
// console.log(this.childNodes2);
|
|
143327
|
+
// console.log(this.childNodes);
|
|
143328
|
+
// console.log("++++++");
|
|
143329
|
+
// } else if(this.name == "辅助检查结果") {
|
|
143330
|
+
// console.log("------");
|
|
143331
|
+
// console.log(this.childNodes2);
|
|
143332
|
+
// console.log(this.childNodes);
|
|
143333
|
+
// console.log("------");
|
|
143334
|
+
// }
|
|
143535
143335
|
}
|
|
143536
143336
|
clearDrawNodes(startIndex, endIndex) {
|
|
143537
143337
|
this.childNodes.forEach((value, index) => {
|
|
@@ -144019,6 +143819,28 @@ class TextInputFieldNode extends BaseCombineNode/* BaseCombineNode */.h {
|
|
|
144019
143819
|
}
|
|
144020
143820
|
static json2Node(hoEditorFactoryID, json, rootNodes, pNode, isPaste, isClearSign) {
|
|
144021
143821
|
const hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.O.instance().getFactory(hoEditorFactoryID);
|
|
143822
|
+
// 兼容处理 批注内容删除时候 空文本域第二个节点丢失和类型错误问题
|
|
143823
|
+
// if(json.name == '现病史') {
|
|
143824
|
+
// console.log(json);
|
|
143825
|
+
// }
|
|
143826
|
+
// if(json.childNodes && Array.isArray(json.childNodes.node)) {
|
|
143827
|
+
// const nodes = json.childNodes.node;
|
|
143828
|
+
// if(nodes.length == 2 && nodes[0].nodeType == 'ntMark' && nodes[0].type == 0 && nodes[1].nodeType == 'ntMark' && nodes[1].type == 2) {
|
|
143829
|
+
// json.childNodes.node = [nodes[0], {
|
|
143830
|
+
// nodeType: 'ntMark',
|
|
143831
|
+
// type: "1",
|
|
143832
|
+
// text: json.name,
|
|
143833
|
+
// styleIndex: nodes[0].styleIndex
|
|
143834
|
+
// }, nodes[1]];
|
|
143835
|
+
// } else if(nodes.length == 3 && nodes[1].nodeType == 'ntMark' && nodes[1].type == 2 && nodes[2].nodeType == 'ntMark' && nodes[2].type == 2) {
|
|
143836
|
+
// json.childNodes.node = [nodes[0], {
|
|
143837
|
+
// nodeType: nodes[0].nodeType,
|
|
143838
|
+
// type: "1",
|
|
143839
|
+
// text: json.name,
|
|
143840
|
+
// styleIndex: nodes[0].styleIndex
|
|
143841
|
+
// }, nodes[2]];
|
|
143842
|
+
// }
|
|
143843
|
+
// }
|
|
144022
143844
|
let eachCount = 0;
|
|
144023
143845
|
let isErrorValid = false;
|
|
144024
143846
|
delete json.nodeType;
|
|
@@ -144051,24 +143873,13 @@ class TextInputFieldNode extends BaseCombineNode/* BaseCombineNode */.h {
|
|
|
144051
143873
|
json.valueArea = !json.valueArea ? "[]" : json.valueArea;
|
|
144052
143874
|
json.isElementLink = !json.isElementLink ? false : json.isElementLink;
|
|
144053
143875
|
const temp = new TextInputFieldNode(hoEditorFactoryID, rootNodes, pNode ? pNode : null, BaseNode/* NodeType */.Z6.ntField, json);
|
|
144054
|
-
// this.insertChild
|
|
144055
143876
|
if (json.childNodes) {
|
|
144056
143877
|
const nodes = new Array();
|
|
144057
143878
|
const getChildNodes = item => {
|
|
144058
|
-
// eachCount++;
|
|
144059
|
-
// if(json.name === '1-1') {
|
|
144060
|
-
// console.time(`1-1---${eachCount}`);
|
|
144061
|
-
// };
|
|
144062
143879
|
if (Array.isArray(item)) {
|
|
144063
143880
|
//数组
|
|
144064
143881
|
for (let i = 0; i < item.length; i++) {
|
|
144065
|
-
// if(json.name === '1-1' && item[i].name) {
|
|
144066
|
-
// console.time(`----${i}----1-1----${item[i].name}`);
|
|
144067
|
-
// };
|
|
144068
143882
|
const node = hoEditorFactory.structureConvert.convertNode(item[i], rootNodes, temp, undefined, undefined, isClearSign);
|
|
144069
|
-
// if(json.name === '1-1' && item[i].name) {
|
|
144070
|
-
// console.timeEnd(`----${i}----1-1----${item[i].name}`);
|
|
144071
|
-
// };
|
|
144072
143883
|
if (node) {
|
|
144073
143884
|
if (node instanceof TextNode/* TextNode */.E) {
|
|
144074
143885
|
if (node.text.length > [...node.text].length) {
|
|
@@ -144107,11 +143918,6 @@ class TextInputFieldNode extends BaseCombineNode/* BaseCombineNode */.h {
|
|
|
144107
143918
|
if (node instanceof MarkNode/* MarkNode */.y && node.MarkNodeType === MarkNode/* MarkNodeType */.g.mtEnd && node.text.substring(0, 1) === 'C') {
|
|
144108
143919
|
hoEditorFactory.structureConvert._markNodes.push(node);
|
|
144109
143920
|
}
|
|
144110
|
-
// if (node instanceof SignNode &&
|
|
144111
|
-
// ((node.imgSrc != "" && ((hoEditorFactory.superiorSigns.length > 0 && hoEditorFactory.superiorSigns.includes((node.customProperty as any).bce01)) || hoEditorFactory.forbidEditBeforeSign))
|
|
144112
|
-
// || hoEditorFactory.lockContent)) {
|
|
144113
|
-
// hoEditorFactory.structureConvert._superiorSign[0] = node;
|
|
144114
|
-
// }
|
|
144115
143921
|
}
|
|
144116
143922
|
} else {
|
|
144117
143923
|
//单个对象
|
|
@@ -144132,7 +143938,6 @@ class TextInputFieldNode extends BaseCombineNode/* BaseCombineNode */.h {
|
|
|
144132
143938
|
}
|
|
144133
143939
|
}
|
|
144134
143940
|
} else {
|
|
144135
|
-
//nodes.push(node);
|
|
144136
143941
|
if (isClearSign) {
|
|
144137
143942
|
if (node instanceof SignNode/* SignNode */.u) {
|
|
144138
143943
|
if (node.isTemplate && !(node.number == 0 && node.type == 0 && node.name == '')) {
|
|
@@ -144155,15 +143960,8 @@ class TextInputFieldNode extends BaseCombineNode/* BaseCombineNode */.h {
|
|
|
144155
143960
|
if (node instanceof MarkNode/* MarkNode */.y && node.MarkNodeType === MarkNode/* MarkNodeType */.g.mtEnd && node.text.substring(0, 1) === 'C') {
|
|
144156
143961
|
hoEditorFactory.structureConvert._markNodes.push(node);
|
|
144157
143962
|
}
|
|
144158
|
-
// if (node instanceof SignNode &&
|
|
144159
|
-
// ((node.imgSrc != "" && ((hoEditorFactory.superiorSigns.length > 0 && hoEditorFactory.superiorSigns.includes((node.customProperty as any).bce01)) || hoEditorFactory.forbidEditBeforeSign))
|
|
144160
|
-
// || hoEditorFactory.lockContent)) {
|
|
144161
|
-
// hoEditorFactory.structureConvert._superiorSign[0] = node;
|
|
144162
|
-
// }
|
|
144163
143963
|
}
|
|
144164
|
-
// if(json.name === '1-1') console.timeEnd(`1-1---${eachCount}`);
|
|
144165
143964
|
};
|
|
144166
|
-
// if(json.name === '1-1') console.time("1-1--0");
|
|
144167
143965
|
if (isPaste) {
|
|
144168
143966
|
if (json.childNodes.item) {
|
|
144169
143967
|
getChildNodes(json.childNodes.item);
|
|
@@ -144173,7 +143971,6 @@ class TextInputFieldNode extends BaseCombineNode/* BaseCombineNode */.h {
|
|
|
144173
143971
|
} else if (json.childNodes.node) {
|
|
144174
143972
|
getChildNodes(json.childNodes.node);
|
|
144175
143973
|
}
|
|
144176
|
-
// if(json.name === '1-1') console.timeEnd("1-1--0");
|
|
144177
143974
|
if (nodes.length > 0) {
|
|
144178
143975
|
if (nodes[0] instanceof MarkNode/* MarkNode */.y) {
|
|
144179
143976
|
temp.childNodes.length = 0;
|
|
@@ -144189,7 +143986,6 @@ class TextInputFieldNode extends BaseCombineNode/* BaseCombineNode */.h {
|
|
|
144189
143986
|
}
|
|
144190
143987
|
}
|
|
144191
143988
|
}
|
|
144192
|
-
//if (hoEditorFactory.drawTree.paintStatus === PaintState.psDesign) {
|
|
144193
143989
|
const sChildNode = temp.childNodes[0];
|
|
144194
143990
|
const eChildNode = temp.childNodes[temp.childNodes.length - 1];
|
|
144195
143991
|
if (!(sChildNode instanceof MarkNode/* MarkNode */.y) || sChildNode instanceof MarkNode/* MarkNode */.y && sChildNode.MarkNodeType !== MarkNode/* MarkNodeType */.g.mtStart) {
|
|
@@ -144201,7 +143997,6 @@ class TextInputFieldNode extends BaseCombineNode/* BaseCombineNode */.h {
|
|
|
144201
143997
|
if (temp.childNodes.length > 3 && temp.childNodes[1] instanceof MarkNode/* MarkNode */.y && temp.childNodes[1].MarkNodeType == MarkNode/* MarkNodeType */.g.mtContent) {
|
|
144202
143998
|
temp.childNodes.splice(1, 1);
|
|
144203
143999
|
}
|
|
144204
|
-
//}
|
|
144205
144000
|
if (temp.childNodes[1] instanceof TableFormula/* TableFormula */.d) {
|
|
144206
144001
|
return temp;
|
|
144207
144002
|
}
|
|
@@ -144216,9 +144011,6 @@ class TextInputFieldNode extends BaseCombineNode/* BaseCombineNode */.h {
|
|
|
144216
144011
|
if (childFields.length === 0 && !isErrorValid) {
|
|
144217
144012
|
//不嵌套 用text
|
|
144218
144013
|
const fieldText = temp.getFieldText();
|
|
144219
|
-
// if (temp.text === fieldText && temp.text.indexOf("\n") > 0) {
|
|
144220
|
-
// temp.text = temp.text.replaceAll("\n", "");
|
|
144221
|
-
// }
|
|
144222
144014
|
if (temp.text !== fieldText && (temp.inputFieldType == 0 || temp.inputFieldType == 1 && temp.readType == 1)) {
|
|
144223
144015
|
temp.childNodes.splice(1, temp.childNodes.length - 2);
|
|
144224
144016
|
const styleIndex = temp.childNodes[0].styleIndex;
|
|
@@ -146908,7 +146700,7 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
146908
146700
|
let nextDline = startIndex;
|
|
146909
146701
|
let dRestHeight = Infinity;
|
|
146910
146702
|
if (this.allowAcrossPage) dRestHeight = this._maxHeight - dTop;
|
|
146911
|
-
this.
|
|
146703
|
+
this.endDline = startIndex;
|
|
146912
146704
|
while (nextDline < dlines.length) {
|
|
146913
146705
|
const dline = dlines[nextDline];
|
|
146914
146706
|
const hidden = dline.paragraphNode.customProperty.hidden;
|
|
@@ -146918,7 +146710,7 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
146918
146710
|
continue;
|
|
146919
146711
|
}
|
|
146920
146712
|
if (dline.paragraphNode.printAsSinglePage && dline.paragraphNode.drawlines[0] === dline && dTop > 0) {
|
|
146921
|
-
this.
|
|
146713
|
+
this.endDline = nextDline - 1;
|
|
146922
146714
|
this.clearOverDitem(dlines, nextDline);
|
|
146923
146715
|
isFull = true;
|
|
146924
146716
|
bFinishedPaint = false;
|
|
@@ -146946,13 +146738,12 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
146946
146738
|
dline.drawPageTables.splice(index, dline.drawPageTables.length);
|
|
146947
146739
|
}
|
|
146948
146740
|
}
|
|
146949
|
-
this.
|
|
146741
|
+
this.endDline = nextDline - 1;
|
|
146950
146742
|
this.clearOverDitem(dlines, nextDline);
|
|
146951
146743
|
isFull = true;
|
|
146952
146744
|
bFinishedPaint = false;
|
|
146953
146745
|
break;
|
|
146954
146746
|
}
|
|
146955
|
-
// const pagePos = hoEditorFactory.drawTree.getDrawLinePagePos(dline);
|
|
146956
146747
|
if (dline instanceof _drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_7__/* .DrawTable */ .n) {
|
|
146957
146748
|
const dTable = dline;
|
|
146958
146749
|
let dPrevTable = null;
|
|
@@ -146980,6 +146771,7 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
146980
146771
|
2: 当前绘制表格高度超过了区域剩余高度
|
|
146981
146772
|
3: 当前表格不是表格的最后绘制表格,且剩余高度大于一行
|
|
146982
146773
|
*/
|
|
146774
|
+
|
|
146983
146775
|
if (dPageTable) {
|
|
146984
146776
|
if (dTable.needUpdate || dPageTable.dHeight - dRestHeight > _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_12__/* .gDefaultRowHeight */ .ip || dTable.drawPageTables.indexOf(dPageTable) < dTable.drawPageTables.length - 1 && restHeight > dPageTable.dHeight + hoEditorFactory.defaultLineHeight) {
|
|
146985
146777
|
const newTop = dTable.drawUpdate(this, dPrevTable, dTop, dRestHeight);
|
|
@@ -147016,7 +146808,7 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
147016
146808
|
}
|
|
147017
146809
|
}
|
|
147018
146810
|
if (dPageTable && (dPageTable.endRow < dPageTable.table.rowCount - 1 || !dPageTable.isEndRowFinished())) {
|
|
147019
|
-
this.
|
|
146811
|
+
this.endDline = nextDline;
|
|
147020
146812
|
if (dPageTable) this.lastDrawLine = dPageTable;
|
|
147021
146813
|
isFull = true;
|
|
147022
146814
|
bFinishedPaint = false;
|
|
@@ -147031,7 +146823,7 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
147031
146823
|
// if (dTable.drawPageTables.length > 0) {
|
|
147032
146824
|
// }
|
|
147033
146825
|
//如果当前表格未绘制完成,需要在下一页继续绘制、
|
|
147034
|
-
this.
|
|
146826
|
+
this.endDline = nextDline;
|
|
147035
146827
|
nextDline += 1;
|
|
147036
146828
|
continue;
|
|
147037
146829
|
} else {
|
|
@@ -147041,9 +146833,9 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
147041
146833
|
// console.log(lheight)
|
|
147042
146834
|
const canfit = this.canFit(dTop, dline.dHeight);
|
|
147043
146835
|
if (!canfit && this._allowAcrossPage) {
|
|
147044
|
-
this.
|
|
147045
|
-
if (this.
|
|
147046
|
-
this.
|
|
146836
|
+
this.endDline = nextDline - 1;
|
|
146837
|
+
if (this.endDline == -1) {
|
|
146838
|
+
this.endDline = -2;
|
|
147047
146839
|
}
|
|
147048
146840
|
this.clearOverDitem(dlines, nextDline);
|
|
147049
146841
|
isFull = true;
|
|
@@ -147070,7 +146862,7 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
147070
146862
|
this._docHeight = dTop;
|
|
147071
146863
|
this._usedHeight = dTop;
|
|
147072
146864
|
this._lastDrawLine = dline;
|
|
147073
|
-
this.
|
|
146865
|
+
this.endDline = nextDline;
|
|
147074
146866
|
ret += 1;
|
|
147075
146867
|
nextDline += 1;
|
|
147076
146868
|
}
|
|
@@ -147093,35 +146885,12 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
147093
146885
|
paintArea(dlines, startIndex, aTop //顶点
|
|
147094
146886
|
) {
|
|
147095
146887
|
const hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_11__/* .HOEditorFactorys */ .O.instance().getFactory(this._hoEditorFactoryID);
|
|
147096
|
-
// if (this.rootPath.startsWith("header")) {
|
|
147097
|
-
// console.log("drawheader.paintArea");
|
|
147098
|
-
// } else if (this.rootPath.startsWith("footer")) {
|
|
147099
|
-
// console.log("drawfooter.paintArea");
|
|
147100
|
-
// } else {
|
|
147101
|
-
// console.log("drawMainDoc.paintArea");
|
|
147102
|
-
// }
|
|
147103
|
-
// let isFull = false;
|
|
147104
|
-
// this.clearAfter(drawPage, dlines, startIndex);
|
|
147105
146888
|
this._docHeight = aTop;
|
|
147106
|
-
// if (aTop === 0) {
|
|
147107
|
-
// this._startDline = startIndex;
|
|
147108
|
-
// }
|
|
147109
146889
|
let ret = startIndex;
|
|
147110
146890
|
let isFull = false;
|
|
147111
|
-
// const dlineIter = this.listDrawLineByPathRange(
|
|
147112
|
-
// startIndex,
|
|
147113
|
-
// dlines.length - 1
|
|
147114
|
-
// );
|
|
147115
146891
|
let nextDline = startIndex;
|
|
147116
146892
|
let dTop = aTop;
|
|
147117
146893
|
this._changed = true;
|
|
147118
|
-
// if (this.drawLines.length > 0 && startIndex > 0) {
|
|
147119
|
-
// dTop =
|
|
147120
|
-
// this.drawLines[this.drawLines.length - 1].dTop +
|
|
147121
|
-
// this.drawLines[this.drawLines.length - 1].dHeight +
|
|
147122
|
-
// this.drawLines[this.drawLines.length - 1].paragraphNode.combineParagraph
|
|
147123
|
-
// .lineSpace;
|
|
147124
|
-
// }
|
|
147125
146894
|
let restHeight = Infinity;
|
|
147126
146895
|
if (this.allowAcrossPage) restHeight = this.maxHeight - dTop;
|
|
147127
146896
|
let mark = false;
|
|
@@ -147134,7 +146903,6 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
147134
146903
|
mark = true;
|
|
147135
146904
|
continue;
|
|
147136
146905
|
}
|
|
147137
|
-
// const pagePos = hoEditorFactory.drawTree.getDrawLinePagePos(dline);
|
|
147138
146906
|
if (dline instanceof _drawNode_DrawTable__WEBPACK_IMPORTED_MODULE_7__/* .DrawTable */ .n) {
|
|
147139
146907
|
const dTable = dline;
|
|
147140
146908
|
if (dTable.getHeadHeight() + _editor_dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_12__/* .gDefaultRowHeight */ .ip > restHeight || !dTable.isFirstRowCanFit(restHeight)) {
|
|
@@ -147154,60 +146922,20 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
147154
146922
|
if (dTable.isFinishedPaint()) {
|
|
147155
146923
|
nextDline += 1;
|
|
147156
146924
|
} else {
|
|
147157
|
-
this.
|
|
146925
|
+
this.endDline = nextDline;
|
|
147158
146926
|
isFull = true;
|
|
147159
146927
|
if (dPageTable) this._docHeight = dTop + dPageTable.dHeight;
|
|
147160
|
-
// + dline.paragraphNode.combineParagraph.lineSpace;
|
|
147161
146928
|
this.clearOverDitem(dlines, nextDline + 1);
|
|
147162
146929
|
break;
|
|
147163
146930
|
}
|
|
147164
|
-
// else {
|
|
147165
|
-
// const dPageTable = dTable.getDrawTableByParentArea(this);
|
|
147166
|
-
// if (!dPageTable) {
|
|
147167
|
-
// const [
|
|
147168
|
-
// nextArea,
|
|
147169
|
-
// nextPageIndex,
|
|
147170
|
-
// nextTop,
|
|
147171
|
-
// nextRestHeight,
|
|
147172
|
-
// ] = dTable.update(this, dTop, restHeight);
|
|
147173
|
-
// return nextArea.paintArea(
|
|
147174
|
-
// dlines,
|
|
147175
|
-
// nextPageIndex,
|
|
147176
|
-
// nextDline + 1,
|
|
147177
|
-
// nextTop
|
|
147178
|
-
// );
|
|
147179
|
-
// } else {
|
|
147180
|
-
// const [
|
|
147181
|
-
// nextArea,
|
|
147182
|
-
// nextPageIndex,
|
|
147183
|
-
// nextTop,
|
|
147184
|
-
// nextRestHeight,
|
|
147185
|
-
// ] = dPageTable.update(
|
|
147186
|
-
// this,
|
|
147187
|
-
// pageIndex,
|
|
147188
|
-
// dTop,
|
|
147189
|
-
// restHeight,
|
|
147190
|
-
// dPageTable.startRow
|
|
147191
|
-
// );
|
|
147192
|
-
// return nextArea.paintArea(
|
|
147193
|
-
// dlines,
|
|
147194
|
-
// nextPageIndex,
|
|
147195
|
-
// nextDline + 1,
|
|
147196
|
-
// nextTop
|
|
147197
|
-
// );
|
|
147198
|
-
// }
|
|
147199
|
-
// }
|
|
147200
146931
|
} else {
|
|
147201
146932
|
//页摆放不下,
|
|
147202
|
-
// const lheight = dTop +
|
|
147203
|
-
// dline.dHeight + dline.paragraphNode.combineParagraph.lineSpace;
|
|
147204
|
-
// console.log(lheight)
|
|
147205
146933
|
const canfit = this.canFit(dTop, dline.dHeight);
|
|
147206
146934
|
if (!canfit && (dTop > 0 || this instanceof _drawNode_DrawPageCell__WEBPACK_IMPORTED_MODULE_13__/* .DrawPageCell */ .M) && this._allowAcrossPage) {
|
|
147207
|
-
const nextArea = this.getNextDrawArea();
|
|
147208
|
-
this.
|
|
147209
|
-
if (this.
|
|
147210
|
-
this.
|
|
146935
|
+
// const nextArea = this.getNextDrawArea();
|
|
146936
|
+
this.endDline = nextDline - 1;
|
|
146937
|
+
if (this.endDline == -1) {
|
|
146938
|
+
this.endDline = -2;
|
|
147211
146939
|
}
|
|
147212
146940
|
isFull = true;
|
|
147213
146941
|
this._docHeight -= aTop;
|
|
@@ -147218,7 +146946,7 @@ class DrawArea extends _drawNode_DrawRect__WEBPACK_IMPORTED_MODULE_6__/* .DrawRe
|
|
|
147218
146946
|
if (this.numChildren == 1) {
|
|
147219
146947
|
this.topDline = dline;
|
|
147220
146948
|
}
|
|
147221
|
-
this.
|
|
146949
|
+
this.endDline = nextDline;
|
|
147222
146950
|
const cbParagraph = dline.paragraphNode.combineParagraph;
|
|
147223
146951
|
//dline.x = cbParagraph.leftMarginPixes;
|
|
147224
146952
|
dline.visible = canfit;
|
|
@@ -148169,11 +147897,13 @@ class DrawBarcodeNode extends _DrawCombineNode__WEBPACK_IMPORTED_MODULE_1__/* .D
|
|
|
148169
147897
|
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
148170
147898
|
/* harmony import */ var _yuki_createjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(56419);
|
|
148171
147899
|
/* harmony import */ var _yuki_createjs__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_yuki_createjs__WEBPACK_IMPORTED_MODULE_5__);
|
|
148172
|
-
/* harmony import */ var
|
|
147900
|
+
/* harmony import */ var _IDrawInfos__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(78139);
|
|
148173
147901
|
/* harmony import */ var _DrawPageCell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(51613);
|
|
148174
147902
|
/* harmony import */ var _DrawRect__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(60030);
|
|
148175
147903
|
/* harmony import */ var _editor_dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40504);
|
|
148176
147904
|
/* harmony import */ var _editor_dom_TableProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(10432);
|
|
147905
|
+
/* harmony import */ var _DrawImageNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(90479);
|
|
147906
|
+
|
|
148177
147907
|
|
|
148178
147908
|
|
|
148179
147909
|
|
|
@@ -148272,7 +148002,7 @@ class DrawCell extends _DrawRect__WEBPACK_IMPORTED_MODULE_7__/* .DrawRect */ .N
|
|
|
148272
148002
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(this, "_needUpdate", void 0);
|
|
148273
148003
|
this._node = cellNode;
|
|
148274
148004
|
this._hoEditorFactoryID = hoEditorFactoryID;
|
|
148275
|
-
this._discriminator =
|
|
148005
|
+
this._discriminator = _IDrawInfos__WEBPACK_IMPORTED_MODULE_11__/* .gDrawIntfID */ .c;
|
|
148276
148006
|
this._cell = cellNode;
|
|
148277
148007
|
this._dHeight = dHeight;
|
|
148278
148008
|
this._dWidth = dWidth;
|
|
@@ -148366,18 +148096,24 @@ class DrawCell extends _DrawRect__WEBPACK_IMPORTED_MODULE_7__/* .DrawRect */ .N
|
|
|
148366
148096
|
return null;
|
|
148367
148097
|
}
|
|
148368
148098
|
paintCell(dParent, dTop, dHeight, maxHeight, startDline) {
|
|
148369
|
-
// let ret = 0;
|
|
148370
148099
|
const [aleft, awidth] = this._cell.getLeftWidth();
|
|
148371
148100
|
this._dWidth = awidth;
|
|
148372
148101
|
let valignTop = 0;
|
|
148373
148102
|
if (startDline === 0) {
|
|
148374
148103
|
const aHeight = this._cell.drawCell.calcCellHeight();
|
|
148375
|
-
const
|
|
148104
|
+
const cellMaxHeight = Math.min(maxHeight, aHeight);
|
|
148376
148105
|
if (this._cell.cellProperty.align === _editor_dom_TableProperty__WEBPACK_IMPORTED_MODULE_9__/* .VAlign */ .gy.vatop) {
|
|
148377
|
-
|
|
148378
|
-
|
|
148379
|
-
|
|
148106
|
+
const drawLines = this._cell.drawCell.drawLines;
|
|
148107
|
+
if (drawLines.length == 1 && drawLines[0].children.length == 1 && drawLines[0].children[0] instanceof _DrawImageNode__WEBPACK_IMPORTED_MODULE_10__/* .DrawImageNode */ .I) {
|
|
148108
|
+
// ---去掉靠上对齐时候顶上1像素留白导致单元格插入的图片卡死问题---
|
|
148109
|
+
valignTop = 0;
|
|
148110
|
+
} else {
|
|
148111
|
+
valignTop = 1;
|
|
148112
|
+
}
|
|
148113
|
+
} else if (this._cell.cellProperty.align === _editor_dom_TableProperty__WEBPACK_IMPORTED_MODULE_9__/* .VAlign */ .gy.vacenter && cellMaxHeight > this._cell.drawCell.docHeight) {
|
|
148114
|
+
valignTop = (cellMaxHeight - this._cell.drawCell.docHeight) / 2;
|
|
148380
148115
|
} else if (this._cell.cellProperty.align === _editor_dom_TableProperty__WEBPACK_IMPORTED_MODULE_9__/* .VAlign */ .gy.vabottom && aHeight > this._cell.drawCell.docHeight) {
|
|
148116
|
+
// aHeight不准确影响靠下对齐判断
|
|
148381
148117
|
valignTop = aHeight - this._cell.drawCell.docHeight;
|
|
148382
148118
|
}
|
|
148383
148119
|
}
|
|
@@ -149085,6 +148821,197 @@ class DrawDownListNode extends _DrawCombineNode__WEBPACK_IMPORTED_MODULE_3__/* .
|
|
|
149085
148821
|
|
|
149086
148822
|
/***/ }),
|
|
149087
148823
|
|
|
148824
|
+
/***/ 90479:
|
|
148825
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
148826
|
+
|
|
148827
|
+
"use strict";
|
|
148828
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
148829
|
+
/* harmony export */ I: function() { return /* binding */ DrawImageNode; }
|
|
148830
|
+
/* harmony export */ });
|
|
148831
|
+
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32356);
|
|
148832
|
+
/* harmony import */ var _yuki_createjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56419);
|
|
148833
|
+
/* harmony import */ var _yuki_createjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_yuki_createjs__WEBPACK_IMPORTED_MODULE_1__);
|
|
148834
|
+
/* harmony import */ var _DrawCombineNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10431);
|
|
148835
|
+
/* harmony import */ var _DrawResize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36883);
|
|
148836
|
+
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57703);
|
|
148837
|
+
/* harmony import */ var _editor_SubDocManger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63942);
|
|
148838
|
+
/* harmony import */ var _editor_events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3530);
|
|
148839
|
+
/* harmony import */ var _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(86247);
|
|
148840
|
+
/* harmony import */ var _SelectRange__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(49576);
|
|
148841
|
+
|
|
148842
|
+
/*
|
|
148843
|
+
* @Author: your name
|
|
148844
|
+
* @Date: 2020-11-11 11:04:19
|
|
148845
|
+
* @LastEditTime: 2024-02-04 10:59:15
|
|
148846
|
+
* @LastEditors: liyanan 2441631434@qq.com
|
|
148847
|
+
* @Description: In User Settings Edit
|
|
148848
|
+
* @FilePath: \hoeditor-web\src\editor\draw\drawNode\DrawImageNode.ts
|
|
148849
|
+
*/
|
|
148850
|
+
|
|
148851
|
+
|
|
148852
|
+
|
|
148853
|
+
|
|
148854
|
+
|
|
148855
|
+
|
|
148856
|
+
|
|
148857
|
+
|
|
148858
|
+
class DrawImageNode extends _DrawCombineNode__WEBPACK_IMPORTED_MODULE_2__/* .DrawCombineNode */ .A {
|
|
148859
|
+
constructor(hoeditfactoryID, rootPath, node, index, imagePath, dWidth, dHeight,
|
|
148860
|
+
//scaleX: number,
|
|
148861
|
+
//scaleY: number
|
|
148862
|
+
markImagePath) {
|
|
148863
|
+
super(hoeditfactoryID, rootPath, node, index);
|
|
148864
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(this, "_imagePath", void 0);
|
|
148865
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(this, "_markImagePath", void 0);
|
|
148866
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(this, "_scaleX", void 0);
|
|
148867
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(this, "_scaleY", void 0);
|
|
148868
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(this, "_imageY", void 0);
|
|
148869
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(this, "_drawResize", void 0);
|
|
148870
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(this, "_id", void 0);
|
|
148871
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(this, "_bitMap", void 0);
|
|
148872
|
+
const hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_4__/* .HOEditorFactorys */ .O.instance().getFactory(hoeditfactoryID);
|
|
148873
|
+
const bounds = hoEditorFactory.vueController.getMainBounds(dWidth, dHeight);
|
|
148874
|
+
this.dWidth = Number(bounds.imageWidth);
|
|
148875
|
+
this.dHeight = Number(bounds.imageHeight);
|
|
148876
|
+
this._imagePath = imagePath;
|
|
148877
|
+
this._markImagePath = markImagePath;
|
|
148878
|
+
this._imageY = -this.dHeight;
|
|
148879
|
+
this.insertImage();
|
|
148880
|
+
this._drawResize = new _DrawResize__WEBPACK_IMPORTED_MODULE_3__/* .DrawResize */ .z(hoeditfactoryID, this.node, this, this._imageY);
|
|
148881
|
+
}
|
|
148882
|
+
get markImagePath() {
|
|
148883
|
+
return this._markImagePath;
|
|
148884
|
+
}
|
|
148885
|
+
get imagePath() {
|
|
148886
|
+
return this._imagePath;
|
|
148887
|
+
}
|
|
148888
|
+
get drawResize() {
|
|
148889
|
+
return this._drawResize;
|
|
148890
|
+
}
|
|
148891
|
+
insertImage() {
|
|
148892
|
+
const drawNode = this;
|
|
148893
|
+
const image = new Image();
|
|
148894
|
+
// const markImage = new Image();
|
|
148895
|
+
// let markImageBitmap!: createjs.Bitmap;
|
|
148896
|
+
image.src = this.imagePath;
|
|
148897
|
+
this._bitMap = new createjs.Bitmap(image);
|
|
148898
|
+
const hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_4__/* .HOEditorFactorys */ .O.instance().getFactory(drawNode.node.hoEditorFactoryID);
|
|
148899
|
+
this._bitMap.y = this._imageY;
|
|
148900
|
+
this._bitMap.x = 0;
|
|
148901
|
+
this._bitMap.name = this.node.id;
|
|
148902
|
+
this._bitMap.setBounds(0, 0, drawNode.dWidth, drawNode.dHeight);
|
|
148903
|
+
hoEditorFactory.loadImageCount++;
|
|
148904
|
+
this.addChild(this._bitMap);
|
|
148905
|
+
image.onload = () => {
|
|
148906
|
+
const hitWidth = image.naturalWidth !== 0 ? image.naturalWidth : image.width;
|
|
148907
|
+
const hitHeight = image.naturalHeight !== 0 ? image.naturalHeight : image.height;
|
|
148908
|
+
this._bitMap.setTransform(0, drawNode._imageY, drawNode.dWidth / hitWidth, drawNode.dHeight / hitHeight);
|
|
148909
|
+
this._bitMap.setBounds(0, 0, image.naturalWidth, image.naturalHeight);
|
|
148910
|
+
const hitArea = new createjs.Shape();
|
|
148911
|
+
hitArea.graphics.beginFill('#000').drawRect(0, 0, hitWidth, hitHeight);
|
|
148912
|
+
this._bitMap.hitArea = hitArea;
|
|
148913
|
+
// 压缩页眉中的图片
|
|
148914
|
+
if (this.node.rootPath.includes('header') || this.node.rootPath.includes('footer')) {
|
|
148915
|
+
const canvas = document.createElement('canvas');
|
|
148916
|
+
const ctx = canvas.getContext('2d');
|
|
148917
|
+
canvas.width = this.dWidth * 2;
|
|
148918
|
+
canvas.height = this.dHeight * 2;
|
|
148919
|
+
canvas.style.width = this.dWidth + 'px';
|
|
148920
|
+
canvas.style.height = this.dHeight + 'px';
|
|
148921
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
148922
|
+
ctx.fillStyle = '#FFFFFF';
|
|
148923
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
148924
|
+
ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
|
|
148925
|
+
const base64 = canvas.toDataURL('image/jpeg', 0.92);
|
|
148926
|
+
if (base64 < this.node.imageDataBase64String) {
|
|
148927
|
+
this.node.imageDataBase64String = base64;
|
|
148928
|
+
}
|
|
148929
|
+
}
|
|
148930
|
+
this.updateSign();
|
|
148931
|
+
hoEditorFactory.loadImageCount--;
|
|
148932
|
+
};
|
|
148933
|
+
if (this.markImagePath != '') {
|
|
148934
|
+
this.insertMarkImage();
|
|
148935
|
+
}
|
|
148936
|
+
image.onerror = () => {
|
|
148937
|
+
hoEditorFactory.loadImageCount--;
|
|
148938
|
+
if (!drawNode.node.isBackFill) {
|
|
148939
|
+
const path = this.node.previousLeaf().getNodePath();
|
|
148940
|
+
hoEditorFactory.docTree.deleteNode(this.node);
|
|
148941
|
+
const changeEvent = new _editor_events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_6__/* .NodeChangeEvent */ .b(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_7__/* .DocAction */ .LC.daModifyStyle, path, path);
|
|
148942
|
+
changeEvent.oldEndPath = path;
|
|
148943
|
+
changeEvent.afterChangePath = path;
|
|
148944
|
+
changeEvent.oldDrawLines = new _SelectRange__WEBPACK_IMPORTED_MODULE_8__/* .SelectRange */ .u(this._hoEditorFactoryID).getRangeDrawLines(path, path, true, true);
|
|
148945
|
+
hoEditorFactory.docTree.change(changeEvent);
|
|
148946
|
+
}
|
|
148947
|
+
};
|
|
148948
|
+
}
|
|
148949
|
+
insertMarkImage() {
|
|
148950
|
+
const drawNode = this;
|
|
148951
|
+
const hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_4__/* .HOEditorFactorys */ .O.instance().getFactory(drawNode.node.hoEditorFactoryID);
|
|
148952
|
+
const markImage = new Image();
|
|
148953
|
+
let markImageBitmap;
|
|
148954
|
+
markImage.src = this.markImagePath;
|
|
148955
|
+
hoEditorFactory.loadImageCount++;
|
|
148956
|
+
markImageBitmap = new createjs.Bitmap(markImage);
|
|
148957
|
+
//markImageBitmap.y = this._imageY;
|
|
148958
|
+
//markImageBitmap.x = 0;
|
|
148959
|
+
markImageBitmap.name = this.node.id;
|
|
148960
|
+
markImageBitmap.setBounds(0, 0, drawNode.dWidth, drawNode.dHeight);
|
|
148961
|
+
drawNode.addChild(markImageBitmap);
|
|
148962
|
+
//hoEditorFactory.loadImageCount++;
|
|
148963
|
+
markImage.onload = () => {
|
|
148964
|
+
markImageBitmap.x = 0;
|
|
148965
|
+
markImageBitmap.y = 0;
|
|
148966
|
+
const hitWidth = markImage.naturalWidth !== 0 ? markImage.naturalWidth : markImage.width;
|
|
148967
|
+
const hitHeight = markImage.naturalHeight !== 0 ? markImage.naturalHeight : markImage.height;
|
|
148968
|
+
markImageBitmap.setTransform(0, drawNode._imageY, drawNode.dWidth / hitWidth, drawNode.dHeight / hitHeight);
|
|
148969
|
+
const hitArea = new createjs.Shape();
|
|
148970
|
+
hitArea.graphics.beginFill('#000000').drawRect(0, 0, hitWidth, hitHeight);
|
|
148971
|
+
this.updateSign();
|
|
148972
|
+
hoEditorFactory.loadImageCount--;
|
|
148973
|
+
};
|
|
148974
|
+
markImage.onerror = () => {
|
|
148975
|
+
hoEditorFactory.loadImageCount--;
|
|
148976
|
+
const path = this.node.previousLeaf().getNodePath();
|
|
148977
|
+
hoEditorFactory.docTree.deleteNode(this.node);
|
|
148978
|
+
const changeEvent = new _editor_events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_6__/* .NodeChangeEvent */ .b(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_7__/* .DocAction */ .LC.daModifyStyle, path, path);
|
|
148979
|
+
changeEvent.oldEndPath = path;
|
|
148980
|
+
changeEvent.afterChangePath = path;
|
|
148981
|
+
changeEvent.oldDrawLines = new _SelectRange__WEBPACK_IMPORTED_MODULE_8__/* .SelectRange */ .u(this._hoEditorFactoryID).getRangeDrawLines(path, path, true, true);
|
|
148982
|
+
hoEditorFactory.docTree.change(changeEvent);
|
|
148983
|
+
};
|
|
148984
|
+
}
|
|
148985
|
+
updateSign() {
|
|
148986
|
+
const hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_4__/* .HOEditorFactorys */ .O.instance().getFactory(this.node.hoEditorFactoryID);
|
|
148987
|
+
const dArea = hoEditorFactory.drawPageTree.getMainRootArea(this);
|
|
148988
|
+
if (dArea && hoEditorFactory.drawTree.drawPages[dArea.index]) {
|
|
148989
|
+
const atype = hoEditorFactory.subDocManger.getHeaderFooterType(this.node.getNodePath());
|
|
148990
|
+
if (atype === _editor_SubDocManger__WEBPACK_IMPORTED_MODULE_5__/* .HeaderFooterType */ .lr.hftHead && dArea != hoEditorFactory.drawTree.drawPages[dArea.index].drawHeader) {
|
|
148991
|
+
hoEditorFactory.subDocManger.updateAllSameSubDoc(dArea.index, atype, false, false);
|
|
148992
|
+
} else {
|
|
148993
|
+
if (atype === _editor_SubDocManger__WEBPACK_IMPORTED_MODULE_5__/* .HeaderFooterType */ .lr.hftFoot && dArea != hoEditorFactory.drawTree.drawPages[dArea.index].drawFooter) {
|
|
148994
|
+
hoEditorFactory.subDocManger.updateAllSameSubDoc(dArea.index, atype, false, false);
|
|
148995
|
+
}
|
|
148996
|
+
}
|
|
148997
|
+
hoEditorFactory.drawPageTree.updateDrawPage(dArea.index);
|
|
148998
|
+
}
|
|
148999
|
+
}
|
|
149000
|
+
clone() {
|
|
149001
|
+
const aConTainer = new createjs.Container();
|
|
149002
|
+
const bitMap = this._bitMap.clone();
|
|
149003
|
+
bitMap.name = this.node.id;
|
|
149004
|
+
if (this._cloneProps) {
|
|
149005
|
+
this._cloneProps(aConTainer);
|
|
149006
|
+
}
|
|
149007
|
+
aConTainer.removeAllChildren();
|
|
149008
|
+
aConTainer.addChild(bitMap);
|
|
149009
|
+
return aConTainer;
|
|
149010
|
+
}
|
|
149011
|
+
}
|
|
149012
|
+
|
|
149013
|
+
/***/ }),
|
|
149014
|
+
|
|
149088
149015
|
/***/ 51389:
|
|
149089
149016
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
149090
149017
|
|
|
@@ -150316,81 +150243,45 @@ class DrawPageCell extends DrawArea/* DrawArea */.y {
|
|
|
150316
150243
|
this._leftLine = new createjs.Shape();
|
|
150317
150244
|
this._rightLine = new createjs.Shape();
|
|
150318
150245
|
this._touchArea = new createjs.Shape();
|
|
150319
|
-
// this._pageIndex = pageIndex;
|
|
150320
|
-
// this._dPage = dPage;
|
|
150321
150246
|
this._node = cellNode;
|
|
150322
150247
|
this._cell = cellNode;
|
|
150323
150248
|
this._startDline = startLine;
|
|
150324
150249
|
this._endDline = startLine;
|
|
150325
150250
|
this._dWidth = dWidth;
|
|
150326
150251
|
this._maxHeight = dMaxHeight;
|
|
150327
|
-
// ((this as unknown) as DrawInfos).dWidth = dWidth;
|
|
150328
150252
|
this._dHeight = dHeight;
|
|
150329
|
-
// ((this as unknown) as DrawInfos).dHeight = dWidth;
|
|
150330
150253
|
this._discriminator = IDrawInfos/* gDrawIntfID */.c;
|
|
150331
|
-
//this._marker = new createjs.Shape();
|
|
150332
|
-
// this._topBorder = new createjs.Rectangle(dLeft, dTop, dWidth, 2);
|
|
150333
|
-
// this._leftBorder = new createjs.Rectangle(dLeft, dTop, 2, dHeight);
|
|
150334
|
-
// this._rightBorder = new createjs.Rectangle(
|
|
150335
|
-
// dLeft + dWidth - 2,
|
|
150336
|
-
// dTop,canjustRowHeight
|
|
150337
|
-
// 2,
|
|
150338
|
-
// dHeight
|
|
150339
|
-
// );
|
|
150340
|
-
// this._bottomBorder = new createjs.Rectangle(
|
|
150341
|
-
// dLeft,
|
|
150342
|
-
// dTop + dHeight - 2,
|
|
150343
|
-
// dWidth,
|
|
150344
|
-
// 2
|
|
150345
|
-
// );
|
|
150346
150254
|
let innerTop = 0;
|
|
150255
|
+
const hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.O.instance().getFactory(this._hoEditorFactoryID);
|
|
150347
150256
|
if (this._cell.drawCell.drawPageCells.length == 0) {
|
|
150348
|
-
innerTop =
|
|
150257
|
+
innerTop = hoEditorFactory.unitConvert.mmConversionPx(this._cell.cellProperty.cellInnerMargin[0] * 10, true);
|
|
150258
|
+
}
|
|
150259
|
+
if (paintImidiate === undefined || paintImidiate) {
|
|
150260
|
+
this.paintArea(this._cell.drawCell.drawLines, startLine, innerTop);
|
|
150349
150261
|
}
|
|
150350
|
-
if (paintImidiate === undefined || paintImidiate) this.paintArea(this._cell.drawCell.drawLines, startLine, innerTop);
|
|
150351
150262
|
const rowIndex = this._cell.table.rows.indexOf(this._cell.row);
|
|
150352
150263
|
const colIndex = this._cell.row.indexOf(this._cell);
|
|
150353
150264
|
this._valignTop = innerTop;
|
|
150354
|
-
// let maxWidth = 0;
|
|
150355
|
-
// let maxHeight = 0;
|
|
150356
|
-
// if (colIndex + this._cell.colSpan - 1 === this._cell.table.colCount - 1) {
|
|
150357
|
-
// maxWidth = -1;
|
|
150358
|
-
// } else {
|
|
150359
|
-
// maxWidth =
|
|
150360
|
-
// this._dWidth +
|
|
150361
|
-
// this._cell.table.colInfos[colIndex + this._cell.colSpan - 1].colWidth -
|
|
150362
|
-
// 10;
|
|
150363
|
-
// }
|
|
150364
|
-
// if (rowIndex + this._cell.rowSpan - 1 === this._cell.table.rowCount - 1) {
|
|
150365
|
-
// maxHeight = -1;
|
|
150366
|
-
// } else {
|
|
150367
|
-
// maxHeight =
|
|
150368
|
-
// this._dHeight +
|
|
150369
|
-
// this._cell.table.rowInfos[rowIndex + this._cell.rowSpan - 1].rowHeight -
|
|
150370
|
-
// gLineHeight;
|
|
150371
|
-
// }
|
|
150372
150265
|
/**
|
|
150373
150266
|
* 表格较多时此处占用内存较大 待优化
|
|
150374
150267
|
*/
|
|
150375
|
-
const
|
|
150376
|
-
|
|
150268
|
+
const {
|
|
150269
|
+
canAdjustRowHeight,
|
|
150270
|
+
canAdjustRowWidth
|
|
150271
|
+
} = this._cell.table.tableProperty;
|
|
150272
|
+
const paintStatus = hoEditorFactory.drawTree.paintStatus;
|
|
150273
|
+
if (paintStatus === DrawTree/* PaintState */.ak.psEdit && (canAdjustRowHeight || canAdjustRowWidth) || paintStatus === DrawTree/* PaintState */.ak.psDesign) {
|
|
150377
150274
|
this._ResizeObj = new ResizeDrawTableObj(this._hoEditorFactoryID, this._cell, this._touchArea, rowIndex, colIndex);
|
|
150378
150275
|
}
|
|
150379
150276
|
// this.paintBackground();
|
|
150380
150277
|
// this.paintFrontGround();
|
|
150381
150278
|
}
|
|
150382
|
-
// public get restHeight() {
|
|
150383
|
-
// return this._maxHeight - this._docHeight;
|
|
150384
|
-
// }
|
|
150385
150279
|
get dWidth() {
|
|
150386
150280
|
return this._dWidth;
|
|
150387
150281
|
}
|
|
150388
150282
|
set dWidth(value) {
|
|
150389
150283
|
if (value !== this._dWidth) {
|
|
150390
150284
|
this._dWidth = value;
|
|
150391
|
-
// this._topBorder.width = value;
|
|
150392
|
-
// this._bottomBorder.width = value;
|
|
150393
|
-
// this._rightBorder.x = this._dLeft + this._dWidth - 2;
|
|
150394
150285
|
}
|
|
150395
150286
|
}
|
|
150396
150287
|
get dHeight() {
|
|
@@ -150399,25 +150290,12 @@ class DrawPageCell extends DrawArea/* DrawArea */.y {
|
|
|
150399
150290
|
set dHeight(value) {
|
|
150400
150291
|
if (value !== this._dHeight) {
|
|
150401
150292
|
this._dHeight = value;
|
|
150402
|
-
// this._leftBorder.height = value;
|
|
150403
|
-
// this._rightBorder.height = value;
|
|
150404
|
-
// this._bottomBorder.y = this._dTop + this._dHeight - 2;
|
|
150405
150293
|
}
|
|
150406
150294
|
}
|
|
150407
150295
|
updateCrossShap() {
|
|
150408
150296
|
if (this._cell.cellProperty.obliqueSplitLine === TableProperty/* ObliqueSplitLine */.ST.None) {
|
|
150409
|
-
// if (this._crossShape && this.contains(this._crossShape)) {
|
|
150410
|
-
// this.removeChild(this._crossShape);
|
|
150411
|
-
// }
|
|
150412
|
-
// this._crossShape = null;
|
|
150413
150297
|
return;
|
|
150414
150298
|
} else {
|
|
150415
|
-
// if (!this._crossShape) {
|
|
150416
|
-
// this._crossShape = new createjs.Shape();
|
|
150417
|
-
// }
|
|
150418
|
-
// this._crossShape.graphics.clear();
|
|
150419
|
-
// this._crossShape.x = 0;
|
|
150420
|
-
// this._crossShape.y = 0;
|
|
150421
150299
|
this._backImg.graphics.clear().setStrokeStyle(1);
|
|
150422
150300
|
this._backImg.graphics.beginStroke("#000000");
|
|
150423
150301
|
/*表格边框与边编码,角的编码是0、1、2、3 边的编码是ABCD
|
|
@@ -150485,36 +150363,17 @@ class DrawPageCell extends DrawArea/* DrawArea */.y {
|
|
|
150485
150363
|
}
|
|
150486
150364
|
this._backImg.graphics.endStroke();
|
|
150487
150365
|
}
|
|
150488
|
-
// if (this._crossShape && !this.contains(this._crossShape)) {
|
|
150489
|
-
// this.addChildAt(this._crossShape, 1);
|
|
150490
|
-
// }
|
|
150491
150366
|
}
|
|
150492
150367
|
isFinishedPaint() {
|
|
150493
150368
|
let ret = false;
|
|
150494
150369
|
const index = this._endDline;
|
|
150495
|
-
// if (this._drawLines.length === 0) {
|
|
150496
|
-
// return true;
|
|
150497
|
-
// }
|
|
150498
150370
|
if (this._startDline >= this.cell.drawCell.drawLines.length || index == -1) {
|
|
150499
150371
|
return true;
|
|
150500
150372
|
}
|
|
150501
|
-
// if (this._lastDrawLine instanceof DrawPageTable) {
|
|
150502
|
-
// index = this._cell.drawCell.drawLines.indexOf(
|
|
150503
|
-
// (this._lastDrawLine as DrawPageTable).table.drawTable
|
|
150504
|
-
// );
|
|
150505
|
-
// } else {
|
|
150506
|
-
// index = this._cell.drawCell.drawLines.indexOf(
|
|
150507
|
-
// this._lastDrawLine as DrawLine
|
|
150508
|
-
// );
|
|
150509
|
-
// }
|
|
150510
150373
|
if (index == this._cell.drawCell.drawLines.length - 1) {
|
|
150511
150374
|
const endDline = this._cell.drawCell.drawLines[index];
|
|
150512
150375
|
if (endDline instanceof DrawPageTable/* DrawPageTable */.Yt) {
|
|
150513
150376
|
ret = endDline.isEndRowFinished();
|
|
150514
|
-
// (this
|
|
150515
|
-
// ._lastDrawLine as DrawPageTable).table.drawTable.isFinishedPaint(
|
|
150516
|
-
// this.drawPageTable.pageIndex
|
|
150517
|
-
// );
|
|
150518
150377
|
} else {
|
|
150519
150378
|
ret = true;
|
|
150520
150379
|
}
|
|
@@ -150584,11 +150443,9 @@ class DrawPageCell extends DrawArea/* DrawArea */.y {
|
|
|
150584
150443
|
}
|
|
150585
150444
|
}
|
|
150586
150445
|
startPaintBackGround() {
|
|
150587
|
-
//this._backImg.uncache();
|
|
150588
150446
|
this._backImg.graphics.clear();
|
|
150589
150447
|
}
|
|
150590
150448
|
endPaintBackGround(newHeight) {
|
|
150591
|
-
//this._backImg.cache(-1, -1, this._dWidth + 1, newHeight + 1);
|
|
150592
150449
|
this._backImg.graphics.endStroke();
|
|
150593
150450
|
}
|
|
150594
150451
|
paintMarker(color) {
|
|
@@ -150816,9 +150673,10 @@ class DrawPageCell extends DrawArea/* DrawArea */.y {
|
|
|
150816
150673
|
this.setChildIndex(this._backImg, 0);
|
|
150817
150674
|
}
|
|
150818
150675
|
this.paintCellBorders(newHeight, r, c);
|
|
150819
|
-
if (this._cell.needPaintLineGrid())
|
|
150676
|
+
if (this._cell.needPaintLineGrid()) {
|
|
150677
|
+
this.paintLineGrid();
|
|
150678
|
+
}
|
|
150820
150679
|
this.setBounds(0, 0, this._dWidth, newHeight);
|
|
150821
|
-
// this._backImg.cache(0, 0, this._dWidth, newHeight);
|
|
150822
150680
|
}
|
|
150823
150681
|
paintLineGrid() {
|
|
150824
150682
|
if (this._cell.drawCell.drawLines.length == 0) {
|
|
@@ -152246,9 +152104,6 @@ class DrawPageTable extends _DrawRect__WEBPACK_IMPORTED_MODULE_12__/* .DrawRect
|
|
|
152246
152104
|
*/
|
|
152247
152105
|
drawUpdate(prevdPageTable, dRestHeight) {
|
|
152248
152106
|
const hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_9__/* .HOEditorFactorys */ .O.instance().getFactory(this.table.hoEditorFactoryID);
|
|
152249
|
-
// if (this.table.tableProperty.fixedOnePage) {
|
|
152250
|
-
// dRestHeight = Infinity;
|
|
152251
|
-
// }
|
|
152252
152107
|
let pageRestHeight = dRestHeight;
|
|
152253
152108
|
let rowTop = 0;
|
|
152254
152109
|
const index = this._table.drawTable.drawPageTables.indexOf(this);
|
|
@@ -152268,7 +152123,9 @@ class DrawPageTable extends _DrawRect__WEBPACK_IMPORTED_MODULE_12__/* .DrawRect
|
|
|
152268
152123
|
let startRow = this._startRow;
|
|
152269
152124
|
let bStartRowFinished = true;
|
|
152270
152125
|
if (prevdPageTable) {
|
|
152271
|
-
if (prevdPageTable.isEndRowFinished())
|
|
152126
|
+
if (prevdPageTable.isEndRowFinished()) {
|
|
152127
|
+
startRow = prevdPageTable._endRow + 1;
|
|
152128
|
+
} else {
|
|
152272
152129
|
startRow = prevdPageTable._endRow;
|
|
152273
152130
|
bStartRowFinished = false;
|
|
152274
152131
|
}
|
|
@@ -152276,7 +152133,6 @@ class DrawPageTable extends _DrawRect__WEBPACK_IMPORTED_MODULE_12__/* .DrawRect
|
|
|
152276
152133
|
}
|
|
152277
152134
|
this._startRow = startRow;
|
|
152278
152135
|
let rowRestHeight = 0;
|
|
152279
|
-
const oldEndRow = this._endRow;
|
|
152280
152136
|
let bRowHeightChanged = false;
|
|
152281
152137
|
let rowHeight = 0;
|
|
152282
152138
|
this._endRow = this._startRow;
|
|
@@ -152291,7 +152147,7 @@ class DrawPageTable extends _DrawRect__WEBPACK_IMPORTED_MODULE_12__/* .DrawRect
|
|
|
152291
152147
|
this.removeDrawCellAfterRow(r);
|
|
152292
152148
|
break;
|
|
152293
152149
|
}
|
|
152294
|
-
if (pageRestHeight
|
|
152150
|
+
if (pageRestHeight <= this._table.drawTable.getRowStartLineMaxHeight(r)) {
|
|
152295
152151
|
this.removeDrawCellAfterRow(r);
|
|
152296
152152
|
break;
|
|
152297
152153
|
}
|
|
@@ -154093,8 +153949,11 @@ class DrawTable extends _DrawRect__WEBPACK_IMPORTED_MODULE_10__/* .DrawRect */ .
|
|
|
154093
153949
|
let rowTop = 0;
|
|
154094
153950
|
let isEndRowFinished = false;
|
|
154095
153951
|
if (dPageTable) {
|
|
154096
|
-
|
|
154097
|
-
|
|
153952
|
+
if (bNewTable) {
|
|
153953
|
+
dPageTable.paint(dTop, dParent, dRestHeight);
|
|
153954
|
+
} else {
|
|
153955
|
+
dPageTable.drawUpdate(prevdPageTable, dRestHeight);
|
|
153956
|
+
}
|
|
154098
153957
|
isEndRowFinished = dPageTable.isEndRowFinished();
|
|
154099
153958
|
if (dPageTable.endRow === this._table.rowCount - 1 && isEndRowFinished) {
|
|
154100
153959
|
const index = this.drawPageTables.indexOf(dPageTable);
|
|
@@ -154229,40 +154088,17 @@ class DrawTable extends _DrawRect__WEBPACK_IMPORTED_MODULE_10__/* .DrawRect */ .
|
|
|
154229
154088
|
paintTable(dParent, dTop, restHeight, startRow) {
|
|
154230
154089
|
const dHeight = 0;
|
|
154231
154090
|
this._table.getLeftWidth();
|
|
154232
|
-
|
|
154091
|
+
const headHeight = this.getHeadHeight();
|
|
154092
|
+
const defaultLineHeight = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_7__/* .HOEditorFactorys */ .O.instance().getFactory(this._hoEditorFactoryID).defaultLineHeight;
|
|
154093
|
+
if (headHeight + defaultLineHeight > restHeight) {
|
|
154233
154094
|
return null;
|
|
154234
154095
|
}
|
|
154235
|
-
// if (this._drawPageTables.size > 0) {
|
|
154236
|
-
// const prevDPageTable = this.getDrawTableByParentArea(drawPage.pageIndex - 1);
|
|
154237
|
-
// if (prevDPageTable) {
|
|
154238
|
-
// if (prevDPageTable.isEndRowFinished()) {
|
|
154239
|
-
// startRow = prevDPageTable.endRow + 1;
|
|
154240
|
-
// } else {
|
|
154241
|
-
// startRow = prevDPageTable.endRow;
|
|
154242
|
-
// }
|
|
154243
|
-
// }
|
|
154244
|
-
// }
|
|
154245
154096
|
const aWidth = this.dWidth;
|
|
154246
|
-
// if (this._drawPageTables.size>0){
|
|
154247
|
-
// const prevPageTable=this.getDrawTableByParentArea(pageIndex-1);
|
|
154248
|
-
// if (prevPageTable){
|
|
154249
|
-
// if (prevPageTable.isEndRowFinished())
|
|
154250
|
-
// startRow= prevPageTable.endRow+1
|
|
154251
|
-
// else startRow= prevPageTable.endRow;
|
|
154252
|
-
// }
|
|
154253
|
-
// }
|
|
154254
|
-
// -
|
|
154255
|
-
// this._paragraphNode.combineParagraph.leftMarginPixes -
|
|
154256
|
-
// this._paragraphNode.combineParagraph.rightMarginPixes;
|
|
154257
154097
|
const dPageTable = new _DrawPageTable__WEBPACK_IMPORTED_MODULE_9__/* .DrawPageTable */ .Yt(this._rootPath, this._table, dParent, this._drawPageTables.length, dTop, aWidth, restHeight, this._paragraphNode);
|
|
154258
154098
|
dPageTable.startRow = startRow;
|
|
154259
154099
|
this._drawPageTables.push(dPageTable);
|
|
154260
154100
|
dPageTable.paint(0, dParent, restHeight);
|
|
154261
154101
|
return dPageTable;
|
|
154262
|
-
// if (dPageTable.endRow < this._table.rowCount || !dPageTable.isEndRowFinished()) {
|
|
154263
|
-
// return this.paintPage(dParent, pageIndex + 1, 0, dParent.maxHeight)
|
|
154264
|
-
// }
|
|
154265
|
-
// return dTop + dPageTable.dHeight;
|
|
154266
154102
|
}
|
|
154267
154103
|
getCellRowHeight(cell, r) {
|
|
154268
154104
|
if (r > this._table.rowCount - 1 || r < 0) {
|
|
@@ -154595,7 +154431,6 @@ class DrawTable extends _DrawRect__WEBPACK_IMPORTED_MODULE_10__/* .DrawRect */ .
|
|
|
154595
154431
|
if (headCount < 0) {
|
|
154596
154432
|
startRow = 0;
|
|
154597
154433
|
}
|
|
154598
|
-
// console.log('----', this.table.rowCount, headCount, headHeight, restHeight, startRow, this.getRowStartLineMaxHeight(startRow))
|
|
154599
154434
|
if (this.table.rowCount > headCount && headHeight + this.getRowStartLineMaxHeight(startRow) > restHeight) {
|
|
154600
154435
|
return false;
|
|
154601
154436
|
}
|
|
@@ -223222,14 +223057,14 @@ var entry_lib_TextNode = __webpack_require__(32083);
|
|
|
223222
223057
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
223223
223058
|
var entry_lib_ParagraphNode = __webpack_require__(40504);
|
|
223224
223059
|
;// ./src/components/version.ts
|
|
223225
|
-
/* harmony default export */ var entry_lib_version = ('3.1.
|
|
223060
|
+
/* harmony default export */ var entry_lib_version = ('3.1.208');
|
|
223226
223061
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
223227
223062
|
var entry_lib_PoperTipText = __webpack_require__(89316);
|
|
223228
223063
|
;// ./src/components/controls/poperTipText/index.ts
|
|
223229
223064
|
|
|
223230
223065
|
/* harmony default export */ var entry_lib_poperTipText = (entry_lib_PoperTipText["default"]);
|
|
223231
|
-
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ImageNode.ts
|
|
223232
|
-
var entry_lib_ImageNode = __webpack_require__(
|
|
223066
|
+
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ImageNode.ts
|
|
223067
|
+
var entry_lib_ImageNode = __webpack_require__(82655);
|
|
223233
223068
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/TableNode.ts
|
|
223234
223069
|
var entry_lib_TableNode = __webpack_require__(30486);
|
|
223235
223070
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/TextBorderNode.ts + 1 modules
|
|
@@ -224552,21 +224387,21 @@ class entry_lib_DrawPageTree {
|
|
|
224552
224387
|
const aline = dRoots[startLine];
|
|
224553
224388
|
let dLine;
|
|
224554
224389
|
let dTop = 0;
|
|
224555
|
-
let mainDTop = 0;
|
|
224556
|
-
//if (!hoEditorFactory.isUseDrawingOptimization) {
|
|
224557
224390
|
if (aline instanceof entry_lib_DrawTable/* DrawTable */.n) {
|
|
224558
224391
|
//表格在绘制时,只取最后一个分页表格,
|
|
224559
224392
|
if (aline.drawPageTables.length > 0) {
|
|
224560
224393
|
dLine = aline.drawPageTables[aline.drawPageTables.length - 1];
|
|
224561
224394
|
} else {
|
|
224562
|
-
//表格还未开始绘制,无起始行
|
|
224395
|
+
//表格还未开始绘制,无起始行
|
|
224563
224396
|
dLine = null;
|
|
224564
224397
|
if (startLine > 0) {
|
|
224565
224398
|
const prevLine = dRoots[startLine - 1];
|
|
224566
224399
|
let prevDObj;
|
|
224567
224400
|
if (prevLine instanceof entry_lib_DrawTable/* DrawTable */.n) {
|
|
224568
224401
|
prevDObj = prevLine.drawPageTables[prevLine.drawPageTables.length - 1];
|
|
224569
|
-
} else
|
|
224402
|
+
} else {
|
|
224403
|
+
prevDObj = prevLine;
|
|
224404
|
+
}
|
|
224570
224405
|
const prevArea = this.getMainRootArea(prevDObj);
|
|
224571
224406
|
if (prevArea === drawArea) {
|
|
224572
224407
|
dTop = prevDObj.y + prevDObj.dHeight + prevDObj.paragraphNode.combineParagraph.lineSpace;
|
|
@@ -224574,23 +224409,16 @@ class entry_lib_DrawPageTree {
|
|
|
224574
224409
|
dTop -= prevDObj.paragraphNode.combineParagraph.lineSpace;
|
|
224575
224410
|
}
|
|
224576
224411
|
}
|
|
224577
|
-
// } else {
|
|
224578
|
-
// dTop =
|
|
224579
|
-
// prevLine.y +
|
|
224580
|
-
// prevLine.dHeight +
|
|
224581
|
-
// prevLine.paragraphNode.combineParagraph.lineSpace;
|
|
224582
|
-
// if (drawArea.allowAcrossPage) restHeight = drawArea.maxHeight - dTop;
|
|
224583
|
-
// }
|
|
224584
224412
|
}
|
|
224585
224413
|
}
|
|
224586
224414
|
} else {
|
|
224587
224415
|
dLine = aline;
|
|
224588
224416
|
dTop = aline.y;
|
|
224589
224417
|
}
|
|
224590
|
-
//}
|
|
224591
224418
|
//----------------结束定位绘制起始行,绘制起始位置--------------------------
|
|
224592
|
-
if (drawArea.allowAcrossPage)
|
|
224593
|
-
|
|
224419
|
+
if (drawArea.allowAcrossPage) {
|
|
224420
|
+
restHeight = drawArea.maxHeight - dTop;
|
|
224421
|
+
}
|
|
224594
224422
|
if (!drawArea) {
|
|
224595
224423
|
return;
|
|
224596
224424
|
}
|
|
@@ -224598,18 +224426,8 @@ class entry_lib_DrawPageTree {
|
|
|
224598
224426
|
if (!mainArea) {
|
|
224599
224427
|
return;
|
|
224600
224428
|
}
|
|
224601
|
-
/*绘制优化
|
|
224602
|
-
if (hoEditorFactory.isUseDrawingOptimization
|
|
224603
|
-
&& drawArea instanceof DrawPageMainDoc
|
|
224604
|
-
&& dRoots.length > 1) {
|
|
224605
|
-
startLine = this.calcStartLine(drawArea);
|
|
224606
|
-
endLine = dRoots.length - 1;
|
|
224607
|
-
startUpdateLine = endLine;
|
|
224608
|
-
drawArea.removeAllChildren();
|
|
224609
|
-
}
|
|
224610
|
-
*/
|
|
224611
224429
|
let nextLine = startLine;
|
|
224612
|
-
//用于判断是否页已经満页的map
|
|
224430
|
+
//用于判断是否页已经満页的map
|
|
224613
224431
|
let pageIsFull = new Map();
|
|
224614
224432
|
try {
|
|
224615
224433
|
this._startNeedUpdatePage = -1;
|
|
@@ -224623,7 +224441,7 @@ class entry_lib_DrawPageTree {
|
|
|
224623
224441
|
nextLine += 1;
|
|
224624
224442
|
continue;
|
|
224625
224443
|
}
|
|
224626
|
-
|
|
224444
|
+
// 需要新起一页
|
|
224627
224445
|
if (dline.paragraphNode.printAsSinglePage && dline.paragraphNode.drawlines[0] === dline && dTop > 0 && drawArea instanceof entry_lib_DrawPageMainDoc/* DrawPageMainDoc */.L) {
|
|
224628
224446
|
this._startNeedUpdatePage = Math.min(drawArea.pageIndex, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
|
|
224629
224447
|
this._endNeedUpdatePage = Math.max(drawArea.pageIndex, this._endNeedUpdatePage);
|
|
@@ -224636,8 +224454,11 @@ class entry_lib_DrawPageTree {
|
|
|
224636
224454
|
}
|
|
224637
224455
|
drawArea = this.getNextDrawArea(drawArea, true)[0];
|
|
224638
224456
|
dTop = 0;
|
|
224639
|
-
if (drawArea.allowAcrossPage)
|
|
224457
|
+
if (drawArea.allowAcrossPage) {
|
|
224458
|
+
restHeight = drawArea.maxHeight - dTop;
|
|
224459
|
+
}
|
|
224640
224460
|
}
|
|
224461
|
+
// 需要更新页眉
|
|
224641
224462
|
if (dline.paragraphNode.forceChangeHeader && dline.paragraphNode.drawlines[0] === dline && dTop > 0 && drawArea instanceof entry_lib_DrawPageMainDoc/* DrawPageMainDoc */.L) {
|
|
224642
224463
|
this._startNeedUpdatePage = Math.min(drawArea.pageIndex, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
|
|
224643
224464
|
this._endNeedUpdatePage = Math.max(drawArea.pageIndex, this._endNeedUpdatePage);
|
|
@@ -224652,7 +224473,9 @@ class entry_lib_DrawPageTree {
|
|
|
224652
224473
|
hoEditorFactory.subDocManger.updateSubDocPageIndexByPath(drawArea.pageIndex, dline.paragraphNode.docId);
|
|
224653
224474
|
}
|
|
224654
224475
|
}
|
|
224655
|
-
if (drawArea.allowAcrossPage)
|
|
224476
|
+
if (drawArea.allowAcrossPage) {
|
|
224477
|
+
restHeight = drawArea.maxHeight - dTop;
|
|
224478
|
+
}
|
|
224656
224479
|
}
|
|
224657
224480
|
// 判断是否已经满页
|
|
224658
224481
|
if (dline instanceof entry_lib_DrawTable/* DrawTable */.n && (restHeight < hoEditorFactory.defaultLineHeight || !dline.isFirstRowCanFit(restHeight)) || dline instanceof entry_lib_DrawLine/* DrawLine */.D && restHeight < dline.dHeight && dTop > 0) {
|
|
@@ -224703,7 +224526,9 @@ class entry_lib_DrawPageTree {
|
|
|
224703
224526
|
}
|
|
224704
224527
|
dTop = 0;
|
|
224705
224528
|
}
|
|
224706
|
-
if (drawArea.allowAcrossPage)
|
|
224529
|
+
if (drawArea.allowAcrossPage) {
|
|
224530
|
+
restHeight = drawArea.maxHeight - dTop;
|
|
224531
|
+
}
|
|
224707
224532
|
if (restHeight < entry_lib_TableNode/* gDefaultRowHeight */.ip && drawArea instanceof entry_lib_DrawPageMainDoc/* DrawPageMainDoc */.L) {
|
|
224708
224533
|
drawArea.endDline = nextLine - 1;
|
|
224709
224534
|
this._startNeedUpdatePage = Math.min(drawArea.pageIndex, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
|
|
@@ -224721,7 +224546,11 @@ class entry_lib_DrawPageTree {
|
|
|
224721
224546
|
drawArea.topDline = dPageTable;
|
|
224722
224547
|
}
|
|
224723
224548
|
dTop = dPageTable.y + dPageTable.dHeight;
|
|
224724
|
-
if (drawArea.allowAcrossPage)
|
|
224549
|
+
if (drawArea.allowAcrossPage) {
|
|
224550
|
+
restHeight = drawArea.maxHeight - dTop;
|
|
224551
|
+
} else {
|
|
224552
|
+
mainArea.docHeight = dTop;
|
|
224553
|
+
}
|
|
224725
224554
|
}
|
|
224726
224555
|
bFinishedPaint = dobj.isFinishedPaint();
|
|
224727
224556
|
if (!bFinishedPaint) {
|
|
@@ -224769,7 +224598,9 @@ class entry_lib_DrawPageTree {
|
|
|
224769
224598
|
//修改下一行的绘制起始位置
|
|
224770
224599
|
dTop = dobj.y + dobj.dHeight + dobj.paragraphNode.combineParagraph.lineSpace;
|
|
224771
224600
|
mainArea.docHeight = dTop;
|
|
224772
|
-
if (drawArea.allowAcrossPage)
|
|
224601
|
+
if (drawArea.allowAcrossPage) {
|
|
224602
|
+
restHeight = drawArea.maxHeight - dTop;
|
|
224603
|
+
}
|
|
224773
224604
|
}
|
|
224774
224605
|
if (nextLine >= endLine) break;else nextLine += 1;
|
|
224775
224606
|
}
|
|
@@ -224812,12 +224643,14 @@ class entry_lib_DrawPageTree {
|
|
|
224812
224643
|
const dPageTable = dobj.getDrawTableByPageIndex(mainArea.index);
|
|
224813
224644
|
if (dPageTable) {
|
|
224814
224645
|
startDrawLine = dPageTable;
|
|
224815
|
-
} else
|
|
224646
|
+
} else {
|
|
224647
|
+
startDrawLine = dobj.drawPageTables[0];
|
|
224648
|
+
}
|
|
224816
224649
|
} else {
|
|
224817
224650
|
startDrawLine = dobj;
|
|
224818
224651
|
}
|
|
224819
224652
|
let drawTop = startDrawLine.y;
|
|
224820
|
-
if (startDrawLine instanceof entry_lib_DrawPageTable/* DrawPageTable */.Yt && !mainArea.contains(startDrawLine) && startDrawLine
|
|
224653
|
+
if (startDrawLine instanceof entry_lib_DrawPageTable/* DrawPageTable */.Yt && !mainArea.contains(startDrawLine) && startDrawLine.table.drawTable.drawPageTables.indexOf(startDrawLine) > 0) {
|
|
224821
224654
|
drawTop = 0;
|
|
224822
224655
|
}
|
|
224823
224656
|
//对于新插入的内容绘制完成后(一直到最后一个插入的段落结束),后续的段落需要进行移动位置,则调用update
|
|
@@ -234958,6 +234791,10 @@ class entry_lib_VueController {
|
|
|
234958
234791
|
maxHeight = hoEditorFactory.pageProperty.heightPixes - hoEditorFactory.drawTree.caret.Y - hoEditorFactory.pageProperty.bottomMarginPixes - 30;
|
|
234959
234792
|
if (isInTable && scell) {
|
|
234960
234793
|
maxWidth = scell.drawCell.dWidth - 10;
|
|
234794
|
+
const rowInfos = scell.table.rowInfos[scell.table.rows.indexOf(scell.row)];
|
|
234795
|
+
if (rowInfos.rowProperty.isSpecifyHeight) {
|
|
234796
|
+
maxHeight = rowInfos.rowHeight - 10;
|
|
234797
|
+
}
|
|
234961
234798
|
}
|
|
234962
234799
|
const dLine = hoEditorFactory.drawTree.getDrawLineByDNode(npStart.node.drawNodes[0]);
|
|
234963
234800
|
if (dLine.children && dLine.children.length > 0) {
|
|
@@ -237147,18 +236984,20 @@ class entry_lib_VueController {
|
|
|
237147
236984
|
notReplaceElement: node.notReplaceElement,
|
|
237148
236985
|
keyValue: '',
|
|
237149
236986
|
value: '',
|
|
237150
|
-
|
|
236987
|
+
verifyValueTip: [],
|
|
236988
|
+
verifyKeywordTip: []
|
|
237151
236989
|
};
|
|
237152
236990
|
if (!(node instanceof entry_lib_TextInputFieldNode/* TextInputFieldNode */.IM)) {
|
|
237153
236991
|
elementObj.controlType = node.type;
|
|
237154
236992
|
} else {
|
|
237155
|
-
let
|
|
236993
|
+
let verifyValueTip = [];
|
|
236994
|
+
let verifyKeywordTip = [];
|
|
237156
236995
|
let includesKeyword = node.includesKeyword ? JSON.parse(node.includesKeyword) : [];
|
|
237157
236996
|
let valueArea = node.valueArea ? JSON.parse(node.valueArea) : [];
|
|
237158
236997
|
if (includesKeyword.length > 0) {
|
|
237159
236998
|
includesKeyword.forEach(keyword => {
|
|
237160
236999
|
if (node.text.includes(keyword.text)) {
|
|
237161
|
-
|
|
237000
|
+
verifyKeywordTip.push(keyword.tip);
|
|
237162
237001
|
}
|
|
237163
237002
|
});
|
|
237164
237003
|
}
|
|
@@ -237170,23 +237009,24 @@ class entry_lib_VueController {
|
|
|
237170
237009
|
if (!isNaN(nodeValue)) {
|
|
237171
237010
|
if (!isNaN(min) && !isNaN(max)) {
|
|
237172
237011
|
if (nodeValue >= min && nodeValue <= max) {
|
|
237173
|
-
|
|
237012
|
+
verifyValueTip.push(value.tip);
|
|
237174
237013
|
}
|
|
237175
237014
|
}
|
|
237176
237015
|
if (!isNaN(min) && isNaN(max)) {
|
|
237177
237016
|
if (nodeValue < min) {
|
|
237178
|
-
|
|
237017
|
+
verifyValueTip.push(value.tip);
|
|
237179
237018
|
}
|
|
237180
237019
|
}
|
|
237181
237020
|
if (isNaN(min) && !isNaN(max)) {
|
|
237182
237021
|
if (nodeValue > max) {
|
|
237183
|
-
|
|
237022
|
+
verifyValueTip.push(value.tip);
|
|
237184
237023
|
}
|
|
237185
237024
|
}
|
|
237186
237025
|
}
|
|
237187
237026
|
});
|
|
237188
237027
|
}
|
|
237189
|
-
elementObj.
|
|
237028
|
+
elementObj.verifyKeywordTip = verifyKeywordTip;
|
|
237029
|
+
elementObj.verifyValueTip = verifyValueTip;
|
|
237190
237030
|
}
|
|
237191
237031
|
if (node instanceof entry_lib_TextInputFieldNode/* TextInputFieldNode */.IM && node.inputFieldType == 1 || node instanceof entry_lib_DownListNode/* DownListNode */.dS) {
|
|
237192
237032
|
elementObj.keyValue = node.keyValue;
|
|
@@ -240110,8 +239950,27 @@ class entry_lib_VueController {
|
|
|
240110
239950
|
};
|
|
240111
239951
|
const hoEditorFactory = entry_lib_HOEditorFactorys/* HOEditorFactorys */.O.instance().getFactory(this._hoEditorFactoryID);
|
|
240112
239952
|
const firstPageMainDoc = hoEditorFactory.drawTree.drawPages[0].drawMainDoc;
|
|
240113
|
-
|
|
240114
|
-
|
|
239953
|
+
let mathWidth = hoEditorFactory.pageProperty.widthPixes - hoEditorFactory.pageProperty.leftMarginPixes - hoEditorFactory.pageProperty.rightMarginPixes;
|
|
239954
|
+
let mathHeight = hoEditorFactory.pageProperty.heightPixes - hoEditorFactory.pageProperty.topMarginPixes - hoEditorFactory.pageProperty.bottomMarginPixes - 30;
|
|
239955
|
+
const curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
239956
|
+
const npStart = curDomRange.npStart;
|
|
239957
|
+
if (npStart && npStart.node) {
|
|
239958
|
+
const [isInTable, table, scell, ecell] = curDomRange.inSameTableCell();
|
|
239959
|
+
if (isInTable && scell) {
|
|
239960
|
+
mathWidth = scell.drawCell.dWidth - 10;
|
|
239961
|
+
const rowInfos = scell.table.rowInfos[scell.table.rows.indexOf(scell.row)];
|
|
239962
|
+
if (rowInfos.rowProperty.isSpecifyHeight) {
|
|
239963
|
+
let height = rowInfos.rowHeight - 10;
|
|
239964
|
+
if (mathHeight > height) {
|
|
239965
|
+
mathHeight = height;
|
|
239966
|
+
}
|
|
239967
|
+
}
|
|
239968
|
+
const colInfos = scell.table.colInfos[scell.row.indexOf(scell)];
|
|
239969
|
+
if (colInfos.colProperty.isSpecifyWidth) {
|
|
239970
|
+
mathWidth = colInfos.colWidth - 10;
|
|
239971
|
+
}
|
|
239972
|
+
}
|
|
239973
|
+
}
|
|
240115
239974
|
bounds = {
|
|
240116
239975
|
width: Math.max(mathWidth, firstPageMainDoc.docWidth),
|
|
240117
239976
|
height: Math.min(firstPageMainDoc.dHeight, mathHeight),
|