hoeditor-web 2.0.61 → 2.0.64
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.common.js +563 -281
- package/lib/hoeditor.css +2 -2
- package/lib/hoeditor.umd.js +563 -281
- package/lib/hoeditor.umd.min.js +5 -5
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -11678,6 +11678,8 @@ var Print = /*#__PURE__*/function () {
|
|
|
11678
11678
|
|
|
11679
11679
|
PDF === null || PDF === void 0 ? void 0 : PDF.addPage();
|
|
11680
11680
|
ctx = PDF === null || PDF === void 0 ? void 0 : PDF.context2d;
|
|
11681
|
+
ctx.posX = svg2pdfOptions.x;
|
|
11682
|
+
ctx.posY = svg2pdfOptions.y;
|
|
11681
11683
|
window.printBlack = hoEditorFactory.printBlack;
|
|
11682
11684
|
|
|
11683
11685
|
if (hoEditorFactory.isFixedPrintToA4 == '2' && format) {
|
|
@@ -11686,11 +11688,11 @@ var Print = /*#__PURE__*/function () {
|
|
|
11686
11688
|
ctx.translate(0, 1122 / 2); // 由于旋转是默认以左上角为中心 所以需要先移动位置 改变起始点
|
|
11687
11689
|
|
|
11688
11690
|
ctx.rotate(270 * Math.PI / 180); // 旋转 context2d
|
|
11691
|
+
// ctx.posX = 0;
|
|
11692
|
+
// ctx.posY = 1122 / 2;
|
|
11689
11693
|
}
|
|
11690
11694
|
}
|
|
11691
11695
|
|
|
11692
|
-
ctx.posX = svg2pdfOptions.x;
|
|
11693
|
-
ctx.posY = svg2pdfOptions.y;
|
|
11694
11696
|
ctx && ((_cpage$drawDomLevel = cpage.drawDomLevel) === null || _cpage$drawDomLevel === void 0 ? void 0 : (_cpage$drawDomLevel$s = _cpage$drawDomLevel.stage) === null || _cpage$drawDomLevel$s === void 0 ? void 0 : _cpage$drawDomLevel$s.draw(ctx));
|
|
11695
11697
|
ctx = null;
|
|
11696
11698
|
_context3.next = 57;
|
|
@@ -11822,7 +11824,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
11822
11824
|
return link.remove();
|
|
11823
11825
|
}, 100);
|
|
11824
11826
|
} else {
|
|
11825
|
-
if (height <= 560 && hoEditorFactory.isFixedPrintToA4
|
|
11827
|
+
if (height <= 560 && hoEditorFactory.isFixedPrintToA4 === '') {
|
|
11826
11828
|
PDF === null || PDF === void 0 ? void 0 : PDF.deletePage(1);
|
|
11827
11829
|
}
|
|
11828
11830
|
|
|
@@ -22251,7 +22253,7 @@ var CellProperty = /*#__PURE__*/function () {
|
|
|
22251
22253
|
/*
|
|
22252
22254
|
* @Author: your name
|
|
22253
22255
|
* @Date: 2021-01-20 10:18:55
|
|
22254
|
-
* @LastEditTime: 2022-
|
|
22256
|
+
* @LastEditTime: 2022-07-08 13:55:38
|
|
22255
22257
|
* @LastEditors: liyanan 2441631434@qq.com
|
|
22256
22258
|
* @Description: In User Settings Edit
|
|
22257
22259
|
* @FilePath: \hoeditor-web\src\editor\dom\domNode\Comment.ts
|
|
@@ -44505,15 +44507,24 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
44505
44507
|
}
|
|
44506
44508
|
}, {
|
|
44507
44509
|
key: "removeComment",
|
|
44508
|
-
value: function removeComment(comment) {
|
|
44509
|
-
|
|
44510
|
-
var
|
|
44510
|
+
value: function removeComment(comment, isRecord) {
|
|
44511
|
+
if (isRecord) {
|
|
44512
|
+
for (var i = this.children.length - 1; i >= 0; i--) {
|
|
44513
|
+
var child = this.children[i];
|
|
44511
44514
|
|
|
44512
|
-
|
|
44513
|
-
|
|
44515
|
+
if (child.name && child.name === "record" + comment.id) {
|
|
44516
|
+
this.children.splice(i, 1);
|
|
44517
|
+
}
|
|
44514
44518
|
}
|
|
44515
|
-
}
|
|
44519
|
+
} else {
|
|
44520
|
+
for (var _i = this.children.length - 1; _i >= 0; _i--) {
|
|
44521
|
+
var _child = this.children[_i];
|
|
44516
44522
|
|
|
44523
|
+
if (_child.name && _child.name === comment.id) {
|
|
44524
|
+
this.children.splice(_i, 1);
|
|
44525
|
+
}
|
|
44526
|
+
}
|
|
44527
|
+
}
|
|
44517
44528
|
|
|
44518
44529
|
_HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawPageTree.updateDrawPage(this.index);
|
|
44519
44530
|
}
|
|
@@ -44625,12 +44636,12 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
44625
44636
|
var minValue = getStagePos(bottomComments[0])[1];
|
|
44626
44637
|
var _tempComment = bottomComments[0];
|
|
44627
44638
|
|
|
44628
|
-
for (var
|
|
44629
|
-
var _stageY2 = getStagePos(bottomComments[
|
|
44639
|
+
for (var _i2 = 1; _i2 < bottomComments.length; _i2++) {
|
|
44640
|
+
var _stageY2 = getStagePos(bottomComments[_i2])[1];
|
|
44630
44641
|
|
|
44631
44642
|
if (_stageY2 < minValue) {
|
|
44632
44643
|
minValue = _stageY2;
|
|
44633
|
-
_tempComment = bottomComments[
|
|
44644
|
+
_tempComment = bottomComments[_i2];
|
|
44634
44645
|
}
|
|
44635
44646
|
}
|
|
44636
44647
|
|
|
@@ -44731,12 +44742,13 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
44731
44742
|
var container = new createjs.Container();
|
|
44732
44743
|
container.x = docWidth + 15;
|
|
44733
44744
|
container.y = commentY - comment.lineHeight / 2;
|
|
44734
|
-
container.name = comment.id;
|
|
44745
|
+
container.name = "record" + comment.id;
|
|
44735
44746
|
var commentTextShape = null; // 批注内容
|
|
44736
44747
|
|
|
44737
44748
|
var commentArr = comment.commentTextWarp(commentWidth, comment.text);
|
|
44738
|
-
var text = commentArr[0];
|
|
44739
|
-
|
|
44749
|
+
var text = commentArr[0]; //const textLen = (commentArr[1] as number) > 1 ? (commentArr[1] as number) - 1 : (commentArr[1] as number);
|
|
44750
|
+
|
|
44751
|
+
var textLen = commentArr[1];
|
|
44740
44752
|
comment.lineHeight = 20 * textLen + 10;
|
|
44741
44753
|
commentTextShape = new createjs.Text(text, "12px 微软雅黑", "#666");
|
|
44742
44754
|
commentTextShape.lineWidth = commentWidth - 25;
|
|
@@ -44755,12 +44767,12 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
44755
44767
|
|
|
44756
44768
|
var horizontalLine = new createjs.Shape();
|
|
44757
44769
|
horizontalLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke("rgba(255, 0, 0, 1)").moveTo(nodeX, nodeY).lineTo(docWidth, nodeY);
|
|
44758
|
-
horizontalLine.name = comment.id;
|
|
44770
|
+
horizontalLine.name = "record" + comment.id;
|
|
44759
44771
|
horizontalLine.alpha = 1; //指向线
|
|
44760
44772
|
|
|
44761
44773
|
var guideLine = new createjs.Shape();
|
|
44762
44774
|
guideLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke("rgba(255, 0, 0, 1)").moveTo(docWidth, nodeY).lineTo(docWidth + 15, commentY - comment.lineHeight / 4);
|
|
44763
|
-
guideLine.name = comment.id;
|
|
44775
|
+
guideLine.name = "record" + comment.id;
|
|
44764
44776
|
guideLine.alpha = 1;
|
|
44765
44777
|
container.addChild(backShape);
|
|
44766
44778
|
container.addChild(commentTextShape);
|
|
@@ -44774,13 +44786,14 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
44774
44786
|
value: function repaintRecored(comments, comment, nPath, spX, spY) {
|
|
44775
44787
|
var _this5 = this;
|
|
44776
44788
|
|
|
44789
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_17__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
44777
44790
|
var topComments = new Array();
|
|
44778
44791
|
var bottomComments = new Array();
|
|
44779
44792
|
var tempArr = new Array();
|
|
44780
44793
|
|
|
44781
44794
|
var getStagePos = function getStagePos(comment) {
|
|
44782
44795
|
var endDrawNode = comment.eNode.drawNodes[0];
|
|
44783
|
-
var dline =
|
|
44796
|
+
var dline = hoEditorFactory.drawTree.getDrawLineByDNode(endDrawNode); // 末尾标记节点所在行
|
|
44784
44797
|
|
|
44785
44798
|
var stagePos = dline.localToGlobal(endDrawNode.x, endDrawNode.y); // 末尾标记节点的stage坐标
|
|
44786
44799
|
|
|
@@ -44793,7 +44806,11 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
44793
44806
|
var commentY = spY;
|
|
44794
44807
|
comments.forEach(function (value) {
|
|
44795
44808
|
if (value.id !== comment.id) {
|
|
44796
|
-
|
|
44809
|
+
var area = hoEditorFactory.drawPageTree.getMainRootArea(value.eNode.drawNodes[0]);
|
|
44810
|
+
|
|
44811
|
+
if (area && area.index == _this5.index) {
|
|
44812
|
+
tempArr.push(value);
|
|
44813
|
+
}
|
|
44797
44814
|
}
|
|
44798
44815
|
});
|
|
44799
44816
|
tempArr.forEach(function (value) {
|
|
@@ -44852,7 +44869,7 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
44852
44869
|
commentY = nodeY;
|
|
44853
44870
|
}
|
|
44854
44871
|
|
|
44855
|
-
_this5.removeComment(commentObj);
|
|
44872
|
+
_this5.removeComment(commentObj, true);
|
|
44856
44873
|
|
|
44857
44874
|
_this5.drawEditRecords(commentObj, nodeX, nodeY, commentY);
|
|
44858
44875
|
|
|
@@ -44876,12 +44893,12 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
44876
44893
|
var minValue = getStagePos(bottomComments[0])[1];
|
|
44877
44894
|
var _tempComment3 = bottomComments[0];
|
|
44878
44895
|
|
|
44879
|
-
for (var
|
|
44880
|
-
var _stageY4 = getStagePos(bottomComments[
|
|
44896
|
+
for (var _i3 = 1; _i3 < bottomComments.length; _i3++) {
|
|
44897
|
+
var _stageY4 = getStagePos(bottomComments[_i3])[1];
|
|
44881
44898
|
|
|
44882
44899
|
if (_stageY4 < minValue) {
|
|
44883
44900
|
minValue = _stageY4;
|
|
44884
|
-
_tempComment3 = bottomComments[
|
|
44901
|
+
_tempComment3 = bottomComments[_i3];
|
|
44885
44902
|
}
|
|
44886
44903
|
}
|
|
44887
44904
|
|
|
@@ -46230,7 +46247,14 @@ var DrawCombineNode = /*#__PURE__*/function (_DrawContainer) {
|
|
|
46230
46247
|
_this2.on('mouseout', function (e) {
|
|
46231
46248
|
hoEditorFactory.nodeMouseMove.setNode(_this2.node, _editor_events_DmouseEvent__WEBPACK_IMPORTED_MODULE_6__/* .DmouseEventType.detOut */ .p.detOut);
|
|
46232
46249
|
});
|
|
46233
|
-
}
|
|
46250
|
+
} // if(this.node && this.node.drawNodes && this.node.drawNodes[0]) {
|
|
46251
|
+
// const paragraphNode = hoEditorFactory.drawTree.getDrawLineByDNode(this._node.drawNodes[0])?.paragraphNode;
|
|
46252
|
+
// const customProperty = paragraphNode && paragraphNode.customProperty;
|
|
46253
|
+
// if(['男', '女'].includes(customProperty.sex) || (customProperty.age && customProperty.age.select == '隐藏')) {
|
|
46254
|
+
// console.log({...paragraphNode.customProperty})
|
|
46255
|
+
// }
|
|
46256
|
+
// }
|
|
46257
|
+
|
|
46234
46258
|
|
|
46235
46259
|
_this2.on('click', function (e) {
|
|
46236
46260
|
if (e.nativeEvent.button === 0) {
|
|
@@ -51284,9 +51308,9 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51284
51308
|
_this = _super.call(this, hoeditfactoryID, rootPath, node, 0);
|
|
51285
51309
|
_this._number = 0;
|
|
51286
51310
|
_this._type = 0;
|
|
51287
|
-
_this._signName =
|
|
51288
|
-
_this._imgSrc =
|
|
51289
|
-
_this._fingerPrintSrc =
|
|
51311
|
+
_this._signName = '';
|
|
51312
|
+
_this._imgSrc = '';
|
|
51313
|
+
_this._fingerPrintSrc = '';
|
|
51290
51314
|
_this._fingerPosition = 0;
|
|
51291
51315
|
_this._number = number;
|
|
51292
51316
|
_this._imgSrc = imgSrc;
|
|
@@ -51300,7 +51324,7 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51300
51324
|
_this._textStyle = cbStyle.getStyleKey();
|
|
51301
51325
|
|
|
51302
51326
|
if (_this.number > 0 && type === 2) {
|
|
51303
|
-
var signArr = imgSrc.split(
|
|
51327
|
+
var signArr = imgSrc.split('\n');
|
|
51304
51328
|
|
|
51305
51329
|
if (signArr.length > 1) {
|
|
51306
51330
|
_this.dHeight = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_7__/* .HOEditorFactorys.instance */ .b.instance().getFactory(hoeditfactoryID).signHeight * signArr.length; // const textStyle = new TextStyle(hoeditfactoryID);
|
|
@@ -51319,10 +51343,10 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51319
51343
|
} //this._drawText = new DrawSimpleText('/', cbStyle.getStyleKey(), "#000000");
|
|
51320
51344
|
|
|
51321
51345
|
|
|
51322
|
-
_this._drawText = new createjs.Text(node.connectMode, _this._textStyle,
|
|
51346
|
+
_this._drawText = new createjs.Text(node.connectMode, _this._textStyle, '#000000');
|
|
51323
51347
|
|
|
51324
51348
|
if (_this.number === 0) {
|
|
51325
|
-
var dText = new createjs.Text(_this.signName, _this._textStyle,
|
|
51349
|
+
var dText = new createjs.Text(_this.signName, _this._textStyle, '#000000');
|
|
51326
51350
|
_this.dWidth = dText.getMeasuredWidth();
|
|
51327
51351
|
} else {
|
|
51328
51352
|
if (type === 1) {
|
|
@@ -51336,14 +51360,14 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51336
51360
|
}
|
|
51337
51361
|
|
|
51338
51362
|
if (type === 2) {
|
|
51339
|
-
var _signArr = imgSrc.split(
|
|
51363
|
+
var _signArr = imgSrc.split('\n');
|
|
51340
51364
|
|
|
51341
|
-
var aText = new createjs.Text(_signArr[0], _this._textStyle,
|
|
51365
|
+
var aText = new createjs.Text(_signArr[0], _this._textStyle, '#000000');
|
|
51342
51366
|
var maxWidth = aText.getMeasuredWidth();
|
|
51343
51367
|
|
|
51344
51368
|
if (_signArr.length > 1) {
|
|
51345
51369
|
for (var i = 1; i < _signArr.length; i++) {
|
|
51346
|
-
aText = new createjs.Text(_signArr[i], _this._textStyle,
|
|
51370
|
+
aText = new createjs.Text(_signArr[i], _this._textStyle, '#000000');
|
|
51347
51371
|
var aWidth = aText.getMeasuredWidth();
|
|
51348
51372
|
|
|
51349
51373
|
if (aWidth > maxWidth) {
|
|
@@ -51358,7 +51382,7 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51358
51382
|
_this.dWidth = maxWidth;
|
|
51359
51383
|
} else {
|
|
51360
51384
|
//this.dWidth = dText.getMeasuredWidth() + this._drawText.getMeasuredWidth();
|
|
51361
|
-
if (node.connectMode ===
|
|
51385
|
+
if (node.connectMode === '换行') {
|
|
51362
51386
|
_this.dWidth = maxWidth;
|
|
51363
51387
|
} else {
|
|
51364
51388
|
_this.dWidth = maxWidth + _this._drawText.getMeasuredWidth();
|
|
@@ -51367,7 +51391,7 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51367
51391
|
}
|
|
51368
51392
|
}
|
|
51369
51393
|
|
|
51370
|
-
if (imgWidth == 0 && imgHeight == 0 && imgSrc && type == 1 || type == 3) {
|
|
51394
|
+
if (imgWidth == 0 && imgHeight == 0 && (imgSrc || fingerPrintSrc) && type == 1 || type == 3) {
|
|
51371
51395
|
_this.drawWriteSignNode(node);
|
|
51372
51396
|
} else {
|
|
51373
51397
|
_this.drawSignNode();
|
|
@@ -51453,108 +51477,139 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51453
51477
|
|
|
51454
51478
|
this.clear();
|
|
51455
51479
|
var drawNode = this;
|
|
51456
|
-
var isFront = node.isFront;
|
|
51457
51480
|
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_7__/* .HOEditorFactorys.instance */ .b.instance().getFactory(drawNode.node.hoEditorFactoryID);
|
|
51458
51481
|
|
|
51459
51482
|
var drawSign = function drawSign() {
|
|
51460
51483
|
if (_this2.type === 1 || _this2.type === 3) {
|
|
51461
|
-
var image = new Image();
|
|
51462
|
-
image.src = _this2.imgSrc;
|
|
51463
51484
|
var currentLineHeight = hoEditorFactory.drawTree.caret.height;
|
|
51464
|
-
|
|
51465
|
-
|
|
51466
|
-
|
|
51467
|
-
|
|
51468
|
-
|
|
51469
|
-
_this2._dWidth =
|
|
51470
|
-
|
|
51471
|
-
|
|
51472
|
-
|
|
51473
|
-
var fingerImage = new Image();
|
|
51474
|
-
var fingerBitmap;
|
|
51475
|
-
|
|
51476
|
-
if (drawNode.fingerPrintSrc !== "") {
|
|
51485
|
+
node.type = 3;
|
|
51486
|
+
|
|
51487
|
+
if (_this2.imgSrc == '' && _this2.fingerPrintSrc) {
|
|
51488
|
+
var fingerscale = drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.center */ .d.center ? 0.3 : 0.15;
|
|
51489
|
+
var fingerWidth = 256;
|
|
51490
|
+
_this2._dWidth = fingerWidth * fingerscale;
|
|
51491
|
+
node.imgWidth = _this2._dWidth;
|
|
51492
|
+
var fingerImage = new Image();
|
|
51493
|
+
var fingerBitmap;
|
|
51477
51494
|
fingerImage.src = _this2.fingerPrintSrc;
|
|
51478
51495
|
fingerBitmap = new createjs.Bitmap(fingerImage);
|
|
51479
|
-
drawNode.addChildAt(fingerBitmap,
|
|
51496
|
+
drawNode.addChildAt(fingerBitmap, 0);
|
|
51480
51497
|
hoEditorFactory.loadImageCount++;
|
|
51481
51498
|
|
|
51482
51499
|
fingerImage.onerror = function () {
|
|
51483
51500
|
return hoEditorFactory.loadImageCount--;
|
|
51484
51501
|
};
|
|
51485
|
-
}
|
|
51486
51502
|
|
|
51487
|
-
|
|
51503
|
+
fingerImage.onload = function () {
|
|
51504
|
+
var fingerHeight = fingerImage.naturalHeight !== 0 ? fingerImage.naturalHeight : fingerImage.height;
|
|
51505
|
+
fingerBitmap.y = -fingerHeight * fingerscale;
|
|
51506
|
+
fingerBitmap.x = 0;
|
|
51507
|
+
node.imgHeight = fingerHeight * fingerscale;
|
|
51508
|
+
_this2._dHeight = node.imgHeight;
|
|
51509
|
+
node.type = 3;
|
|
51510
|
+
fingerBitmap.setTransform(fingerBitmap.x, fingerBitmap.y, fingerscale, fingerscale);
|
|
51511
|
+
updateSign();
|
|
51512
|
+
};
|
|
51513
|
+
} else {
|
|
51514
|
+
var image = new Image();
|
|
51515
|
+
image.src = _this2.imgSrc;
|
|
51516
|
+
var bitmap = new createjs.Bitmap(image);
|
|
51517
|
+
bitmap.y = 0;
|
|
51518
|
+
bitmap.x = 0;
|
|
51488
51519
|
|
|
51489
|
-
|
|
51490
|
-
|
|
51491
|
-
|
|
51520
|
+
if (node.imgWidth) {
|
|
51521
|
+
_this2._dWidth = node.imgWidth;
|
|
51522
|
+
}
|
|
51492
51523
|
|
|
51493
|
-
|
|
51494
|
-
var hitWidth = image.naturalWidth !== 0 ? image.naturalWidth : image.width;
|
|
51495
|
-
var hitHeight = image.naturalHeight !== 0 ? image.naturalHeight : image.height;
|
|
51496
|
-
var scale = hoEditorFactory.signHeight / hitHeight < 0.4 ? 0.4 : hoEditorFactory.signHeight / hitHeight > 0.7 ? 1 : hoEditorFactory.signHeight / hitHeight;
|
|
51497
|
-
|
|
51498
|
-
if (drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.center */ .d.center && hoEditorFactory.signHeight / hitHeight < 0.2) {
|
|
51499
|
-
scale = hoEditorFactory.signHeight * 1.5 / hitHeight;
|
|
51500
|
-
}
|
|
51501
|
-
|
|
51502
|
-
_this2._dWidth = hitWidth * scale;
|
|
51503
|
-
|
|
51504
|
-
if (drawNode.fingerPrintSrc !== "") {
|
|
51505
|
-
fingerImage.onload = function () {
|
|
51506
|
-
var fingerWidth = 256;
|
|
51507
|
-
var fingerHeight = fingerImage.naturalHeight !== 0 ? fingerImage.naturalHeight : fingerImage.height;
|
|
51508
|
-
var fingerscale = drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.center */ .d.center ? 0.3 : 0.15;
|
|
51509
|
-
fingerBitmap.scaleX = fingerscale;
|
|
51510
|
-
fingerBitmap.scaleY = fingerscale;
|
|
51511
|
-
fingerBitmap.y = -fingerHeight * fingerscale;
|
|
51512
|
-
bitmap.y = -hitHeight * scale;
|
|
51513
|
-
|
|
51514
|
-
if (drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.left */ .d.left) {
|
|
51515
|
-
bitmap.x = fingerWidth * fingerscale + 5;
|
|
51516
|
-
fingerBitmap.x = 0;
|
|
51517
|
-
_this2._dWidth = hitWidth * scale + 5 + fingerWidth * fingerscale;
|
|
51518
|
-
node.imgHeight = Math.floor(Math.max(fingerHeight * fingerscale, hitHeight * scale));
|
|
51519
|
-
_this2._dHeight = node.imgHeight;
|
|
51520
|
-
} else if (drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.center */ .d.center) {
|
|
51521
|
-
fingerBitmap.x = (hitWidth * scale - fingerWidth * fingerscale) / 2;
|
|
51522
|
-
fingerBitmap.y = -(fingerHeight * fingerscale + currentLineHeight) / 2;
|
|
51523
|
-
bitmap.y = -(hitHeight * scale + currentLineHeight) / 2;
|
|
51524
|
-
node.imgHeight = hoEditorFactory.signHeight;
|
|
51525
|
-
} else if (drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.right */ .d.right) {
|
|
51526
|
-
fingerBitmap.x = hitWidth * scale + 5;
|
|
51527
|
-
_this2._dWidth = hitWidth * scale + 5 + fingerWidth * fingerscale;
|
|
51528
|
-
node.imgHeight = Math.floor(Math.max(fingerHeight * fingerscale, hitHeight * scale));
|
|
51529
|
-
_this2._dHeight = node.imgHeight;
|
|
51530
|
-
}
|
|
51524
|
+
drawNode.addChildAt(bitmap, 0);
|
|
51531
51525
|
|
|
51532
|
-
|
|
51533
|
-
node.type = 3;
|
|
51526
|
+
var _fingerImage = new Image();
|
|
51534
51527
|
|
|
51535
|
-
|
|
51536
|
-
_this2._dWidth = 0;
|
|
51537
|
-
_this2._dHeight = 0;
|
|
51538
|
-
}
|
|
51528
|
+
var _fingerBitmap;
|
|
51539
51529
|
|
|
51540
|
-
|
|
51541
|
-
|
|
51542
|
-
|
|
51543
|
-
|
|
51530
|
+
if (drawNode.fingerPrintSrc !== '') {
|
|
51531
|
+
_fingerImage.src = _this2.fingerPrintSrc;
|
|
51532
|
+
_fingerBitmap = new createjs.Bitmap(_fingerImage);
|
|
51533
|
+
drawNode.addChildAt(_fingerBitmap, 1);
|
|
51534
|
+
hoEditorFactory.loadImageCount++;
|
|
51544
51535
|
|
|
51545
|
-
|
|
51546
|
-
|
|
51547
|
-
updateSign();
|
|
51536
|
+
_fingerImage.onerror = function () {
|
|
51537
|
+
return hoEditorFactory.loadImageCount--;
|
|
51548
51538
|
};
|
|
51549
|
-
} else {
|
|
51550
|
-
_this2._dWidth = hitWidth * scale;
|
|
51551
|
-
node.imgWidth = _this2._dWidth;
|
|
51552
|
-
node.imgHeight = hoEditorFactory.signHeight;
|
|
51553
|
-
node.type = 3;
|
|
51554
|
-
bitmap.setTransform(0, -(hitHeight * scale + currentLineHeight) / 2, scale, scale);
|
|
51555
|
-
updateSign();
|
|
51556
51539
|
}
|
|
51557
|
-
|
|
51540
|
+
|
|
51541
|
+
hoEditorFactory.loadImageCount++;
|
|
51542
|
+
|
|
51543
|
+
image.onerror = function () {
|
|
51544
|
+
return hoEditorFactory.loadImageCount--;
|
|
51545
|
+
};
|
|
51546
|
+
|
|
51547
|
+
image.onload = function () {
|
|
51548
|
+
var hitWidth = image.naturalWidth !== 0 ? image.naturalWidth : image.width;
|
|
51549
|
+
var hitHeight = image.naturalHeight !== 0 ? image.naturalHeight : image.height;
|
|
51550
|
+
var scale = hoEditorFactory.signHeight / hitHeight < 0.4 ? 0.4 : hoEditorFactory.signHeight / hitHeight > 0.7 ? 1 : hoEditorFactory.signHeight / hitHeight;
|
|
51551
|
+
|
|
51552
|
+
if (drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.center */ .d.center && hoEditorFactory.signHeight / hitHeight < 0.2) {
|
|
51553
|
+
scale = hoEditorFactory.signHeight * 1.5 / hitHeight;
|
|
51554
|
+
}
|
|
51555
|
+
|
|
51556
|
+
_this2._dWidth = hitWidth * scale;
|
|
51557
|
+
|
|
51558
|
+
if (drawNode.fingerPrintSrc !== '') {
|
|
51559
|
+
_fingerImage.onload = function () {
|
|
51560
|
+
var fingerWidth = 256;
|
|
51561
|
+
var fingerHeight = _fingerImage.naturalHeight !== 0 ? _fingerImage.naturalHeight : _fingerImage.height;
|
|
51562
|
+
var fingerscale = drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.center */ .d.center ? 0.3 : 0.15;
|
|
51563
|
+
_fingerBitmap.scaleX = fingerscale;
|
|
51564
|
+
_fingerBitmap.scaleY = fingerscale;
|
|
51565
|
+
_fingerBitmap.y = -fingerHeight * fingerscale;
|
|
51566
|
+
bitmap.y = -hitHeight * scale;
|
|
51567
|
+
|
|
51568
|
+
if (drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.left */ .d.left) {
|
|
51569
|
+
bitmap.x = fingerWidth * fingerscale + 5;
|
|
51570
|
+
_fingerBitmap.x = 0;
|
|
51571
|
+
_this2._dWidth = hitWidth * scale + 5 + fingerWidth * fingerscale;
|
|
51572
|
+
node.imgHeight = Math.floor(Math.max(fingerHeight * fingerscale, hitHeight * scale));
|
|
51573
|
+
_this2._dHeight = node.imgHeight;
|
|
51574
|
+
} else if (drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.center */ .d.center) {
|
|
51575
|
+
_fingerBitmap.x = (hitWidth * scale - fingerWidth * fingerscale) / 2;
|
|
51576
|
+
_fingerBitmap.y = -(fingerHeight * fingerscale + currentLineHeight) / 2;
|
|
51577
|
+
bitmap.y = -(hitHeight * scale + currentLineHeight) / 2;
|
|
51578
|
+
node.imgHeight = hoEditorFactory.signHeight;
|
|
51579
|
+
} else if (drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.right */ .d.right) {
|
|
51580
|
+
_fingerBitmap.x = hitWidth * scale + 5;
|
|
51581
|
+
_this2._dWidth = hitWidth * scale + 5 + fingerWidth * fingerscale;
|
|
51582
|
+
node.imgHeight = Math.floor(Math.max(fingerHeight * fingerscale, hitHeight * scale));
|
|
51583
|
+
_this2._dHeight = node.imgHeight;
|
|
51584
|
+
}
|
|
51585
|
+
|
|
51586
|
+
node.imgWidth = _this2._dWidth;
|
|
51587
|
+
|
|
51588
|
+
if (drawNode.fingerPosition == _editor_dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_5__/* .FingerPosition.center */ .d.center) {
|
|
51589
|
+
_this2._dWidth = 0;
|
|
51590
|
+
_this2._dHeight = 0;
|
|
51591
|
+
}
|
|
51592
|
+
|
|
51593
|
+
bitmap.setTransform(bitmap.x, bitmap.y, scale, scale);
|
|
51594
|
+
|
|
51595
|
+
_fingerBitmap.setTransform(_fingerBitmap.x, _fingerBitmap.y, fingerscale, fingerscale);
|
|
51596
|
+
|
|
51597
|
+
var hitArea = new createjs.Shape();
|
|
51598
|
+
hitArea.graphics.beginFill('#000000').drawRect(_fingerBitmap.x, 0, fingerWidth * fingerscale, fingerHeight * fingerscale); //这里是图片大小
|
|
51599
|
+
|
|
51600
|
+
bitmap.hitArea = hitArea;
|
|
51601
|
+
_fingerBitmap.hitArea = hitArea;
|
|
51602
|
+
updateSign();
|
|
51603
|
+
};
|
|
51604
|
+
} else {
|
|
51605
|
+
_this2._dWidth = hitWidth * scale;
|
|
51606
|
+
node.imgWidth = _this2._dWidth;
|
|
51607
|
+
node.imgHeight = hoEditorFactory.signHeight;
|
|
51608
|
+
bitmap.setTransform(0, -(hitHeight * scale + currentLineHeight) / 2, scale, scale);
|
|
51609
|
+
updateSign();
|
|
51610
|
+
}
|
|
51611
|
+
};
|
|
51612
|
+
}
|
|
51558
51613
|
}
|
|
51559
51614
|
};
|
|
51560
51615
|
|
|
@@ -51573,12 +51628,14 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51573
51628
|
} // hoEditorFactory.drawTree.updateDrawTreeFirstLine();
|
|
51574
51629
|
|
|
51575
51630
|
|
|
51576
|
-
hoEditorFactory.drawTree.rebuildArea(
|
|
51631
|
+
hoEditorFactory.drawTree.rebuildArea('main', false);
|
|
51577
51632
|
}
|
|
51578
51633
|
|
|
51579
|
-
|
|
51634
|
+
if (drawNode.imgSrc) {
|
|
51635
|
+
hoEditorFactory.loadImageCount--;
|
|
51636
|
+
}
|
|
51580
51637
|
|
|
51581
|
-
if (drawNode.fingerPrintSrc
|
|
51638
|
+
if (drawNode.fingerPrintSrc) {
|
|
51582
51639
|
hoEditorFactory.loadImageCount--;
|
|
51583
51640
|
}
|
|
51584
51641
|
};
|
|
@@ -51627,19 +51684,19 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51627
51684
|
|
|
51628
51685
|
bitmap.setTransform(0, -hoEditorFactory.signHeight, width / hitWidth, drawNode.dHeight / hitHeight);
|
|
51629
51686
|
var hitArea = new createjs.Shape();
|
|
51630
|
-
hitArea.graphics.beginFill(
|
|
51687
|
+
hitArea.graphics.beginFill('#000').drawRect(0, 0, drawNode.dWidth, drawNode.dHeight); //这里是图片大小
|
|
51631
51688
|
|
|
51632
51689
|
bitmap.hitArea = hitArea;
|
|
51633
51690
|
|
|
51634
|
-
if (_this3.imgSrc.indexOf(
|
|
51635
|
-
var canvas = document.createElement(
|
|
51691
|
+
if (_this3.imgSrc.indexOf('data:image/') != -1 && _this3.imgSrc.indexOf('data:image/png') == -1) {
|
|
51692
|
+
var canvas = document.createElement('canvas');
|
|
51636
51693
|
canvas.width = image.naturalWidth;
|
|
51637
51694
|
canvas.height = image.naturalHeight;
|
|
51638
|
-
var ctx = canvas.getContext(
|
|
51639
|
-
ctx.fillStyle =
|
|
51695
|
+
var ctx = canvas.getContext('2d');
|
|
51696
|
+
ctx.fillStyle = '#FFFFFF';
|
|
51640
51697
|
ctx.fillRect(0, 0, image.naturalWidth, image.naturalHeight);
|
|
51641
51698
|
ctx.drawImage(image, 0, 0, image.naturalWidth, image.naturalHeight);
|
|
51642
|
-
_this3.node.imgSrc = canvas.toDataURL(
|
|
51699
|
+
_this3.node.imgSrc = canvas.toDataURL('image/png');
|
|
51643
51700
|
_this3.node.PNGToJPG = 1;
|
|
51644
51701
|
}
|
|
51645
51702
|
|
|
@@ -51666,18 +51723,18 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51666
51723
|
return hoEditorFactory.loadImageCount--;
|
|
51667
51724
|
};
|
|
51668
51725
|
} else {
|
|
51669
|
-
var signArr = _this3.imgSrc.split(
|
|
51726
|
+
var signArr = _this3.imgSrc.split('\n');
|
|
51670
51727
|
|
|
51671
51728
|
if (signArr.length === 1) {
|
|
51672
|
-
var drawText2 = new createjs.Text(_this3.imgSrc, _this3.textStyle,
|
|
51673
|
-
drawText2.textBaseline =
|
|
51674
|
-
drawText2.textAlign =
|
|
51729
|
+
var drawText2 = new createjs.Text(_this3.imgSrc, _this3.textStyle, '#000000');
|
|
51730
|
+
drawText2.textBaseline = 'alphabetic';
|
|
51731
|
+
drawText2.textAlign = 'left';
|
|
51675
51732
|
var rect = drawText2.getBounds();
|
|
51676
51733
|
|
|
51677
51734
|
if (rect) {
|
|
51678
51735
|
drawText2.y = _this3.y;
|
|
51679
51736
|
|
|
51680
|
-
if (_this3.number === 1 || isFront && _this3.number > 1 || _this3.node.connectMode ===
|
|
51737
|
+
if (_this3.number === 1 || isFront && _this3.number > 1 || _this3.node.connectMode === '换行') {
|
|
51681
51738
|
drawText2.x = 0;
|
|
51682
51739
|
} else {
|
|
51683
51740
|
drawText2.x = _this3._drawText.getMeasuredWidth();
|
|
@@ -51687,16 +51744,16 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51687
51744
|
_this3.addChild(drawText2);
|
|
51688
51745
|
} else {
|
|
51689
51746
|
for (var i = 0; i < signArr.length; i++) {
|
|
51690
|
-
var aText = new createjs.Text(signArr[i], _this3.textStyle,
|
|
51691
|
-
aText.textBaseline =
|
|
51692
|
-
aText.textAlign =
|
|
51747
|
+
var aText = new createjs.Text(signArr[i], _this3.textStyle, '#000000');
|
|
51748
|
+
aText.textBaseline = 'alphabetic';
|
|
51749
|
+
aText.textAlign = 'left';
|
|
51693
51750
|
|
|
51694
51751
|
var _rect = aText.getBounds();
|
|
51695
51752
|
|
|
51696
51753
|
if (_rect) {
|
|
51697
51754
|
aText.y = _this3.dHeight / signArr.length * (i + 1) - _this3.dHeight; //aText.y = -this.dHeight / (i + 1);
|
|
51698
51755
|
|
|
51699
|
-
if (_this3.number === 1 || isFront && _this3.number > 1 || _this3.node.connectMode ===
|
|
51756
|
+
if (_this3.number === 1 || isFront && _this3.number > 1 || _this3.node.connectMode === '换行') {
|
|
51700
51757
|
aText.x = 0;
|
|
51701
51758
|
} else {
|
|
51702
51759
|
aText.x = _this3._drawText.getMeasuredWidth();
|
|
@@ -51710,9 +51767,9 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51710
51767
|
};
|
|
51711
51768
|
|
|
51712
51769
|
if (this.number === 0) {
|
|
51713
|
-
var drawText1 = new createjs.Text(this.signName, this.textStyle,
|
|
51714
|
-
drawText1.textBaseline =
|
|
51715
|
-
drawText1.textAlign =
|
|
51770
|
+
var drawText1 = new createjs.Text(this.signName, this.textStyle, '#838586');
|
|
51771
|
+
drawText1.textBaseline = 'alphabetic';
|
|
51772
|
+
drawText1.textAlign = 'left';
|
|
51716
51773
|
var rect = drawText1.getBounds();
|
|
51717
51774
|
|
|
51718
51775
|
if (rect) {
|
|
@@ -51740,37 +51797,37 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
51740
51797
|
var connectMode = this.node.connectMode;
|
|
51741
51798
|
var line = new createjs.Shape();
|
|
51742
51799
|
|
|
51743
|
-
if (connectMode ===
|
|
51800
|
+
if (connectMode === '/') {
|
|
51744
51801
|
if (this.type === 1) {
|
|
51745
51802
|
if (isFront) {
|
|
51746
|
-
line.graphics.beginStroke(
|
|
51803
|
+
line.graphics.beginStroke('#000000').moveTo(this.dWidth - this._drawText.getMeasuredWidth(), 0).lineTo(this.dWidth, -this.dHeight);
|
|
51747
51804
|
} else {
|
|
51748
|
-
line.graphics.beginStroke(
|
|
51805
|
+
line.graphics.beginStroke('#000000').moveTo(0, 0).lineTo(this._drawText.getMeasuredWidth(), -this.dHeight);
|
|
51749
51806
|
}
|
|
51750
51807
|
} else {
|
|
51751
|
-
var signArr = this.imgSrc.split(
|
|
51752
|
-
var theHeight = new createjs.Text(this.imgSrc, this.textStyle,
|
|
51808
|
+
var signArr = this.imgSrc.split('\n');
|
|
51809
|
+
var theHeight = new createjs.Text(this.imgSrc, this.textStyle, '#000000').getMeasuredHeight();
|
|
51753
51810
|
|
|
51754
51811
|
if (signArr.length > 1) {
|
|
51755
51812
|
for (var i = 1; i < signArr.length; i++) {
|
|
51756
|
-
var aText = new createjs.Text(signArr[i], this.textStyle,
|
|
51813
|
+
var aText = new createjs.Text(signArr[i], this.textStyle, '#000000');
|
|
51757
51814
|
theHeight = theHeight + aText.getMeasuredHeight();
|
|
51758
51815
|
}
|
|
51759
51816
|
}
|
|
51760
51817
|
|
|
51761
51818
|
if (isFront) {
|
|
51762
|
-
line.graphics.beginStroke(
|
|
51819
|
+
line.graphics.beginStroke('#000000').moveTo(this.dWidth - this._drawText.getMeasuredWidth(), 2).lineTo(this.dWidth, -theHeight - 2);
|
|
51763
51820
|
} else {
|
|
51764
|
-
line.graphics.beginStroke(
|
|
51821
|
+
line.graphics.beginStroke('#000000').moveTo(0, 2).lineTo(this._drawText.getMeasuredWidth(), -theHeight - 2);
|
|
51765
51822
|
}
|
|
51766
51823
|
}
|
|
51767
51824
|
|
|
51768
51825
|
this.addChildAt(line);
|
|
51769
|
-
} else if (connectMode ===
|
|
51826
|
+
} else if (connectMode === '换行') {
|
|
51770
51827
|
return;
|
|
51771
51828
|
} else {
|
|
51772
|
-
this._drawText.textBaseline =
|
|
51773
|
-
this._drawText.textAlign =
|
|
51829
|
+
this._drawText.textBaseline = 'alphabetic';
|
|
51830
|
+
this._drawText.textAlign = 'left';
|
|
51774
51831
|
|
|
51775
51832
|
var rect = this._drawText.getBounds();
|
|
51776
51833
|
|
|
@@ -54786,6 +54843,11 @@ var Caret = /*#__PURE__*/function () {
|
|
|
54786
54843
|
this.div_cursor.style.height = Math.max(val, 12) * DrawConfig/* DrawConfig.instance */.f.instance().scaleXY + "px"; // this.updateCaret();
|
|
54787
54844
|
}
|
|
54788
54845
|
}
|
|
54846
|
+
}, {
|
|
54847
|
+
key: "X",
|
|
54848
|
+
get: function get() {
|
|
54849
|
+
return this.x;
|
|
54850
|
+
}
|
|
54789
54851
|
}, {
|
|
54790
54852
|
key: "Y",
|
|
54791
54853
|
get: function get() {
|
|
@@ -62489,7 +62551,7 @@ var NodeStyleUndoUnit = /*#__PURE__*/function () {
|
|
|
62489
62551
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60199);
|
|
62490
62552
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91347);
|
|
62491
62553
|
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42015);
|
|
62492
|
-
/* harmony import */ var
|
|
62554
|
+
/* harmony import */ var D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(16296);
|
|
62493
62555
|
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66992);
|
|
62494
62556
|
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
62495
62557
|
/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(51532);
|
|
@@ -62504,28 +62566,34 @@ var NodeStyleUndoUnit = /*#__PURE__*/function () {
|
|
|
62504
62566
|
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
62505
62567
|
/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(21703);
|
|
62506
62568
|
/* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
62507
|
-
/* harmony import */ var
|
|
62508
|
-
/* harmony import */ var
|
|
62509
|
-
/* harmony import */ var
|
|
62510
|
-
/* harmony import */ var
|
|
62511
|
-
/* harmony import */ var
|
|
62512
|
-
/* harmony import */ var
|
|
62513
|
-
/* harmony import */ var
|
|
62514
|
-
/* harmony import */ var
|
|
62515
|
-
/* harmony import */ var
|
|
62516
|
-
/* harmony import */ var
|
|
62517
|
-
/* harmony import */ var
|
|
62518
|
-
/* harmony import */ var
|
|
62519
|
-
/* harmony import */ var
|
|
62520
|
-
/* harmony import */ var
|
|
62521
|
-
/* harmony import */ var
|
|
62522
|
-
/* harmony import */ var
|
|
62523
|
-
/* harmony import */ var
|
|
62524
|
-
/* harmony import */ var
|
|
62525
|
-
/* harmony import */ var
|
|
62526
|
-
/* harmony import */ var
|
|
62527
|
-
/* harmony import */ var
|
|
62528
|
-
/* harmony import */ var
|
|
62569
|
+
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(26699);
|
|
62570
|
+
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
62571
|
+
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(32023);
|
|
62572
|
+
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
62573
|
+
/* harmony import */ var _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(71080);
|
|
62574
|
+
/* harmony import */ var _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(27564);
|
|
62575
|
+
/* harmony import */ var _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(35657);
|
|
62576
|
+
/* harmony import */ var _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(27356);
|
|
62577
|
+
/* harmony import */ var _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(75438);
|
|
62578
|
+
/* harmony import */ var _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(26608);
|
|
62579
|
+
/* harmony import */ var _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(40713);
|
|
62580
|
+
/* harmony import */ var _UndoService__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(19633);
|
|
62581
|
+
/* harmony import */ var _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(69802);
|
|
62582
|
+
/* harmony import */ var _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(92730);
|
|
62583
|
+
/* harmony import */ var _events_Exception__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(8696);
|
|
62584
|
+
/* harmony import */ var _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(13880);
|
|
62585
|
+
/* harmony import */ var _dom_treeNode_CellNode__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(69088);
|
|
62586
|
+
/* harmony import */ var _draw_SelectRange__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(62938);
|
|
62587
|
+
/* harmony import */ var _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(59530);
|
|
62588
|
+
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(28831);
|
|
62589
|
+
/* harmony import */ var _dom_treeNode_ControlNode__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(99964);
|
|
62590
|
+
/* harmony import */ var _dom_treeNode_RadioAndCheckBoxNode__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(89104);
|
|
62591
|
+
/* harmony import */ var _dom_treeNode_DateTimeNode__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(40253);
|
|
62592
|
+
/* harmony import */ var _dom_treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(76771);
|
|
62593
|
+
/* harmony import */ var _NodeInsertUndoUnit__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(11438);
|
|
62594
|
+
/* harmony import */ var _dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(78975);
|
|
62595
|
+
|
|
62596
|
+
|
|
62529
62597
|
|
|
62530
62598
|
|
|
62531
62599
|
|
|
@@ -62584,10 +62652,10 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62584
62652
|
this._startPath = startPath;
|
|
62585
62653
|
this._endPath = endPath;
|
|
62586
62654
|
this._isForceDelete = isForceDelete;
|
|
62587
|
-
this._undo = new
|
|
62655
|
+
this._undo = new _UndoService__WEBPACK_IMPORTED_MODULE_21__/* .UndoService */ .O(this._hoEditorFactoryID); //hoEditorFactory.undoService;
|
|
62588
62656
|
|
|
62589
62657
|
this._undoNodes = new Map();
|
|
62590
|
-
var aDomRange = new
|
|
62658
|
+
var aDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange */ .a(hoEditorFactoryID, startPath, endPath).normalize();
|
|
62591
62659
|
|
|
62592
62660
|
var _aDomRange$inSameTabl = aDomRange.inSameTable(),
|
|
62593
62661
|
_aDomRange$inSameTabl2 = (0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_aDomRange$inSameTabl, 2),
|
|
@@ -62596,10 +62664,10 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62596
62664
|
|
|
62597
62665
|
this._bSameTable = bSametable;
|
|
62598
62666
|
this._opTime = new Date();
|
|
62599
|
-
this._affectText =
|
|
62667
|
+
this._affectText = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys.instance */ .b.instance().getFactory(hoEditorFactoryID).vueController.getRangeText(aDomRange);
|
|
62600
62668
|
}
|
|
62601
62669
|
|
|
62602
|
-
(0,
|
|
62670
|
+
(0,D_project_go_emr_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_36__/* ["default"] */ .Z)(NodesDeleteUndoUnit, [{
|
|
62603
62671
|
key: "undo",
|
|
62604
62672
|
value: function undo() {
|
|
62605
62673
|
//2.插入删除的节点
|
|
@@ -62611,12 +62679,12 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62611
62679
|
var arr = Array.from(this._undoNodes).reverse();
|
|
62612
62680
|
var i = 0;
|
|
62613
62681
|
var prevIsTable = false;
|
|
62614
|
-
var hoEditorFactory =
|
|
62682
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
62615
62683
|
|
|
62616
62684
|
while (i < arr.length) {
|
|
62617
62685
|
var value = arr[i];
|
|
62618
62686
|
|
|
62619
|
-
if (value[1] instanceof
|
|
62687
|
+
if (value[1] instanceof _dom_treeNode_CellNode__WEBPACK_IMPORTED_MODULE_26__/* .CellNode */ .D) {// (value[1] as CellNode).redrawCell(true, DocAction.daInsert);
|
|
62620
62688
|
} else {
|
|
62621
62689
|
if (prevIsTable) {
|
|
62622
62690
|
hoEditorFactory.docTree.insertNodeAfterNode(arr[i - 1][1], arr[i][1]);
|
|
@@ -62624,12 +62692,12 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62624
62692
|
hoEditorFactory.docTree.insertNodeAfterPath(value[0], value[1]);
|
|
62625
62693
|
}
|
|
62626
62694
|
|
|
62627
|
-
if (value[1] instanceof
|
|
62695
|
+
if (value[1] instanceof _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_28__/* .TableNode */ .Fh) {
|
|
62628
62696
|
prevIsTable = true; // value[1].clearDrawNodes();
|
|
62629
62697
|
// value[1].drawTable.drawPageTables.length = 0;
|
|
62630
62698
|
|
|
62631
62699
|
var np = hoEditorFactory.docTree.findNodePositionByPath(value[0]);
|
|
62632
|
-
if (np && np.node && np.node instanceof
|
|
62700
|
+
if (np && np.node && np.node instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_25__/* .ParagraphNode */ .C) value[1].drawTable.paragraphNode = np.node;
|
|
62633
62701
|
} else {
|
|
62634
62702
|
prevIsTable = false;
|
|
62635
62703
|
}
|
|
@@ -62639,7 +62707,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62639
62707
|
}
|
|
62640
62708
|
|
|
62641
62709
|
var aendPaht = hoEditorFactory.docTree.getNodeLastPath(arr[arr.length - 1][1]);
|
|
62642
|
-
var changeEvent = new
|
|
62710
|
+
var changeEvent = new _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_16__/* .NodeChangeEvent */ .G(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_14__/* .DocAction.daInsert */ .gk.daInsert, arr[0][0], aendPaht);
|
|
62643
62711
|
hoEditorFactory.docTree.change(changeEvent); //3.合并拆分节点
|
|
62644
62712
|
|
|
62645
62713
|
while (!this._undo.atBottom()) {
|
|
@@ -62667,9 +62735,9 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62667
62735
|
//选中范围变化事件
|
|
62668
62736
|
|
|
62669
62737
|
|
|
62670
|
-
var newRange = new
|
|
62738
|
+
var newRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange */ .a(this._hoEditorFactoryID, this._startPath, this._endPath).normalize();
|
|
62671
62739
|
hoEditorFactory.docTree.curDomRange = newRange;
|
|
62672
|
-
var cgEvent = new
|
|
62740
|
+
var cgEvent = new _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_20__/* .SelectionChangeEvent */ .r(hoEditorFactory.docTree.curDomRange, newRange);
|
|
62673
62741
|
hoEditorFactory.docTree.selectChange(cgEvent); //光标定位
|
|
62674
62742
|
|
|
62675
62743
|
hoEditorFactory.drawTree.moveCaretToPath(newRange.endPath);
|
|
@@ -62688,7 +62756,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62688
62756
|
}, {
|
|
62689
62757
|
key: "MoveCaret",
|
|
62690
62758
|
value: function MoveCaret(path) {
|
|
62691
|
-
|
|
62759
|
+
_HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.moveCaretToPath(path);
|
|
62692
62760
|
}
|
|
62693
62761
|
/**
|
|
62694
62762
|
* @description 返回前面一个node的开始结束选中范围 文本节点时候返回文本中单个文字的选中范围
|
|
@@ -62699,30 +62767,30 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62699
62767
|
key: "getPrevNodeDomRange",
|
|
62700
62768
|
value: function getPrevNodeDomRange(Anode) {
|
|
62701
62769
|
var spath;
|
|
62702
|
-
var hoEditorFactory =
|
|
62770
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
62703
62771
|
var prev = Anode.prevSibling();
|
|
62704
62772
|
|
|
62705
62773
|
if (!prev) {
|
|
62706
|
-
throw
|
|
62774
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_24__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
62707
62775
|
}
|
|
62708
62776
|
|
|
62709
62777
|
var epath = hoEditorFactory.docTree.getNodeLastPath(prev);
|
|
62710
62778
|
|
|
62711
|
-
if (prev instanceof
|
|
62779
|
+
if (prev instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_15__/* .TextNode */ .R) {
|
|
62712
62780
|
spath = prev.prevPath(epath);
|
|
62713
|
-
} else if (prev instanceof
|
|
62781
|
+
} else if (prev instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_25__/* .ParagraphNode */ .C) {
|
|
62714
62782
|
spath = epath;
|
|
62715
62783
|
} else {
|
|
62716
62784
|
var prev1 = prev.previousLeaf();
|
|
62717
62785
|
|
|
62718
62786
|
if (!prev1) {
|
|
62719
|
-
throw
|
|
62787
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_24__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
62720
62788
|
}
|
|
62721
62789
|
|
|
62722
62790
|
spath = hoEditorFactory.docTree.getNodeLastPath(prev1);
|
|
62723
62791
|
}
|
|
62724
62792
|
|
|
62725
|
-
return new
|
|
62793
|
+
return new _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange */ .a(this._hoEditorFactoryID, spath, epath);
|
|
62726
62794
|
}
|
|
62727
62795
|
/**
|
|
62728
62796
|
*
|
|
@@ -62736,23 +62804,23 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62736
62804
|
}, {
|
|
62737
62805
|
key: "deleteRange",
|
|
62738
62806
|
value: function deleteRange(endpath, startpath) {
|
|
62739
|
-
var currRange = new
|
|
62807
|
+
var currRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange */ .a(this._hoEditorFactoryID, startpath, endpath).normalize(); //拆分更新节点,更新删除范围 this._tmp
|
|
62740
62808
|
|
|
62741
62809
|
if (!this.spliteNode(currRange)) {
|
|
62742
62810
|
return 0;
|
|
62743
62811
|
}
|
|
62744
62812
|
|
|
62745
|
-
var newDomRange = new
|
|
62746
|
-
if (!newDomRange.npStart.node) throw
|
|
62747
|
-
if (!newDomRange.npEnd.node) throw
|
|
62813
|
+
var newDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.end);
|
|
62814
|
+
if (!newDomRange.npStart.node) throw _events_Exception__WEBPACK_IMPORTED_MODULE_24__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
62815
|
+
if (!newDomRange.npEnd.node) throw _events_Exception__WEBPACK_IMPORTED_MODULE_24__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
62748
62816
|
var aStart = newDomRange.npStart.node;
|
|
62749
62817
|
|
|
62750
62818
|
if (currRange.startMainNode) {
|
|
62751
62819
|
aStart = currRange.startMainNode;
|
|
62752
62820
|
}
|
|
62753
62821
|
|
|
62754
|
-
var nodes =
|
|
62755
|
-
var hoEditorFactory =
|
|
62822
|
+
var nodes = _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange.getSelectDomNodesForDelete */ .a.getSelectDomNodesForDelete(this._hoEditorFactoryID, this._tmp.start, this._tmp.end);
|
|
62823
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID); // this.DeleteBaseCombineNodeContent(
|
|
62756
62824
|
// newDomRange,
|
|
62757
62825
|
// newDomRange.npEnd.node,
|
|
62758
62826
|
// aStart,
|
|
@@ -62877,7 +62945,8 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62877
62945
|
}, {
|
|
62878
62946
|
key: "spliteNode",
|
|
62879
62947
|
value: function spliteNode(Arange) {
|
|
62880
|
-
var _this = this
|
|
62948
|
+
var _this = this,
|
|
62949
|
+
_s$parentNode$downLis;
|
|
62881
62950
|
|
|
62882
62951
|
var s = Arange.npStart.node;
|
|
62883
62952
|
var e = Arange.npEnd.node;
|
|
@@ -62887,10 +62956,10 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62887
62956
|
* @param Anode
|
|
62888
62957
|
*/
|
|
62889
62958
|
|
|
62890
|
-
var hoEditorFactory =
|
|
62959
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
62891
62960
|
|
|
62892
62961
|
var forMarkNode = function forMarkNode(Anode) {
|
|
62893
|
-
if (Anode.parentNode instanceof
|
|
62962
|
+
if (Anode.parentNode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_22__/* .TextInputFieldNode */ .re) {
|
|
62894
62963
|
var pTINode = Anode.parentNode;
|
|
62895
62964
|
|
|
62896
62965
|
if (pTINode.isEmpty() || !pTINode.canModifyContent) {
|
|
@@ -62898,11 +62967,11 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62898
62967
|
var tmp = pTINode.previousLeaf();
|
|
62899
62968
|
|
|
62900
62969
|
if (!tmp) {
|
|
62901
|
-
throw
|
|
62970
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_24__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
62902
62971
|
}
|
|
62903
62972
|
|
|
62904
62973
|
info[0] = 0;
|
|
62905
|
-
info[1] = new
|
|
62974
|
+
info[1] = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange */ .a(_this._hoEditorFactoryID, hoEditorFactory.docTree.getNodeLastPath(tmp), hoEditorFactory.docTree.getNodeLastPath(pTINode));
|
|
62906
62975
|
} else {
|
|
62907
62976
|
if (Anode == pTINode.last()) {
|
|
62908
62977
|
//递归调用删除
|
|
@@ -62928,18 +62997,20 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62928
62997
|
};
|
|
62929
62998
|
|
|
62930
62999
|
if (!(s && e)) {
|
|
62931
|
-
throw
|
|
63000
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_24__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
62932
63001
|
}
|
|
62933
63002
|
|
|
62934
63003
|
this._tmp.start = Arange.startPath;
|
|
62935
|
-
this._tmp.end = Arange.endPath;
|
|
62936
|
-
|
|
62937
|
-
|
|
63004
|
+
this._tmp.end = Arange.endPath;
|
|
63005
|
+
|
|
63006
|
+
if (s instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_23__/* .MarkNode */ .j && s.parentNode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_22__/* .TextInputFieldNode */ .re && s.parentNode.inputFieldType === 1 && (_s$parentNode$downLis = s.parentNode.downListProperty.listItems) !== null && _s$parentNode$downLis !== void 0 && _s$parentNode$downLis.includes("<元素>")) {
|
|
63007
|
+
return true;
|
|
63008
|
+
}
|
|
62938
63009
|
|
|
62939
63010
|
if (s === e) {
|
|
62940
|
-
if (s instanceof
|
|
63011
|
+
if (s instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_15__/* .TextNode */ .R) {
|
|
62941
63012
|
// HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.curDomRange = Arange;
|
|
62942
|
-
var tmp = new
|
|
63013
|
+
var tmp = new _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_19__/* .TextNodeSplitUndoUnit */ .W(this._hoEditorFactoryID, Arange.startPath, s, Arange);
|
|
62943
63014
|
|
|
62944
63015
|
this._undo.begin();
|
|
62945
63016
|
|
|
@@ -62948,7 +63019,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62948
63019
|
this._undo.commit();
|
|
62949
63020
|
|
|
62950
63021
|
this._tmp.end = hoEditorFactory.docTree.getNodeLastPath(tmp.theNode);
|
|
62951
|
-
} else if (s instanceof
|
|
63022
|
+
} else if (s instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_23__/* .MarkNode */ .j) {
|
|
62952
63023
|
forMarkNode(s);
|
|
62953
63024
|
|
|
62954
63025
|
if (info[0] == 0 && info[1]) {
|
|
@@ -62965,8 +63036,8 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62965
63036
|
} else {
|
|
62966
63037
|
var _tmp3 = null;
|
|
62967
63038
|
|
|
62968
|
-
if (e instanceof
|
|
62969
|
-
_tmp3 = new
|
|
63039
|
+
if (e instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_15__/* .TextNode */ .R && Arange.npEnd.childIndex >= 0 && Arange.npEnd.childIndex < e.getLength() - 1) {
|
|
63040
|
+
_tmp3 = new _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_19__/* .TextNodeSplitUndoUnit */ .W(this._hoEditorFactoryID, Arange.endPath, e, Arange);
|
|
62970
63041
|
|
|
62971
63042
|
this._undo.begin();
|
|
62972
63043
|
|
|
@@ -62975,22 +63046,22 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
62975
63046
|
this._undo.commit();
|
|
62976
63047
|
}
|
|
62977
63048
|
|
|
62978
|
-
if (s instanceof
|
|
63049
|
+
if (s instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_15__/* .TextNode */ .R && Arange.npStart.childIndex >= 0 && Arange.npStart.childIndex < s.getLength() - 1) {
|
|
62979
63050
|
this._undo.begin();
|
|
62980
63051
|
|
|
62981
|
-
this._undo.add(new
|
|
63052
|
+
this._undo.add(new _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_19__/* .TextNodeSplitUndoUnit */ .W(this._hoEditorFactoryID, Arange.startPath, s, Arange));
|
|
62982
63053
|
|
|
62983
63054
|
this._undo.commit();
|
|
62984
63055
|
}
|
|
62985
63056
|
|
|
62986
|
-
if (e instanceof
|
|
63057
|
+
if (e instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_23__/* .MarkNode */ .j) {
|
|
62987
63058
|
forMarkNode(e);
|
|
62988
63059
|
|
|
62989
63060
|
if (info[0] == 0 && info[1]) {
|
|
62990
63061
|
this._tmp.end = info[1].endPath; // return this.spliteNode(new DomRange(this._tmp.start, this._tmp.end));
|
|
62991
63062
|
} else if ((info[0] == 1 || info[0] == 2) && info[1]) {
|
|
62992
63063
|
this._tmp.end = info[1].endPath;
|
|
62993
|
-
return this.spliteNode(new
|
|
63064
|
+
return this.spliteNode(new _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.end));
|
|
62994
63065
|
}
|
|
62995
63066
|
}
|
|
62996
63067
|
|
|
@@ -63006,15 +63077,15 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63006
63077
|
}, {
|
|
63007
63078
|
key: "ParentRepaint",
|
|
63008
63079
|
value: function ParentRepaint(Anode) {
|
|
63009
|
-
if (Anode && Anode instanceof
|
|
63010
|
-
var hoEditorFactory =
|
|
63080
|
+
if (Anode && Anode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_22__/* .TextInputFieldNode */ .re) {
|
|
63081
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
63011
63082
|
|
|
63012
63083
|
if (Anode.childNodes.length === 2) {
|
|
63013
63084
|
var contentMarkNode = Anode.childNodes2[1];
|
|
63014
63085
|
contentMarkNode.styleIndex = Anode.childNodes[0].styleIndex;
|
|
63015
63086
|
var insertPath = hoEditorFactory.docTree.getNodeLastPath(Anode.childNodes[0]);
|
|
63016
63087
|
hoEditorFactory.undoService.begin();
|
|
63017
|
-
hoEditorFactory.undoService.add(new
|
|
63088
|
+
hoEditorFactory.undoService.add(new _NodeInsertUndoUnit__WEBPACK_IMPORTED_MODULE_34__/* .NodeInsertUndoUnit */ .R(this._hoEditorFactoryID, insertPath, contentMarkNode));
|
|
63018
63089
|
hoEditorFactory.undoService.commit();
|
|
63019
63090
|
}
|
|
63020
63091
|
|
|
@@ -63039,16 +63110,16 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63039
63110
|
switch (_context.prev = _context.next) {
|
|
63040
63111
|
case 0:
|
|
63041
63112
|
this.initParam();
|
|
63042
|
-
currRange = new
|
|
63043
|
-
hoEditorFactory =
|
|
63113
|
+
currRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange */ .a(this._hoEditorFactoryID, this._startPath, this._endPath).normalize();
|
|
63114
|
+
hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_29__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
63044
63115
|
hoEditorFactory.docTree.curDomRange = currRange;
|
|
63045
63116
|
|
|
63046
|
-
if (!(hoEditorFactory.drawTree.paintStatus ===
|
|
63117
|
+
if (!(hoEditorFactory.drawTree.paintStatus === _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_17__/* .PaintState.psReview */ .Dh.psReview)) {
|
|
63047
63118
|
_context.next = 10;
|
|
63048
63119
|
break;
|
|
63049
63120
|
}
|
|
63050
63121
|
|
|
63051
|
-
if (!(currRange.npEnd.node && currRange.npEnd.node instanceof
|
|
63122
|
+
if (!(currRange.npEnd.node && currRange.npEnd.node instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_15__/* .TextNode */ .R)) {
|
|
63052
63123
|
_context.next = 10;
|
|
63053
63124
|
break;
|
|
63054
63125
|
}
|
|
@@ -63065,7 +63136,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63065
63136
|
return _context.abrupt("return");
|
|
63066
63137
|
|
|
63067
63138
|
case 10:
|
|
63068
|
-
nodes =
|
|
63139
|
+
nodes = _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange.getSelectDomNodesForDelete */ .a.getSelectDomNodesForDelete(this._hoEditorFactoryID, this._startPath, this._endPath); // const npFirst = hoEditorFactory.docTree.findNodePositionByPath(this._startPath);
|
|
63069
63140
|
// if (npFirst && npFirst.node) {
|
|
63070
63141
|
// //const parentNode = hoEditorFactory.docTree.getParentNode(this._startPath);
|
|
63071
63142
|
// //if (parentNode) {
|
|
@@ -63076,7 +63147,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63076
63147
|
// }
|
|
63077
63148
|
//if(nodes.length == 0) return;
|
|
63078
63149
|
|
|
63079
|
-
if (!(hoEditorFactory.drawTree.paintStatus !==
|
|
63150
|
+
if (!(hoEditorFactory.drawTree.paintStatus !== _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_17__/* .PaintState.psDesign */ .Dh.psDesign && !this._isForceDelete)) {
|
|
63080
63151
|
_context.next = 33;
|
|
63081
63152
|
break;
|
|
63082
63153
|
}
|
|
@@ -63091,7 +63162,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63091
63162
|
|
|
63092
63163
|
node = nodes[n];
|
|
63093
63164
|
|
|
63094
|
-
if (!(node instanceof
|
|
63165
|
+
if (!(node instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_23__/* .MarkNode */ .j && node.parentNode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_22__/* .TextInputFieldNode */ .re && node.MarkNodeType === 1 && !node.parentNode.isAllowDelete)) {
|
|
63095
63166
|
_context.next = 18;
|
|
63096
63167
|
break;
|
|
63097
63168
|
}
|
|
@@ -63101,7 +63172,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63101
63172
|
return _context.abrupt("return", 0);
|
|
63102
63173
|
|
|
63103
63174
|
case 18:
|
|
63104
|
-
if (!(node instanceof
|
|
63175
|
+
if (!(node instanceof _dom_treeNode_ControlNode__WEBPACK_IMPORTED_MODULE_30__/* .ControlNode */ .w || node instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_22__/* .TextInputFieldNode */ .re)) {
|
|
63105
63176
|
_context.next = 27;
|
|
63106
63177
|
break;
|
|
63107
63178
|
}
|
|
@@ -63113,19 +63184,19 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63113
63184
|
|
|
63114
63185
|
tip = "";
|
|
63115
63186
|
|
|
63116
|
-
if (node instanceof
|
|
63187
|
+
if (node instanceof _dom_treeNode_RadioAndCheckBoxNode__WEBPACK_IMPORTED_MODULE_31__/* .RadioAndCheckBoxNode */ .Yh && node.controlStyle === "RadioBox") {
|
|
63117
63188
|
tip = "单选框";
|
|
63118
63189
|
}
|
|
63119
63190
|
|
|
63120
|
-
if (node instanceof
|
|
63191
|
+
if (node instanceof _dom_treeNode_RadioAndCheckBoxNode__WEBPACK_IMPORTED_MODULE_31__/* .RadioAndCheckBoxNode */ .Yh && node.controlStyle === "CheckBox") {
|
|
63121
63192
|
tip = "复选框";
|
|
63122
63193
|
}
|
|
63123
63194
|
|
|
63124
|
-
if (node instanceof
|
|
63195
|
+
if (node instanceof _dom_treeNode_DateTimeNode__WEBPACK_IMPORTED_MODULE_32__/* .DateTimeNode */ .Z) {
|
|
63125
63196
|
tip = "日期时间";
|
|
63126
63197
|
}
|
|
63127
63198
|
|
|
63128
|
-
if (node instanceof
|
|
63199
|
+
if (node instanceof _dom_treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_33__/* .DownListNode */ .yF) {
|
|
63129
63200
|
tip = "下拉列表";
|
|
63130
63201
|
}
|
|
63131
63202
|
|
|
@@ -63134,7 +63205,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63134
63205
|
return _context.abrupt("return", 0);
|
|
63135
63206
|
|
|
63136
63207
|
case 27:
|
|
63137
|
-
if (!(node instanceof
|
|
63208
|
+
if (!(node instanceof _dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_35__/* .SignNode */ .N && node.isTemplate && node.number === 0)) {
|
|
63138
63209
|
_context.next = 30;
|
|
63139
63210
|
break;
|
|
63140
63211
|
}
|
|
@@ -63151,7 +63222,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63151
63222
|
case 33:
|
|
63152
63223
|
pnode = (_currRange$npEnd$node = currRange.npEnd.node) === null || _currRange$npEnd$node === void 0 ? void 0 : _currRange$npEnd$node.parentNode;
|
|
63153
63224
|
|
|
63154
|
-
if (!(pnode && pnode instanceof
|
|
63225
|
+
if (!(pnode && pnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_22__/* .TextInputFieldNode */ .re && currRange.npEnd.path != hoEditorFactory.docTree.getNodeLastPath(pnode))) {
|
|
63155
63226
|
_context.next = 39;
|
|
63156
63227
|
break;
|
|
63157
63228
|
}
|
|
@@ -63172,7 +63243,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63172
63243
|
return _context.abrupt("return");
|
|
63173
63244
|
|
|
63174
63245
|
case 39:
|
|
63175
|
-
changeEvent = new
|
|
63246
|
+
changeEvent = new _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_16__/* .NodeChangeEvent */ .G(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_14__/* .DocAction.daUndoInsert */ .gk.daUndoInsert, currRange.startPath, ""); //FIXME:deleteRange函数完成后调用这个
|
|
63176
63247
|
// hoEditorFactory.docTree.deleteRange(arange.startPath, arange.endPath);
|
|
63177
63248
|
|
|
63178
63249
|
if (currRange.npStart.node && currRange.npEnd.node) {
|
|
@@ -63180,7 +63251,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63180
63251
|
break;
|
|
63181
63252
|
}
|
|
63182
63253
|
|
|
63183
|
-
throw
|
|
63254
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_24__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
63184
63255
|
|
|
63185
63256
|
case 42:
|
|
63186
63257
|
// const [startPath, endPath] = DomRange.skipStartEndTablePath(
|
|
@@ -63191,7 +63262,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63191
63262
|
startPath = currRange.startPath;
|
|
63192
63263
|
endPath = currRange.endPath;
|
|
63193
63264
|
changeEvent.oldEndPath = endPath;
|
|
63194
|
-
changeEvent.oldDrawTreeLines = new
|
|
63265
|
+
changeEvent.oldDrawTreeLines = new _draw_SelectRange__WEBPACK_IMPORTED_MODULE_27__/* .SelectRange */ .E(this._hoEditorFactoryID).getRangeDrawTreeLines(startPath, endPath);
|
|
63195
63266
|
res = this.deleteRange(currRange.endPath, currRange.startPath);
|
|
63196
63267
|
|
|
63197
63268
|
if (!(res == 1)) {
|
|
@@ -63205,7 +63276,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
63205
63276
|
return hoEditorFactory.docTree.change(changeEvent);
|
|
63206
63277
|
|
|
63207
63278
|
case 52:
|
|
63208
|
-
cgEvent = new
|
|
63279
|
+
cgEvent = new _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_20__/* .SelectionChangeEvent */ .r(hoEditorFactory.docTree.curDomRange, new _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.start));
|
|
63209
63280
|
hoEditorFactory.docTree.selectChange(cgEvent);
|
|
63210
63281
|
|
|
63211
63282
|
case 54:
|
|
@@ -67291,8 +67362,8 @@ var dealImage = function dealImage(base64, callback, qualitys, size, img) {
|
|
|
67291
67362
|
var imgWidth, imgHeight;
|
|
67292
67363
|
|
|
67293
67364
|
newImage.onload = function () {
|
|
67294
|
-
imgWidth = newImage.
|
|
67295
|
-
imgHeight = newImage.
|
|
67365
|
+
imgWidth = newImage.naturalWidth;
|
|
67366
|
+
imgHeight = newImage.naturalHeight;
|
|
67296
67367
|
var canvas = document.createElement("canvas");
|
|
67297
67368
|
var ctx = canvas.getContext("2d");
|
|
67298
67369
|
|
|
@@ -99502,7 +99573,8 @@ if(element.nodeName==="IMG"&&element.hasAttribute("src")){var src=""+element.get
|
|
|
99502
99573
|
if(src.indexOf("data:image/")===0){return atob(unescape(src).split("base64,").pop());}//it is probably an url, try to load it
|
|
99503
99574
|
var tmpImageData=jsPDFAPI.loadFile(src,true);if(tmpImageData!==undefined){return tmpImageData;}}if(element.nodeName==="CANVAS"){if(element.width===0||element.height===0){throw new Error("Given canvas must have data. Canvas width: "+element.width+", height: "+element.height);}var mimeType;switch(format){case"PNG":mimeType="image/png";break;case"WEBP":mimeType="image/webp";break;case"JPEG":case"JPG":default:mimeType="image/jpeg";break;}return atob(element.toDataURL(mimeType,1.0).split("base64,").pop());}};var checkImagesForAlias=function checkImagesForAlias(alias){var images=this.internal.collections[namespace+"images"];if(images){for(var e in images){if(alias===images[e].alias){return images[e];}}}};var determineWidthAndHeight=function determineWidthAndHeight(width,height,image){if(!width&&!height){width=-96;height=-96;}if(width<0){width=-1*image.width*72/width/this.internal.scaleFactor;}if(height<0){height=-1*image.height*72/height/this.internal.scaleFactor;}if(width===0){width=height*image.width/image.height;}if(height===0){height=width*image.height/image.width;}return[width,height];};var writeImageToPDF=function writeImageToPDF(x,y,width,height,image,rotation){var dims=determineWidthAndHeight.call(this,width,height,image),coord=this.internal.getCoordinateString,vcoord=this.internal.getVerticalCoordinateString;var images=getImages.call(this);width=dims[0];height=dims[1];images[image.index]=image;if(rotation){rotation*=Math.PI/180;var c=Math.cos(rotation);var s=Math.sin(rotation);//like in pdf Reference do it 4 digits instead of 2
|
|
99504
99575
|
var f4=function f4(number){return number.toFixed(4);};var rotationTransformationMatrix=[f4(c),f4(s),f4(s*-1),f4(c),0,0,"cm"];}this.internal.write("q");//Save graphics state
|
|
99505
|
-
if(rotation){
|
|
99576
|
+
if(rotation){// 自定义修改 修复图片旋转后位置错误问题 水平方向增加自身宽度 减去的 18px 来源未知 垂直方向减去自身高度
|
|
99577
|
+
x+=width-18;y-=height;this.internal.write([1,"0","0",1,coord(x),vcoord(y+height),"cm"].join(" "));//Translate
|
|
99506
99578
|
this.internal.write(rotationTransformationMatrix.join(" "));//Rotate
|
|
99507
99579
|
this.internal.write([coord(width),"0","0",coord(height),"0","0","cm"].join(" "));//Scale
|
|
99508
99580
|
}else{this.internal.write([coord(width),"0","0",coord(height),coord(x),vcoord(y+height),"cm"].join(" "));//Translate and Scale
|
|
@@ -99612,8 +99684,9 @@ out+=String.fromCharCode.apply(null,buf.subarray(i,i+ARRAY_APPLY_BATCH));}return
|
|
|
99612
99684
|
*
|
|
99613
99685
|
* @returns jsPDF
|
|
99614
99686
|
*/jsPDFAPI.addImage=function(){// 自定义修改 处理签名图片打印
|
|
99615
|
-
var imageData,format,x,y,w,h,alias,compression,rotation,posX,posY;imageData=arguments[0];if(typeof arguments[1]==="number"){format=UNKNOWN;x=arguments[1];y=arguments[2];w=arguments[3];h=arguments[4];alias=arguments[5];compression=arguments[6];rotation=arguments[7];posX=arguments[8];posY=arguments[9];}else{format=arguments[1];x=arguments[2];y=arguments[3];w=arguments[4];h=arguments[5];alias=arguments[6];compression=arguments[7];rotation=arguments[8];posX=arguments[9];posY=arguments[10];}if((0,esm_typeof/* default */.Z)(imageData)==="object"&&!isDOMElement(imageData)&&"imageData"in imageData){var options=imageData;imageData=options.imageData;format=options.format||format||UNKNOWN;x=options.x||x||0;y=options.y||y||0;w=options.w||options.width||w;h=options.h||options.height||h;alias=options.alias||alias;compression=options.compression||compression;rotation=options.rotation||options.angle||rotation;}//If compression is not explicitly set, determine if we should use compression
|
|
99616
|
-
var filter=this.internal.getFilters();if(compression===undefined&&filter.indexOf("FlateEncode")!==-1){compression="SLOW";}
|
|
99687
|
+
var imageData,format,x,y,w,h,alias,compression,rotation,posX,posY;imageData=arguments[0];if(typeof arguments[1]==="number"){format=UNKNOWN;x=arguments[1];y=arguments[2];w=arguments[3];h=arguments[4];alias=arguments[5];compression=arguments[6];rotation=arguments[7];posX=arguments[8];posY=arguments[9];}else{format=arguments[1];x=arguments[2];y=arguments[3];w=arguments[4];h=arguments[5];alias=arguments[6];compression=arguments[7];rotation=arguments[8];posX=arguments[9];posY=arguments[10];}console.log(rotation);if((0,esm_typeof/* default */.Z)(imageData)==="object"&&!isDOMElement(imageData)&&"imageData"in imageData){var options=imageData;imageData=options.imageData;format=options.format||format||UNKNOWN;x=options.x||x||0;y=options.y||y||0;w=options.w||options.width||w;h=options.h||options.height||h;alias=options.alias||alias;compression=options.compression||compression;rotation=options.rotation||options.angle||rotation;}//If compression is not explicitly set, determine if we should use compression
|
|
99688
|
+
var filter=this.internal.getFilters();if(compression===undefined&&filter.indexOf("FlateEncode")!==-1){compression="SLOW";}// 自定义修改 调整 addImage 方法的 compression值压缩图片
|
|
99689
|
+
compression='SLOW';if(isNaN(x)||isNaN(y)){throw new Error("Invalid coordinates passed to jsPDF.addImage");}// if(posX) x += posX;
|
|
99617
99690
|
// if(posY) y += posY;
|
|
99618
99691
|
initialize.call(this);var image=processImageData.call(this,imageData,format,alias,compression);writeImageToPDF.call(this,x,y,w,h,image,rotation);return this;};var processImageData=function processImageData(imageData,format,alias,compression){var result,dataAsBinaryString;if(typeof imageData==="string"&&getImageFileTypeByImageData(imageData)===UNKNOWN){imageData=unescape(imageData);var tmpImageData=convertBase64ToBinaryString(imageData,false);if(tmpImageData!==""){imageData=tmpImageData;}else{tmpImageData=jsPDFAPI.loadFile(imageData,true);if(tmpImageData!==undefined){imageData=tmpImageData;}}}if(isDOMElement(imageData)){imageData=getImageDataFromElement(imageData,format);}format=getImageFileTypeByImageData(imageData,format);if(!isImageTypeSupported(format)){throw new Error("addImage does not support files of type '"+format+"', please ensure that a plugin for '"+format+"' support is added.");}// now do the heavy lifting
|
|
99619
99692
|
if(notDefined(alias)){alias=generateAliasFromImageData(imageData);}result=checkImagesForAlias.call(this,alias);if(!result){if(supportsArrayBuffer()){// no need to convert if imageData is already uint8array
|
|
@@ -100412,9 +100485,10 @@ a=isNaN(a)?1:a;b=isNaN(b)?0:b;c=isNaN(c)?0:c;d=isNaN(d)?1:d;e=isNaN(e)?0:e;f=isN
|
|
|
100412
100485
|
* @param height {Number} Optional. The height of the image to use (stretch or reduce the image)
|
|
100413
100486
|
*/Context2D.prototype.drawImage=function(img,sx,sy,swidth,sheight,x,y,width,height){var imageProperties=this.pdf.getImageProperties(img);var factorX=1;var factorY=1;var clipFactorX=1;var clipFactorY=1;if(typeof swidth!=="undefined"&&typeof width!=="undefined"){clipFactorX=width/swidth;clipFactorY=height/sheight;factorX=imageProperties.width/swidth*width/swidth;factorY=imageProperties.height/sheight*height/sheight;}//is sx and sy are set and x and y not, set x and y with values of sx and sy
|
|
100414
100487
|
if(typeof x==="undefined"){x=sx;y=sy;sx=0;sy=0;}if(typeof swidth!=="undefined"&&typeof width==="undefined"){width=swidth;height=sheight;}if(typeof swidth==="undefined"&&typeof width==="undefined"){width=imageProperties.width;height=imageProperties.height;}var decomposedTransformationMatrix=this.ctx.transform.decompose();// console.log("transform.decompose",decomposedTransformationMatrix.scale);
|
|
100415
|
-
|
|
100488
|
+
// 自定义修改 修复图片旋转角度错误问题
|
|
100489
|
+
var angle=rad2deg(decomposedTransformationMatrix.rotate.rotation);var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);if(!swidth){swidth=width;}if(!sheight){sheight=height;}var xRect;// 自定义修改 处理签名图片打印和普通图片打印
|
|
100416
100490
|
if(img.nodeName&&img.nodeName=="CANVAS"){xRect=matrix.applyToRectangle(new Rectangle(x+this.posX-sx*clipFactorX,y+this.posY-sy*clipFactorY,swidth*factorX,sheight*factorY));}else{xRect=matrix.applyToRectangle(new Rectangle(x-sx*clipFactorX,y-sy*clipFactorY,swidth*factorX,sheight*factorY));}var pageArray=getPagesByPath.call(this,xRect);var pages=[];for(var ii=0;ii<pageArray.length;ii+=1){if(pages.indexOf(pageArray[ii])===-1){pages.push(pageArray[ii]);}}sortPages(pages);var clipPath;if(this.autoPaging){var min=pages[0];var max=pages[pages.length-1];for(var i=min;i<max+1;i++){this.pdf.setPage(i);var pageWidthMinusMargins=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1];var topMargin=i===1?this.posY+this.margin[0]:this.margin[0];var firstPageHeight=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2];var pageHeightMinusMargins=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var previousPageHeightSum=i===1?0:firstPageHeight+(i-2)*pageHeightMinusMargins;if(this.ctx.clip_path.length!==0){var tmpPaths=this.path;clipPath=JSON.parse(JSON.stringify(this.ctx.clip_path));this.path=pathPositionRedo(clipPath,this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset);drawPaths.call(this,"fill",true);this.path=tmpPaths;}var tmpRect=JSON.parse(JSON.stringify(xRect));tmpRect=pathPositionRedo([tmpRect],this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset)[0];var needsClipping=(i>min||i<max)&&hasMargins.call(this);if(needsClipping){this.pdf.saveGraphicsState();this.pdf.rect(this.margin[3],this.margin[0],pageWidthMinusMargins,pageHeightMinusMargins,null).clip().discardPath();}this.pdf.addImage(img,"JPEG",tmpRect.x,tmpRect.y,tmpRect.w,tmpRect.h,null,null,angle);if(needsClipping){this.pdf.restoreGraphicsState();}}}else{if(img.nodeName&&img.nodeName=="CANVAS"){// 自定义修改
|
|
100417
|
-
this.pdf.addImage(img.toDataURL("image/
|
|
100491
|
+
this.pdf.addImage(img.toDataURL("image/png"),'',xRect.x,xRect.y,xRect.w,xRect.h);}else{// 自定义修改
|
|
100418
100492
|
this.pdf.addImage(img,"JPEG",xRect.x+this.posX,xRect.y+this.posY,xRect.w,xRect.h,null,null,angle,this.posX,this.posY);}}};var getPagesByPath=function getPagesByPath(path,pageWrapX,pageWrapY){var result=[];pageWrapX=pageWrapX||this.pdf.internal.pageSize.width;pageWrapY=pageWrapY||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var yOffset=this.posY+this.ctx.prevPageLastElemOffset;switch(path.type){default:case"mt":case"lt":result.push(Math.floor((path.y+yOffset)/pageWrapY)+1);break;case"arc":result.push(Math.floor((path.y+yOffset-path.radius)/pageWrapY)+1);result.push(Math.floor((path.y+yOffset+path.radius)/pageWrapY)+1);break;case"qct":var rectOfQuadraticCurve=getQuadraticCurveBoundary(this.ctx.lastPoint.x,this.ctx.lastPoint.y,path.x1,path.y1,path.x,path.y);result.push(Math.floor((rectOfQuadraticCurve.y+yOffset)/pageWrapY)+1);result.push(Math.floor((rectOfQuadraticCurve.y+rectOfQuadraticCurve.h+yOffset)/pageWrapY)+1);break;case"bct":var rectOfBezierCurve=getBezierCurveBoundary(this.ctx.lastPoint.x,this.ctx.lastPoint.y,path.x1,path.y1,path.x2,path.y2,path.x,path.y);result.push(Math.floor((rectOfBezierCurve.y+yOffset)/pageWrapY)+1);result.push(Math.floor((rectOfBezierCurve.y+rectOfBezierCurve.h+yOffset)/pageWrapY)+1);break;case"rect":result.push(Math.floor((path.y+yOffset)/pageWrapY)+1);result.push(Math.floor((path.y+path.h+yOffset)/pageWrapY)+1);}for(var i=0;i<result.length;i+=1){while(this.pdf.internal.getNumberOfPages()<result[i]){addPage.call(this);}}return result;};var addPage=function addPage(){var fillStyle=this.fillStyle;var strokeStyle=this.strokeStyle;var font=this.font;var lineCap=this.lineCap;var lineWidth=this.lineWidth;var lineJoin=this.lineJoin;this.pdf.addPage();this.fillStyle=fillStyle;this.strokeStyle=strokeStyle;this.font=font;this.lineCap=lineCap;this.lineWidth=lineWidth;this.lineJoin=lineJoin;};var pathPositionRedo=function pathPositionRedo(paths,x,y){for(var i=0;i<paths.length;i++){switch(paths[i].type){case"bct":paths[i].x2+=x;paths[i].y2+=y;case"qct":paths[i].x1+=x;paths[i].y1+=y;case"mt":case"lt":case"arc":default:paths[i].x+=x;paths[i].y+=y;}}return paths;};var sortPages=function sortPages(pages){return pages.sort(function(a,b){return a-b;});};var pathPreProcess=function pathPreProcess(rule,isClip){var fillStyle=this.fillStyle;var strokeStyle=this.strokeStyle;var lineCap=this.lineCap;var oldLineWidth=this.lineWidth;var lineWidth=Math.abs(oldLineWidth*this.ctx.transform.scaleX);var lineJoin=this.lineJoin;var origPath=JSON.parse(JSON.stringify(this.path));var xPath=JSON.parse(JSON.stringify(this.path));var clipPath;var tmpPath;var pages=[];for(var i=0;i<xPath.length;i++){if(typeof xPath[i].x!=="undefined"){var page=getPagesByPath.call(this,xPath[i]);for(var ii=0;ii<page.length;ii+=1){if(pages.indexOf(page[ii])===-1){pages.push(page[ii]);}}}}for(var j=0;j<pages.length;j++){while(this.pdf.internal.getNumberOfPages()<pages[j]){addPage.call(this);}}sortPages(pages);if(this.autoPaging){var min=pages[0];var max=pages[pages.length-1];for(var k=min;k<max+1;k++){this.pdf.setPage(k);this.fillStyle=fillStyle;this.strokeStyle=strokeStyle;this.lineCap=lineCap;this.lineWidth=lineWidth;this.lineJoin=lineJoin;var pageWidthMinusMargins=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1];var topMargin=k===1?this.posY+this.margin[0]:this.margin[0];var firstPageHeight=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2];var pageHeightMinusMargins=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var previousPageHeightSum=k===1?0:firstPageHeight+(k-2)*pageHeightMinusMargins;if(this.ctx.clip_path.length!==0){var tmpPaths=this.path;clipPath=JSON.parse(JSON.stringify(this.ctx.clip_path));this.path=pathPositionRedo(clipPath,this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset);drawPaths.call(this,rule,true);this.path=tmpPaths;}tmpPath=JSON.parse(JSON.stringify(origPath));this.path=pathPositionRedo(tmpPath,this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset);if(isClip===false||k===0){var needsClipping=(k>min||k<max)&&hasMargins.call(this);if(needsClipping){this.pdf.saveGraphicsState();this.pdf.rect(this.margin[3],this.margin[0],pageWidthMinusMargins,pageHeightMinusMargins,null).clip().discardPath();}drawPaths.call(this,rule,isClip);if(needsClipping){this.pdf.restoreGraphicsState();}}this.lineWidth=oldLineWidth;}}else{this.lineWidth=lineWidth;drawPaths.call(this,rule,isClip);this.lineWidth=oldLineWidth;}this.path=origPath;};/**
|
|
100419
100493
|
* Processes the paths
|
|
100420
100494
|
*
|
|
@@ -199112,8 +199186,8 @@ var es_function_name = __webpack_require__(68309);
|
|
|
199112
199186
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
199113
199187
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(77203);
|
|
199114
199188
|
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
199115
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDocs.vue?vue&type=template&id=
|
|
199116
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.hoEditorFactoryIdList.length > 0)?_c('div',{staticClass:"ho-docs"},[_c('section',{class:_vm.defaultEditJson.isFooter ? 'ho-editor-list' : 'ho-editor-list editor-no-footer',on:{"contextmenu":function($event){return _vm.blankAreaRightClick.apply(null, arguments)}}},[_vm._l((_vm.hoEditorFactoryIdList),function(hoEditorId,index){return [_c('HoDoc',{key:index,attrs:{"docIndex":index,"hoEditorId":hoEditorId,"hoEditorFactoryIdList":_vm.hoEditorFactoryIdList,"activeDocId":_vm.activeDocId,"editJson":_vm.defaultEditJson,"isUseTipText":_vm.isUseTipText,"textStyle":_vm.textStyle},on:{"dblNodeClick":_vm.dblNodeClick,"setFontStyles":_vm.setFontStyles,"rightClickEvent":_vm.rightClickEvent,"setActiveDocIndex":_vm.setActiveDocIndex,"setActivePageIndex":_vm.setActivePageIndex,"drawPagesLengthChange":_vm.drawPagesLengthChange},scopedSlots:_vm._u([{key:"hoDocHead",fn:function(){return [_vm._t("hoHead")]},proxy:true},{key:"hoDocFoot",fn:function(){return [_vm._t("hoFoot")]},proxy:true}],null,true)})]})],2),(_vm.notUseModal)?_c('ControlModal',{attrs:{"hoEditorFactoryId":_vm.activeDocId,"controlProperty":_vm.controlProperty,"isDataSource":_vm.isDataSource,"isCustoms":_vm.isCustoms,"isTableProperty":_vm.isTableProperty,"isListStyle":_vm.isListStyle,"uploadImageParams":_vm.uploadImageParams},on:{"insertComments":_vm.insertComments,"closeControlmodal":_vm.closeControlModal},scopedSlots:_vm._u([{key:"hoTextModal",fn:function(){return [_vm._t("hoTextField")]},proxy:true},{key:"hoComment",fn:function(){return [_vm._t("hoTextComment")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlFindType)?_c('FindReplaceDialog',{attrs:{"hoEditorFactoryId":_vm.activeDocId}}):_vm._e(),(_vm.defaultEditJson.isFooter)?_c('HoFooter',{attrs:{"docProperty":_vm.defaultDocProperty,"hoEditorFactoryId":_vm.activeDocId,"drawPages":_vm.drawPageLength,"currentActivePages":_vm.activePageIndex}}):_vm._e()
|
|
199189
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDocs.vue?vue&type=template&id=83a638fc&
|
|
199190
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.hoEditorFactoryIdList.length > 0)?_c('div',{staticClass:"ho-docs"},[_c('section',{class:_vm.defaultEditJson.isFooter ? 'ho-editor-list' : 'ho-editor-list editor-no-footer',on:{"contextmenu":function($event){return _vm.blankAreaRightClick.apply(null, arguments)}}},[_vm._l((_vm.hoEditorFactoryIdList),function(hoEditorId,index){return [_c('HoDoc',{key:index,attrs:{"docIndex":index,"hoEditorId":hoEditorId,"hoEditorFactoryIdList":_vm.hoEditorFactoryIdList,"activeDocId":_vm.activeDocId,"editJson":_vm.defaultEditJson,"isUseTipText":_vm.isUseTipText,"textStyle":_vm.textStyle},on:{"dblNodeClick":_vm.dblNodeClick,"setFontStyles":_vm.setFontStyles,"rightClickEvent":_vm.rightClickEvent,"setActiveDocIndex":_vm.setActiveDocIndex,"setActivePageIndex":_vm.setActivePageIndex,"drawPagesLengthChange":_vm.drawPagesLengthChange},scopedSlots:_vm._u([{key:"hoDocHead",fn:function(){return [_vm._t("hoHead")]},proxy:true},{key:"hoDocFoot",fn:function(){return [_vm._t("hoFoot")]},proxy:true}],null,true)})]})],2),(_vm.notUseModal)?_c('ControlModal',{attrs:{"hoEditorFactoryId":_vm.activeDocId,"controlProperty":_vm.controlProperty,"isDataSource":_vm.isDataSource,"isCustoms":_vm.isCustoms,"isTableProperty":_vm.isTableProperty,"isListStyle":_vm.isListStyle,"uploadImageParams":_vm.uploadImageParams},on:{"insertComments":_vm.insertComments,"closeControlmodal":_vm.closeControlModal},scopedSlots:_vm._u([{key:"hoTextModal",fn:function(){return [_vm._t("hoTextField")]},proxy:true},{key:"hoParagraphModal",fn:function(){return [_vm._t("hoParagraphField")]},proxy:true},{key:"hoComment",fn:function(){return [_vm._t("hoTextComment")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlFindType)?_c('FindReplaceDialog',{attrs:{"hoEditorFactoryId":_vm.activeDocId}}):_vm._e(),(_vm.defaultEditJson.isFooter)?_c('HoFooter',{attrs:{"docProperty":_vm.defaultDocProperty,"hoEditorFactoryId":_vm.activeDocId,"drawPages":_vm.drawPageLength,"currentActivePages":_vm.activePageIndex}}):_vm._e()],1):_vm._e()}
|
|
199117
199191
|
var staticRenderFns = []
|
|
199118
199192
|
|
|
199119
199193
|
|
|
@@ -200038,9 +200112,9 @@ function isPromise(obj) {
|
|
|
200038
200112
|
return obj instanceof Promise || (obj && typeof obj.then === 'function');
|
|
200039
200113
|
}
|
|
200040
200114
|
|
|
200041
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDoc.vue?vue&type=template&id=
|
|
200042
|
-
var
|
|
200043
|
-
var
|
|
200115
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDoc.vue?vue&type=template&id=4a9748a4&
|
|
200116
|
+
var HoDocvue_type_template_id_4a9748a4_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:_vm.docClassNames},[_c('div',{ref:"editorArea",staticClass:"editors"},[(_vm.drawPageLength > 0)?_c('div',{staticClass:"editor",on:{"click":function($event){return _vm.setActiveDocIndex(_vm.hoEditorId)}}},[_vm._l((_vm.drawPageCount.count),function(pgIndex){return [_c('HoPage',{key:pgIndex - 1,attrs:{"data-id":pgIndex - 1,"index":pgIndex - 1,"docIndex":_vm.docIndex,"canvasWidth":_vm.canvasParams.width,"canvasHeight":_vm.canvasParams.height,"currentActivePages":_vm.activePageIndex.index,"hoEditorId":_vm.hoEditorId,"hoEditorFactoryIdList":_vm.hoEditorFactoryIdList,"mouseMoveNodes":_vm.mouseMoveNodes,"viewableAreaObserver":_vm.viewableAreaObserver,"inViewPages":_vm.inViewPages,"canvasHeadFootPos":_vm.canvasHeadFootPos,"poperTipPos":_vm.poperTipPos,"textStyle":_vm.textStyle,"aiInfo":_vm.aiInfo},on:{"pageReady":_vm.pageReady,"canvasRightClick":_vm.mouseRightClickEvent},scopedSlots:_vm._u([{key:"hoPageHead",fn:function(){return [_vm._t("hoDocHead")]},proxy:true},{key:"hoPageFoot",fn:function(){return [_vm._t("hoDocFoot")]},proxy:true}],null,true)})]})],2):_vm._e()]),(_vm.poperType === 'datePoper' || _vm.poperType === 'selectPoper')?_c('PoperSelectModal',{attrs:{"poperType":_vm.poperType,"poperSelectList":_vm.poperSelectList,"poperPos":_vm.poperPos,"hoEditorId":_vm.hoEditorId},on:{"poperClose":_vm.poperClose}}):_vm._e(),_c('PoperMark',{directives:[{name:"show",rawName:"v-show",value:(_vm.poperType === 'datePoper' || _vm.poperType === 'selectPoper' || _vm.poperType === 'table-cell-poper'),expression:"poperType === 'datePoper' || poperType === 'selectPoper' || poperType === 'table-cell-poper'"}]}),(_vm.poperType === 'table-cell-poper')?_c('TableCellPoper',{attrs:{"poperNode":_vm.nodeValue,"poperPos":_vm.poperPos},on:{"poperClose":_vm.poperClose}}):_vm._e(),_c('HoToPage',{attrs:{"hoEditorId":_vm.hoEditorId,"inViewPages":_vm.inViewPages}}),_c('PoperTipText',{attrs:{"isPoperText":_vm.isPoperText,"poperText":_vm.poperText,"poperPos":_vm.poperTextPos},on:{"poperTextClose":_vm.poperTextClose}}),_c('ul',{directives:[{name:"click-outside",rawName:"v-click-outside",value:(function () { return (_vm.isCreateRightMenuModal = false); }),expression:"() => (isCreateRightMenuModal = false)"},{name:"show",rawName:"v-show",value:(_vm.isCreateRightMenuModal),expression:"isCreateRightMenuModal"}],ref:"rightMenuModal",staticClass:"create-right-menu"},[(_vm.showCommentsBtn)?_c('li',{staticClass:"mouse-menu-item",on:{"click":_vm.hideComments}},[_vm._v(_vm._s(_vm.isHideComments ? '显示' : '隐藏')+"批注")]):_vm._e(),_c('li',{staticClass:"mouse-menu-item"},[_vm._v(" 编辑器内核版本: "),_c('span',{staticStyle:{"font-size":"14px","color":"#0a77e3"}},[_vm._v("v "+_vm._s(_vm.version))])])])],1)}
|
|
200117
|
+
var HoDocvue_type_template_id_4a9748a4_staticRenderFns = []
|
|
200044
200118
|
|
|
200045
200119
|
|
|
200046
200120
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
|
|
@@ -207095,7 +207169,7 @@ var SignNode = __webpack_require__(78975);
|
|
|
207095
207169
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
207096
207170
|
var ParagraphNode = __webpack_require__(13880);
|
|
207097
207171
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
207098
|
-
/* harmony default export */ var version = ('2.0.
|
|
207172
|
+
/* harmony default export */ var version = ('2.0.64');
|
|
207099
207173
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/poperTipText/PoperTipText.vue?vue&type=template&id=3fa4e4d3&scoped=true&
|
|
207100
207174
|
var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"},{name:"click-outside",rawName:"v-click-outside",value:(_vm.handleClose),expression:"handleClose"}],ref:"poperTextNode",staticClass:"poper-text-modal animation-in",style:(_vm.posStyle),on:{"mouseenter":_vm.mouseEnter,"mouseleave":_vm.mouseLeave}},_vm._l((_vm.poperText),function(text){return _c('div',{key:text + Math.random(0, 1),staticClass:"poper-text"},[_vm._v(" "+_vm._s(text)+" ")])}),0)}
|
|
207101
207175
|
var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_staticRenderFns = []
|
|
@@ -207636,6 +207710,14 @@ var HoDoc = /*#__PURE__*/function (_Vue) {
|
|
|
207636
207710
|
|
|
207637
207711
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.hoEditorId);
|
|
207638
207712
|
if (!e.clickType || e.clickType === 'move') return false;
|
|
207713
|
+
var hoParagrapghTipElementNode = document.querySelector('#ho_paragrapgh_tip');
|
|
207714
|
+
|
|
207715
|
+
if (hoParagrapghTipElementNode) {
|
|
207716
|
+
var _hoParagrapghTipEleme;
|
|
207717
|
+
|
|
207718
|
+
(_hoParagrapghTipEleme = hoParagrapghTipElementNode.parentNode) === null || _hoParagrapghTipEleme === void 0 ? void 0 : _hoParagrapghTipEleme.removeChild(hoParagrapghTipElementNode);
|
|
207719
|
+
}
|
|
207720
|
+
|
|
207639
207721
|
var node = e.node;
|
|
207640
207722
|
this.poperClose();
|
|
207641
207723
|
|
|
@@ -208027,8 +208109,8 @@ HoDoc = __decorate([vue_class_component_esm({
|
|
|
208027
208109
|
|
|
208028
208110
|
var HoDoc_component = normalizeComponent(
|
|
208029
208111
|
components_HoDocvue_type_script_lang_ts_,
|
|
208030
|
-
|
|
208031
|
-
|
|
208112
|
+
HoDocvue_type_template_id_4a9748a4_render,
|
|
208113
|
+
HoDocvue_type_template_id_4a9748a4_staticRenderFns,
|
|
208032
208114
|
false,
|
|
208033
208115
|
null,
|
|
208034
208116
|
null,
|
|
@@ -209321,6 +209403,8 @@ var NodeClickEvent = __webpack_require__(17750);
|
|
|
209321
209403
|
|
|
209322
209404
|
|
|
209323
209405
|
|
|
209406
|
+
|
|
209407
|
+
|
|
209324
209408
|
var DmouseEventType;
|
|
209325
209409
|
|
|
209326
209410
|
(function (DmouseEventType) {
|
|
@@ -209508,6 +209592,8 @@ var NodeMouseMoveEvent = /*#__PURE__*/function () {
|
|
|
209508
209592
|
}, {
|
|
209509
209593
|
key: "NodeClick",
|
|
209510
209594
|
value: function NodeClick(node, moveType) {
|
|
209595
|
+
var _this = this;
|
|
209596
|
+
|
|
209511
209597
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
209512
209598
|
|
|
209513
209599
|
if (node instanceof RadioAndCheckBoxNode/* RadioAndCheckBoxNode */.Yh && moveType === DmouseEventType.detClick) {
|
|
@@ -209516,6 +209602,44 @@ var NodeMouseMoveEvent = /*#__PURE__*/function () {
|
|
|
209516
209602
|
hoEditorFactory.docTree.nodeClick(nodeClickEvent);
|
|
209517
209603
|
node.drawNodes[0].parent = drawLine;
|
|
209518
209604
|
}
|
|
209605
|
+
|
|
209606
|
+
if (hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psDesign */.Dh.psDesign) {
|
|
209607
|
+
var paragraphNode = hoEditorFactory.drawTree.getDrawLineByDNode(node.drawNodes[0]).paragraphNode;
|
|
209608
|
+
|
|
209609
|
+
if (paragraphNode && paragraphNode.customProperty) {
|
|
209610
|
+
var customProperty = paragraphNode.customProperty;
|
|
209611
|
+
var paragraphTip = ['男', '女'].includes(customProperty.sex) || customProperty.age && customProperty.age.select == '隐藏';
|
|
209612
|
+
var arr = [];
|
|
209613
|
+
|
|
209614
|
+
if (paragraphTip) {
|
|
209615
|
+
if (['男', '女'].includes(customProperty.sex)) {
|
|
209616
|
+
arr.push("\u60A3\u8005\u4E3A<span style=\"color:#f00\"> ".concat(customProperty.sex, " </span>\u6027\u65F6\uFF0C\u9690\u85CF\u5F53\u524D\u6BB5\u843D"));
|
|
209617
|
+
}
|
|
209618
|
+
|
|
209619
|
+
if (customProperty.age && customProperty.age.select == '隐藏') {
|
|
209620
|
+
arr.push("\u60A3\u8005\u5E74\u9F84\u5728<span style=\"color:#f00\"> ".concat(customProperty.age.minAge, " </span>\u5C81\u5230<span style=\"color:#f00\"> ").concat(customProperty.age.maxAge, " </span>\u4E4B\u95F4\u65F6\uFF0C\u9690\u85CF\u5F53\u524D\u6BB5\u843D"));
|
|
209621
|
+
}
|
|
209622
|
+
|
|
209623
|
+
if (arr.length > 0) {
|
|
209624
|
+
setTimeout(function () {
|
|
209625
|
+
_this.createParagraphTipHTML(hoEditorFactory.drawTree.caret, arr);
|
|
209626
|
+
}, 0);
|
|
209627
|
+
}
|
|
209628
|
+
}
|
|
209629
|
+
}
|
|
209630
|
+
}
|
|
209631
|
+
}
|
|
209632
|
+
}, {
|
|
209633
|
+
key: "createParagraphTipHTML",
|
|
209634
|
+
value: function createParagraphTipHTML(caret, text) {
|
|
209635
|
+
var _caret$cursor$parentN;
|
|
209636
|
+
|
|
209637
|
+
var tipdiv = document.createElement('div');
|
|
209638
|
+
tipdiv.id = "ho_paragrapgh_tip";
|
|
209639
|
+
tipdiv.style.left = caret.X + "px";
|
|
209640
|
+
tipdiv.style.top = caret.Y + caret.height + "px";
|
|
209641
|
+
tipdiv.innerHTML = text.join("<br />");
|
|
209642
|
+
(_caret$cursor$parentN = caret.cursor.parentNode) === null || _caret$cursor$parentN === void 0 ? void 0 : _caret$cursor$parentN.appendChild(tipdiv);
|
|
209519
209643
|
}
|
|
209520
209644
|
/**
|
|
209521
209645
|
* @param node moveNode
|
|
@@ -213071,8 +213195,14 @@ var StructureConvert = /*#__PURE__*/function () {
|
|
|
213071
213195
|
var insertNode = function insertNode(array, prevNode) {
|
|
213072
213196
|
var firstNode = array[0];
|
|
213073
213197
|
|
|
213074
|
-
if (firstNode instanceof ParagraphNode/* ParagraphNode */.C &&
|
|
213075
|
-
|
|
213198
|
+
if (firstNode instanceof ParagraphNode/* ParagraphNode */.C && prevNode instanceof ParagraphNode/* ParagraphNode */.C) {
|
|
213199
|
+
if (firstNode.paraNo !== 0) {
|
|
213200
|
+
prevNode.paraNo = firstNode.paraNo;
|
|
213201
|
+
}
|
|
213202
|
+
|
|
213203
|
+
if (firstNode.customProperty) {
|
|
213204
|
+
prevNode.customProperty = firstNode.customProperty;
|
|
213205
|
+
}
|
|
213076
213206
|
}
|
|
213077
213207
|
|
|
213078
213208
|
for (var j = 1; j < array.length; j++) {
|
|
@@ -220121,7 +220251,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220121
220251
|
|
|
220122
220252
|
if (node instanceof SignNode/* SignNode */.N) {
|
|
220123
220253
|
if (node.isTemplate) {
|
|
220124
|
-
if (node.imgSrc) {
|
|
220254
|
+
if (node.imgSrc || node.fingerPrintSrc) {
|
|
220125
220255
|
this.deleteNode(node);
|
|
220126
220256
|
setTimeout(function () {
|
|
220127
220257
|
var newcurDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
@@ -220155,7 +220285,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220155
220285
|
var changingEvent = new NodeChangingEvent/* NodeChangingEvent */.Q(DocTree/* DocAction.daInsert */.gk.daInsert, startPath, endPath, NodeChangingEvent/* OperType.insertSign */.y.insertSign);
|
|
220156
220286
|
|
|
220157
220287
|
if (hoEditorFactory.docTree.changing(changingEvent)) {
|
|
220158
|
-
Promise.all([hoEditorFactory.docController.insertSignNode(curDomRange,
|
|
220288
|
+
Promise.all([hoEditorFactory.docController.insertSignNode(curDomRange, 3, "患者签名", "", "", "", imgSrc, 0, 0, {}, fingerPrintSrc, fingerPosition)]).then(function () {
|
|
220159
220289
|
setTimeout(function () {
|
|
220160
220290
|
callback && callback();
|
|
220161
220291
|
}, 0);
|
|
@@ -220815,10 +220945,17 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220815
220945
|
|
|
220816
220946
|
for (var j = 0; j < elements.length; j++) {
|
|
220817
220947
|
var element = elements[j];
|
|
220948
|
+
var commentID = hoEditorFactory.gernerateCode.generateID("C");
|
|
220949
|
+
var comment = void 0;
|
|
220818
220950
|
|
|
220819
220951
|
if (element instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
220820
|
-
|
|
220821
|
-
|
|
220952
|
+
comment = new Comment/* Comment */.s(this._hoEditorFactoryID, commentID, oldValue, element.EndMarkNode);
|
|
220953
|
+
comment.lineHeight = comment.lineHeight - 20;
|
|
220954
|
+
comments.push(comment);
|
|
220955
|
+
}
|
|
220956
|
+
|
|
220957
|
+
if (element instanceof DateTimeNode/* DateTimeNode */.Z || element instanceof DownListNode/* DownListNode */.yF) {
|
|
220958
|
+
comment = new Comment/* Comment */.s(this._hoEditorFactoryID, commentID, oldValue, element);
|
|
220822
220959
|
comment.lineHeight = comment.lineHeight - 20;
|
|
220823
220960
|
comments.push(comment);
|
|
220824
220961
|
}
|
|
@@ -220837,9 +220974,13 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220837
220974
|
|
|
220838
220975
|
var spX = dline.parent instanceof DrawPageCell/* DrawPageCell */.k ? localPos.x : endDrawNode.x;
|
|
220839
220976
|
var spY = localPos.y;
|
|
220840
|
-
drawArea.removeComment(comment);
|
|
220977
|
+
drawArea.removeComment(comment, true);
|
|
220841
220978
|
var path = comment.eNode.getNodePath();
|
|
220842
220979
|
|
|
220980
|
+
if (comment.eNode instanceof DateTimeNode/* DateTimeNode */.Z || comment.eNode instanceof DownListNode/* DownListNode */.yF) {
|
|
220981
|
+
spX = spX + comment.eNode.drawNodes[0].dWidth;
|
|
220982
|
+
}
|
|
220983
|
+
|
|
220843
220984
|
if (index === 1) {
|
|
220844
220985
|
drawArea.drawEditRecords(comment, spX, spY, spY);
|
|
220845
220986
|
}
|
|
@@ -220849,6 +220990,26 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220849
220990
|
}
|
|
220850
220991
|
});
|
|
220851
220992
|
}
|
|
220993
|
+
}, {
|
|
220994
|
+
key: "clearEditRecords",
|
|
220995
|
+
value: function clearEditRecords() {
|
|
220996
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
220997
|
+
var drawMainDocs = hoEditorFactory.drawPageTree.drawMainDocs;
|
|
220998
|
+
|
|
220999
|
+
for (var j = drawMainDocs.length - 1; j >= 0; j--) {
|
|
221000
|
+
var children = drawMainDocs[j].children;
|
|
221001
|
+
|
|
221002
|
+
for (var i = children.length - 1; i >= 0; i--) {
|
|
221003
|
+
var child = children[i];
|
|
221004
|
+
|
|
221005
|
+
if (child.name && child.name.indexOf("recordC") >= 0) {
|
|
221006
|
+
children.splice(i, 1);
|
|
221007
|
+
}
|
|
221008
|
+
}
|
|
221009
|
+
|
|
221010
|
+
hoEditorFactory.drawPageTree.updateDrawPage(j);
|
|
221011
|
+
}
|
|
221012
|
+
}
|
|
220852
221013
|
}, {
|
|
220853
221014
|
key: "updateImageSrc",
|
|
220854
221015
|
value: function updateImageSrc(node, src) {
|
|
@@ -224541,7 +224702,8 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
224541
224702
|
this._lastSaveTime = new Date(Date.now());
|
|
224542
224703
|
this._superiorSigns = []; //上级医生签名
|
|
224543
224704
|
|
|
224544
|
-
this._isEnabledGlobalColor = false;
|
|
224705
|
+
this._isEnabledGlobalColor = false; //是否启用全局颜色
|
|
224706
|
+
|
|
224545
224707
|
this._hoEditorFactoryId = id;
|
|
224546
224708
|
}
|
|
224547
224709
|
/**
|
|
@@ -225605,9 +225767,9 @@ var HoFooter_component = normalizeComponent(
|
|
|
225605
225767
|
)
|
|
225606
225768
|
|
|
225607
225769
|
/* harmony default export */ var components_HoFooter = (HoFooter_component.exports);
|
|
225608
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/ControlModal.vue?vue&type=template&id=
|
|
225609
|
-
var
|
|
225610
|
-
var
|
|
225770
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/ControlModal.vue?vue&type=template&id=36fbe7eb&
|
|
225771
|
+
var ControlModalvue_type_template_id_36fbe7eb_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"toolModals",staticClass:"control-modal",on:{"mousedown":_vm.toolModalDown}},[(_vm.controlType === 'barcode')?_c('Barcode',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'qrcode')?_c('QrCode',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'express')?_c('ExpressionForm',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"controlProperty":_vm.controlProperty},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'text')?_c('TextDialog',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose},scopedSlots:_vm._u([{key:"hoTextFieldModal",fn:function(){return [_vm._t("hoTextModal")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlType === 'date')?_c('DateDialog',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose},scopedSlots:_vm._u([{key:"hoDateFieldModal",fn:function(){return [_vm._t("hoDateModal")]},proxy:true},{key:"hoTextFieldModal",fn:function(){return [_vm._t("hoTextModal")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlType === 'select')?_c('SelectDialog',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'gestation')?_c('Gestation',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table')?_c('TableProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table-row')?_c('TableRowProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table-cell')?_c('TableCellProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'table-col')?_c('TableColProperty',{attrs:{"hoEditorFactoryId":_vm.hoEditorFactoryId,"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.isCustoms)?_c('CustomAttributes',{attrs:{"isTableProperty":_vm.isTableProperty},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.isDataSource)?_c('DataSourceDialog',{on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.isListStyle)?_c('ListSource',{on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'RadioBox' || _vm.controlType === 'CheckBox')?_c('RadioCheckbox',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId,"controlProperty":_vm.controlProperty},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'waterset')?_c('WaterSetDialog',{attrs:{"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'comment')?_c('CommentDialog',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"insertComments":_vm.insertComments,"closed":_vm.handleClose},scopedSlots:_vm._u([{key:"hoCommentModal",fn:function(){return [_vm._t("hoComment")]},proxy:true}],null,true)}):_vm._e(),(_vm.controlType === 'pageInfoes')?_c('PageInfoes',{attrs:{"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'delimiter')?_c('Delimiter',{attrs:{"vueController":_vm.vueController},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'sign')?_c('Sign',{attrs:{"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'upload-image')?_c('UploadImageDialog',{attrs:{"uploadImageParams":_vm.uploadImageParams,"vueController":_vm.vueController,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'edit-image')?_c('CanvasImageDialog',{attrs:{"vueController":_vm.vueController,"hoEditorFactoryId":_vm.hoEditorFactoryId,"controlStatus":_vm.controlStatus},on:{"closed":_vm.handleClose}}):_vm._e(),(_vm.controlType === 'paragraph')?_c('ParagraphDialog',{attrs:{"vueController":_vm.vueController,"controlProperty":_vm.controlProperty,"controlStatus":_vm.controlStatus,"hoEditorFactoryId":_vm.hoEditorFactoryId},on:{"closed":_vm.handleClose},scopedSlots:_vm._u([{key:"hoParagraph",fn:function(){return [_vm._t("hoParagraphModal")]},proxy:true}],null,true)}):_vm._e()],1)}
|
|
225772
|
+
var ControlModalvue_type_template_id_36fbe7eb_staticRenderFns = []
|
|
225611
225773
|
|
|
225612
225774
|
|
|
225613
225775
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/selectDialog/SelectDialog.vue?vue&type=template&id=3b6d4c1e&scoped=true&
|
|
@@ -229751,6 +229913,104 @@ var CanvasImageDialog_component = normalizeComponent(
|
|
|
229751
229913
|
|
|
229752
229914
|
|
|
229753
229915
|
|
|
229916
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/paragraph/ParagraphDialog.vue?vue&type=template&id=461dae42&
|
|
229917
|
+
var ParagraphDialogvue_type_template_id_461dae42_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:_vm.animationClassNames},[_c('header',{staticClass:"modal-title"},[_c('span',[_vm._v("段落属性设置")]),_c('i',{staticClass:"el-icon-close modal-title-close",on:{"click":_vm.handleClose}})]),_c('section',{staticClass:"modal-content"},[_c('ul',{staticClass:"control-list"},[_vm._t("hoParagraph")],2)]),_c('footer',{staticClass:"ho-modal-footer"},[_c('el-button',{attrs:{"size":"small","type":"primary"},on:{"click":_vm.sure}},[_vm._v("确定")]),_c('el-button',{staticStyle:{"margin-left":"30px"},attrs:{"size":"small"},on:{"click":_vm.handleClose}},[_vm._v("取消")])],1)])}
|
|
229918
|
+
var ParagraphDialogvue_type_template_id_461dae42_staticRenderFns = []
|
|
229919
|
+
|
|
229920
|
+
|
|
229921
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/paragraph/ParagraphDialog.vue?vue&type=script&lang=js&
|
|
229922
|
+
//
|
|
229923
|
+
//
|
|
229924
|
+
//
|
|
229925
|
+
//
|
|
229926
|
+
//
|
|
229927
|
+
//
|
|
229928
|
+
//
|
|
229929
|
+
//
|
|
229930
|
+
//
|
|
229931
|
+
//
|
|
229932
|
+
//
|
|
229933
|
+
//
|
|
229934
|
+
//
|
|
229935
|
+
//
|
|
229936
|
+
//
|
|
229937
|
+
//
|
|
229938
|
+
//
|
|
229939
|
+
//
|
|
229940
|
+
//
|
|
229941
|
+
|
|
229942
|
+
/* harmony default export */ var ParagraphDialogvue_type_script_lang_js_ = ({
|
|
229943
|
+
name: 'ParagraphDialog',
|
|
229944
|
+
props: {
|
|
229945
|
+
hoEditorFactoryId: {
|
|
229946
|
+
type: String,
|
|
229947
|
+
required: true
|
|
229948
|
+
},
|
|
229949
|
+
controlStatus: {
|
|
229950
|
+
type: String,
|
|
229951
|
+
required: true
|
|
229952
|
+
},
|
|
229953
|
+
controlProperty: {
|
|
229954
|
+
type: Object,
|
|
229955
|
+
required: true
|
|
229956
|
+
}
|
|
229957
|
+
},
|
|
229958
|
+
inject: ['getParagraphCustomProperty'],
|
|
229959
|
+
data: function data() {
|
|
229960
|
+
return {
|
|
229961
|
+
textActiveName: 'first',
|
|
229962
|
+
animationClassNames: 'control-modal-contents paragraph-modal animation-in'
|
|
229963
|
+
};
|
|
229964
|
+
},
|
|
229965
|
+
computed: {
|
|
229966
|
+
domRange: function domRange() {
|
|
229967
|
+
return this.controlProperty.domRange;
|
|
229968
|
+
}
|
|
229969
|
+
},
|
|
229970
|
+
methods: {
|
|
229971
|
+
sure: function sure() {
|
|
229972
|
+
var _hoEditorFactory$vueC;
|
|
229973
|
+
|
|
229974
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.hoEditorFactoryId);
|
|
229975
|
+
var node = (_hoEditorFactory$vueC = hoEditorFactory.vueController.findNodebyPath(this.domRange.endPath)) === null || _hoEditorFactory$vueC === void 0 ? void 0 : _hoEditorFactory$vueC.node;
|
|
229976
|
+
var paragraphNode = hoEditorFactory.drawTree.getDrawLineByDNode(node.drawNodes[0]).paragraphNode;
|
|
229977
|
+
paragraphNode.setCustomProperty(this.getParagraphCustomProperty());
|
|
229978
|
+
this.handleClose();
|
|
229979
|
+
},
|
|
229980
|
+
handleClose: function handleClose() {
|
|
229981
|
+
this.animationClassNames = 'control-modal-contents paragraph-modal animation-out';
|
|
229982
|
+
this.$emit('closed');
|
|
229983
|
+
}
|
|
229984
|
+
}
|
|
229985
|
+
});
|
|
229986
|
+
;// CONCATENATED MODULE: ./src/components/controls/paragraph/ParagraphDialog.vue?vue&type=script&lang=js&
|
|
229987
|
+
/* harmony default export */ var paragraph_ParagraphDialogvue_type_script_lang_js_ = (ParagraphDialogvue_type_script_lang_js_);
|
|
229988
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-65[0].rules[0].use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65[0].rules[0].use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65[0].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65[0].rules[0].use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/paragraph/ParagraphDialog.vue?vue&type=style&index=0&lang=scss&
|
|
229989
|
+
// extracted by mini-css-extract-plugin
|
|
229990
|
+
|
|
229991
|
+
;// CONCATENATED MODULE: ./src/components/controls/paragraph/ParagraphDialog.vue?vue&type=style&index=0&lang=scss&
|
|
229992
|
+
|
|
229993
|
+
;// CONCATENATED MODULE: ./src/components/controls/paragraph/ParagraphDialog.vue
|
|
229994
|
+
|
|
229995
|
+
|
|
229996
|
+
|
|
229997
|
+
;
|
|
229998
|
+
|
|
229999
|
+
|
|
230000
|
+
/* normalize component */
|
|
230001
|
+
|
|
230002
|
+
var ParagraphDialog_component = normalizeComponent(
|
|
230003
|
+
paragraph_ParagraphDialogvue_type_script_lang_js_,
|
|
230004
|
+
ParagraphDialogvue_type_template_id_461dae42_render,
|
|
230005
|
+
ParagraphDialogvue_type_template_id_461dae42_staticRenderFns,
|
|
230006
|
+
false,
|
|
230007
|
+
null,
|
|
230008
|
+
null,
|
|
230009
|
+
null
|
|
230010
|
+
|
|
230011
|
+
)
|
|
230012
|
+
|
|
230013
|
+
/* harmony default export */ var ParagraphDialog = (ParagraphDialog_component.exports);
|
|
229754
230014
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/watermark/WaterSet.vue?vue&type=template&id=58b59c58&
|
|
229755
230015
|
var WaterSetvue_type_template_id_58b59c58_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"control-modal-contents water-set animation-in"},[_c('header',{staticClass:"modal-title"},[_c('span',[_vm._v("水印")]),_c('i',{staticClass:"el-icon-close modal-title-close",on:{"click":_vm.handleClose}})]),_c('section',{staticClass:"modal-content"},[_c('ul',{staticClass:"control-list"},[_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label",staticStyle:{"width":"50px"}},[_vm._v("内容")]),_c('el-input',{attrs:{"type":"text","size":"mini","clearable":"","placeholder":"文本内容","maxlength":"20","show-word-limit":""},on:{"input":_vm.codeChange},model:{value:(_vm.textContent),callback:function ($$v) {_vm.textContent=$$v},expression:"textContent"}})],1),_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label",staticStyle:{"width":"50px"}},[_vm._v("角度")]),_c('el-radio-group',{attrs:{"size":"mini"},on:{"change":_vm.codeChange},model:{value:(_vm.rotate),callback:function ($$v) {_vm.rotate=$$v},expression:"rotate"}},[_c('el-radio-button',{attrs:{"label":0}},[_vm._v("水平")]),_c('el-radio-button',{attrs:{"label":1}},[_vm._v("倾斜")])],1)],1),_c('li',{staticClass:"control-item"},[_c('span',{staticClass:"label",staticStyle:{"width":"50px"}},[_vm._v("颜色")]),_c('el-color-picker',{attrs:{"show-alpha":""},on:{"change":_vm.codeChange},model:{value:(_vm.color),callback:function ($$v) {_vm.color=$$v},expression:"color"}})],1)]),_c('div',{staticClass:"section-right"},[_c('fieldset',{staticClass:"fieldset"},[_c('legend',[_vm._v("预 览")]),_c('div',{attrs:{"id":"water"}},[_c('img',{directives:[{name:"show",rawName:"v-show",value:(_vm.waterUrl),expression:"waterUrl"}],attrs:{"src":_vm.waterUrl,"alt":"背景水印"}})])])])]),_c('footer',{staticClass:"ho-modal-footer"},[_c('el-button',{attrs:{"size":"small","type":"primary"},on:{"click":_vm.sure}},[_vm._v("确定")]),_c('el-button',{staticStyle:{"margin-left":"30px"},attrs:{"size":"small"},on:{"click":_vm.handleClose}},[_vm._v("取消")])],1)])}
|
|
229756
230016
|
var WaterSetvue_type_template_id_58b59c58_staticRenderFns = []
|
|
@@ -231426,6 +231686,7 @@ var TableCellProperty_component = normalizeComponent(
|
|
|
231426
231686
|
|
|
231427
231687
|
|
|
231428
231688
|
|
|
231689
|
+
|
|
231429
231690
|
|
|
231430
231691
|
|
|
231431
231692
|
var ControlModal = /*#__PURE__*/function (_Mixins) {
|
|
@@ -231536,7 +231797,8 @@ ControlModal = __decorate([vue_class_component_esm({
|
|
|
231536
231797
|
PageInfoes: pageInfoes,
|
|
231537
231798
|
Delimiter: delimiter,
|
|
231538
231799
|
UploadImageDialog: upload_UploadImageDialog,
|
|
231539
|
-
CanvasImageDialog: CanvasImageDialog
|
|
231800
|
+
CanvasImageDialog: CanvasImageDialog,
|
|
231801
|
+
ParagraphDialog: ParagraphDialog
|
|
231540
231802
|
}
|
|
231541
231803
|
})], ControlModal);
|
|
231542
231804
|
/* harmony default export */ var ControlModalvue_type_script_lang_ts_ = (ControlModal);
|
|
@@ -231552,8 +231814,8 @@ ControlModal = __decorate([vue_class_component_esm({
|
|
|
231552
231814
|
;
|
|
231553
231815
|
var ControlModal_component = normalizeComponent(
|
|
231554
231816
|
controls_ControlModalvue_type_script_lang_ts_,
|
|
231555
|
-
|
|
231556
|
-
|
|
231817
|
+
ControlModalvue_type_template_id_36fbe7eb_render,
|
|
231818
|
+
ControlModalvue_type_template_id_36fbe7eb_staticRenderFns,
|
|
231557
231819
|
false,
|
|
231558
231820
|
null,
|
|
231559
231821
|
null,
|
|
@@ -232677,12 +232939,6 @@ var json_font_namespaceObject = JSON.parse('{"TN":[{"ch":"宋体","en":"SimSun",
|
|
|
232677
232939
|
|
|
232678
232940
|
|
|
232679
232941
|
|
|
232680
|
-
|
|
232681
|
-
|
|
232682
|
-
|
|
232683
|
-
|
|
232684
|
-
|
|
232685
|
-
|
|
232686
232942
|
|
|
232687
232943
|
|
|
232688
232944
|
|
|
@@ -232809,6 +233065,11 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232809
233065
|
value: function getCustomProperty() {
|
|
232810
233066
|
return this.customProperty;
|
|
232811
233067
|
}
|
|
233068
|
+
}, {
|
|
233069
|
+
key: "getParagraphCustomProperty",
|
|
233070
|
+
value: function getParagraphCustomProperty() {
|
|
233071
|
+
return this.paragraphCustomProperty;
|
|
233072
|
+
}
|
|
232812
233073
|
}, {
|
|
232813
233074
|
key: "textStyleChange",
|
|
232814
233075
|
value: function textStyleChange(val) {
|
|
@@ -232826,7 +233087,7 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
232826
233087
|
}, {
|
|
232827
233088
|
key: "controlTypeChange",
|
|
232828
233089
|
value: function controlTypeChange(newValue, oldValue) {
|
|
232829
|
-
if (newValue === '' && ['text', 'date', 'comment'].includes(oldValue)) {
|
|
233090
|
+
if (newValue === '' && ['text', 'date', 'comment', 'paragraph'].includes(oldValue)) {
|
|
232830
233091
|
this.$emit('closeTextModal');
|
|
232831
233092
|
this.customPropertyValue = {};
|
|
232832
233093
|
}
|
|
@@ -233008,16 +233269,17 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
233008
233269
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this.activeDocId);
|
|
233009
233270
|
nodeInfoes.rightTypeIsTable = hoEditorFactory.docTree.curDomRange.normalize().inSameTable()[0];
|
|
233010
233271
|
nodeInfoes.rightPosition = rightPosition;
|
|
233272
|
+
var node = nodeInfoes.node();
|
|
233011
233273
|
|
|
233012
|
-
|
|
233274
|
+
nodeInfoes.labelNode = function () {
|
|
233013
233275
|
var labelNode = [];
|
|
233014
233276
|
var isIncludes = '';
|
|
233015
233277
|
var hoEditor = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(_this4.activeDocId);
|
|
233016
233278
|
var currentDomRange = hoEditor.vueController.getDomRange();
|
|
233017
233279
|
|
|
233018
233280
|
if (currentDomRange !== null && currentDomRange !== void 0 && currentDomRange.isEmpty) {
|
|
233019
|
-
if (
|
|
233020
|
-
labelNode.push(
|
|
233281
|
+
if (node instanceof LabelNode/* LabelNode */.P) {
|
|
233282
|
+
labelNode.push(node);
|
|
233021
233283
|
isIncludes = 'toText';
|
|
233022
233284
|
}
|
|
233023
233285
|
} else {
|
|
@@ -233040,16 +233302,20 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
233040
233302
|
labelNode: [].concat(labelNode),
|
|
233041
233303
|
isIncludes: isIncludes
|
|
233042
233304
|
};
|
|
233043
|
-
};
|
|
233305
|
+
}; // 是否是元素类型;
|
|
233044
233306
|
|
|
233045
|
-
nodeInfoes.labelNode = getLabelNode; // 是否是元素类型;
|
|
233046
233307
|
|
|
233047
233308
|
nodeInfoes.isElement = false;
|
|
233048
|
-
nodeInfoes.canShowComment = hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psEdit */.Dh.psEdit || hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psReview */.Dh.psReview || hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psReadOnly */.Dh.psReadOnly;
|
|
233049
|
-
|
|
233050
|
-
|
|
233051
|
-
|
|
233052
|
-
|
|
233309
|
+
nodeInfoes.canShowComment = hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psEdit */.Dh.psEdit || hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psReview */.Dh.psReview || hoEditorFactory.drawTree.paintStatus === DrawTree/* PaintState.psReadOnly */.Dh.psReadOnly; // if (
|
|
233310
|
+
// node instanceof TextInputFieldNode ||
|
|
233311
|
+
// node instanceof DateTimeNode ||
|
|
233312
|
+
// node instanceof DownListNode ||
|
|
233313
|
+
// node instanceof RadioAndCheckBoxNode ||
|
|
233314
|
+
// node instanceof MarkNode ||
|
|
233315
|
+
// (node instanceof TextNode && node.parentNode instanceof TextInputFieldNode)
|
|
233316
|
+
// ) {
|
|
233317
|
+
// nodeInfoes.isElement = true;
|
|
233318
|
+
// }
|
|
233053
233319
|
|
|
233054
233320
|
nodeInfoes.isHideComments = hoEditorFactory.isHideComments;
|
|
233055
233321
|
nodeInfoes.activePageIndex = this.activePageIndex;
|
|
@@ -233068,6 +233334,18 @@ var HoDocs = /*#__PURE__*/function (_Mixins) {
|
|
|
233068
233334
|
};
|
|
233069
233335
|
}
|
|
233070
233336
|
|
|
233337
|
+
nodeInfoes.getParagraphNode = function () {
|
|
233338
|
+
var _hoEditorFactory$vueC;
|
|
233339
|
+
|
|
233340
|
+
var node = (_hoEditorFactory$vueC = hoEditorFactory.vueController.findNodebyPath(_this4.domRange.endPath)) === null || _hoEditorFactory$vueC === void 0 ? void 0 : _hoEditorFactory$vueC.node;
|
|
233341
|
+
|
|
233342
|
+
if (node) {
|
|
233343
|
+
return hoEditorFactory.drawTree.getDrawLineByDNode(node.drawNodes[0]).paragraphNode;
|
|
233344
|
+
}
|
|
233345
|
+
|
|
233346
|
+
return null;
|
|
233347
|
+
};
|
|
233348
|
+
|
|
233071
233349
|
this.$emit('rightClickEvent', nodeInfoes);
|
|
233072
233350
|
}
|
|
233073
233351
|
/**
|
|
@@ -233303,6 +233581,8 @@ __decorate([Prop()], HoDocs.prototype, "uploadImageParams", void 0);
|
|
|
233303
233581
|
|
|
233304
233582
|
__decorate([Prop()], HoDocs.prototype, "customProperty", void 0);
|
|
233305
233583
|
|
|
233584
|
+
__decorate([Prop()], HoDocs.prototype, "paragraphCustomProperty", void 0);
|
|
233585
|
+
|
|
233306
233586
|
__decorate([Prop()], HoDocs.prototype, "deleteImageNodeList", void 0);
|
|
233307
233587
|
|
|
233308
233588
|
__decorate([Prop()], HoDocs.prototype, "pageProperty", void 0);
|
|
@@ -233349,6 +233629,8 @@ __decorate([Watch('editJson')], HoDocs.prototype, "editJsonChange", null);
|
|
|
233349
233629
|
|
|
233350
233630
|
__decorate([Provide()], HoDocs.prototype, "getCustomProperty", null);
|
|
233351
233631
|
|
|
233632
|
+
__decorate([Provide()], HoDocs.prototype, "getParagraphCustomProperty", null);
|
|
233633
|
+
|
|
233352
233634
|
__decorate([Watch('textStyle', {
|
|
233353
233635
|
deep: true
|
|
233354
233636
|
})], HoDocs.prototype, "textStyleChange", null);
|