hoeditor-web 3.0.28 → 3.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/hoeditor.css +13052 -2
- package/lib/hoeditor.umd.js +63 -225
- package/lib/hoeditor.umd.min.js +3 -3
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -66612,7 +66612,6 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
66612
66612
|
_this._maxHeight = maxHeight;
|
|
66613
66613
|
_this._maxWidth = maxWidth;
|
|
66614
66614
|
_this._usedHeight = _this._docHeight;
|
|
66615
|
-
// this._drawLines = new Array<DrawLine>();
|
|
66616
66615
|
_this._changed = false;
|
|
66617
66616
|
_this._areaComments = new Map();
|
|
66618
66617
|
return _this;
|
|
@@ -66669,7 +66668,6 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
66669
66668
|
}, {
|
|
66670
66669
|
key: "dHeight",
|
|
66671
66670
|
get: function get() {
|
|
66672
|
-
// console.log("DrawArea dHeight" + this._dHeight);
|
|
66673
66671
|
return this._dHeight;
|
|
66674
66672
|
},
|
|
66675
66673
|
set: function set(val) {
|
|
@@ -66867,85 +66865,11 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
66867
66865
|
}, {
|
|
66868
66866
|
key: "canFit",
|
|
66869
66867
|
value: function canFit(dtop, dHeight) {
|
|
66870
|
-
// if (this._dTop === dtop) {
|
|
66871
|
-
// return true;
|
|
66872
|
-
// } else
|
|
66873
|
-
// {
|
|
66874
66868
|
if (dtop + dHeight > this._maxHeight) {
|
|
66875
66869
|
return false;
|
|
66876
66870
|
}
|
|
66877
66871
|
return true;
|
|
66878
|
-
// }
|
|
66879
66872
|
}
|
|
66880
|
-
// public findIndex(
|
|
66881
|
-
// dPage: DrawPage,
|
|
66882
|
-
// dLines: Array<DrawLine | DrawTable>,
|
|
66883
|
-
// lineIndex: number
|
|
66884
|
-
// ) {
|
|
66885
|
-
// const dline = dLines[lineIndex];
|
|
66886
|
-
// let index = -1;
|
|
66887
|
-
// if (dline instanceof DrawTable) {
|
|
66888
|
-
// const dobj = (dline as DrawTable).getDrawTableByPage(dPage.pageIndex);
|
|
66889
|
-
// if (dobj) {
|
|
66890
|
-
// index = this._drawLines.indexOf(dobj);
|
|
66891
|
-
// }
|
|
66892
|
-
// } else {
|
|
66893
|
-
// index = this._drawLines.indexOf(dline);
|
|
66894
|
-
// }
|
|
66895
|
-
// return index;
|
|
66896
|
-
// }
|
|
66897
|
-
// private getRootIndex(
|
|
66898
|
-
// dPage: DrawPage,
|
|
66899
|
-
// dLines: Array<DrawLine | DrawTable>,
|
|
66900
|
-
// lineIndex: number
|
|
66901
|
-
// ): number {
|
|
66902
|
-
// // const dline = dLines[lineIndex];
|
|
66903
|
-
// let index = -1;
|
|
66904
|
-
// if (this._drawLines.length > 0) {
|
|
66905
|
-
// if (lineIndex === 0) {
|
|
66906
|
-
// index = 0;
|
|
66907
|
-
// } else {
|
|
66908
|
-
// index = this.findIndex(dPage, dLines, lineIndex);
|
|
66909
|
-
// if (index === -1) {
|
|
66910
|
-
// const aindex = this.findIndex(dPage, dLines, lineIndex - 1);
|
|
66911
|
-
// if (aindex >= 0) {
|
|
66912
|
-
// index = aindex + 1;
|
|
66913
|
-
// }
|
|
66914
|
-
// }
|
|
66915
|
-
// if (index === -1) {
|
|
66916
|
-
// let aEndLine: DrawTable | DrawLine;
|
|
66917
|
-
// const dEndDrawline = this._drawLines[this._drawLines.length - 1];
|
|
66918
|
-
// if (dEndDrawline instanceof DrawPageTable) {
|
|
66919
|
-
// aEndLine = (dEndDrawline as DrawPageTable).table.drawTable;
|
|
66920
|
-
// } else aEndLine = dEndDrawline as DrawLine;
|
|
66921
|
-
// const endIndex = dLines.indexOf(aEndLine);
|
|
66922
|
-
// if (lineIndex > endIndex) {
|
|
66923
|
-
// index = endIndex + 1;
|
|
66924
|
-
// } else if (lineIndex === endIndex) {
|
|
66925
|
-
// index = endIndex;
|
|
66926
|
-
// }
|
|
66927
|
-
// }
|
|
66928
|
-
// }
|
|
66929
|
-
// }
|
|
66930
|
-
// return index;
|
|
66931
|
-
// }
|
|
66932
|
-
// public clearAfter(
|
|
66933
|
-
// dLines: Array<DrawLine | DrawTable>,
|
|
66934
|
-
// startIndex: number,
|
|
66935
|
-
// endIndex: number
|
|
66936
|
-
// ) {
|
|
66937
|
-
// for (let i = startIndex; i <= endIndex; i++) {
|
|
66938
|
-
// const dline = dLines[i];
|
|
66939
|
-
// if (dline instanceof DrawTable) {
|
|
66940
|
-
// const dPartTable = dline.getDrawTableByParentArea(this);
|
|
66941
|
-
// if (dPartTable) {
|
|
66942
|
-
// this.removeChild(dPartTable);
|
|
66943
|
-
// }
|
|
66944
|
-
// } else {
|
|
66945
|
-
// this.removeChild(dline);
|
|
66946
|
-
// }
|
|
66947
|
-
// }
|
|
66948
|
-
// }
|
|
66949
66873
|
}, {
|
|
66950
66874
|
key: "clear",
|
|
66951
66875
|
value: function clear() {
|
|
@@ -66956,9 +66880,7 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
66956
66880
|
value: function paintBackground() {
|
|
66957
66881
|
if (!this._background) this._background = new createjs.Shape();
|
|
66958
66882
|
this._background.graphics.clear();
|
|
66959
|
-
this._background.graphics
|
|
66960
|
-
//.beginFill("#FFFFFF")
|
|
66961
|
-
.drawRect(-this.x, 0, _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_19__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).pageProperty.widthPixes, Math.max(this.docHeight, this._dHeight)).closePath();
|
|
66883
|
+
this._background.graphics.drawRect(-this.x, 0, _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_19__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).pageProperty.widthPixes, Math.max(this.docHeight, this._dHeight)).closePath();
|
|
66962
66884
|
this.addChildAt(this._background, 0);
|
|
66963
66885
|
this.setChildIndex(this._background, 0);
|
|
66964
66886
|
}
|
|
@@ -66977,9 +66899,7 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
66977
66899
|
if (this._allowAcrossPage) return;
|
|
66978
66900
|
if (!this._mask) this._mask = new createjs.Shape();
|
|
66979
66901
|
this._mask.graphics.clear();
|
|
66980
|
-
this._mask.graphics
|
|
66981
|
-
//.beginStroke("#FFFFFF")
|
|
66982
|
-
.drawRect(-this.x, 0, _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_19__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).pageProperty.widthPixes, aheight + 1).closePath();
|
|
66902
|
+
this._mask.graphics.drawRect(-this.x, 0, _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_19__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).pageProperty.widthPixes, aheight + 1).closePath();
|
|
66983
66903
|
//遮罩不是当前容器的Child
|
|
66984
66904
|
this._mask.x = this.x;
|
|
66985
66905
|
this._mask.y = this.y;
|
|
@@ -66995,24 +66915,11 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
66995
66915
|
value: function update(prevDrawArea, dlines, startIndex, dTop, restHeight) {
|
|
66996
66916
|
var bFinishedPaint = true;
|
|
66997
66917
|
var isFull = false;
|
|
66998
|
-
// this.clearAfter(drawPage, dlines, startIndex);
|
|
66999
66918
|
var ret = startIndex;
|
|
67000
66919
|
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_19__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
67001
|
-
// const dlineIter = this.listDrawLineByPathRange(
|
|
67002
|
-
// startIndex,
|
|
67003
|
-
// dlines.length - 1
|
|
67004
|
-
// );
|
|
67005
66920
|
var nextDline = startIndex;
|
|
67006
|
-
// if (this.drawLines.length > 0 && startIndex > 0) {
|
|
67007
|
-
// dTop =
|
|
67008
|
-
// this.drawLines[this.drawLines.length - 1].dTop +
|
|
67009
|
-
// this.drawLines[this.drawLines.length - 1].dHeight +
|
|
67010
|
-
// this.drawLines[this.drawLines.length - 1].paragraphNode.combineParagraph
|
|
67011
|
-
// .lineSpace;
|
|
67012
|
-
// }
|
|
67013
66921
|
var dRestHeight = Infinity;
|
|
67014
66922
|
if (this.allowAcrossPage) dRestHeight = this._maxHeight - dTop;
|
|
67015
|
-
var oldEndLine = this._endDline;
|
|
67016
66923
|
this._endDline = startIndex;
|
|
67017
66924
|
while (nextDline < dlines.length) {
|
|
67018
66925
|
var dline = dlines[nextDline];
|
|
@@ -67443,7 +67350,7 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
67443
67350
|
if (isRecord) {
|
|
67444
67351
|
for (var i = this.children.length - 1; i >= 0; i--) {
|
|
67445
67352
|
var child = this.children[i];
|
|
67446
|
-
if (child.name && child.name ===
|
|
67353
|
+
if (child.name && child.name === 'record' + comment.id) {
|
|
67447
67354
|
this.children.splice(i, 1);
|
|
67448
67355
|
}
|
|
67449
67356
|
}
|
|
@@ -67569,16 +67476,16 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
67569
67476
|
var dateTextShape = null;
|
|
67570
67477
|
var commentTextShape = null;
|
|
67571
67478
|
// 批注人
|
|
67572
|
-
nameTextShape = new createjs.Text(comment.userName,
|
|
67479
|
+
nameTextShape = new createjs.Text(comment.userName, '12px 微软雅黑', '#000');
|
|
67573
67480
|
nameTextShape.lineHeight = 20;
|
|
67574
|
-
nameTextShape.name =
|
|
67481
|
+
nameTextShape.name = 'creator';
|
|
67575
67482
|
nameTextShape.x = 10;
|
|
67576
67483
|
nameTextShape.y = 10;
|
|
67577
67484
|
nameTextShape.alpha = 1;
|
|
67578
67485
|
// 批注时间
|
|
67579
|
-
dateTextShape = new createjs.Text(comment.date,
|
|
67486
|
+
dateTextShape = new createjs.Text(comment.date, '12px 微软雅黑', '#333');
|
|
67580
67487
|
dateTextShape.lineHeight = 20;
|
|
67581
|
-
dateTextShape.name =
|
|
67488
|
+
dateTextShape.name = 'time';
|
|
67582
67489
|
dateTextShape.x = nameTextShape.getMeasuredWidth() + 30;
|
|
67583
67490
|
dateTextShape.y = 10;
|
|
67584
67491
|
dateTextShape.alpha = 1;
|
|
@@ -67586,35 +67493,35 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
67586
67493
|
var commentArr = comment.commentTextWarp(commentWidth, comment.text);
|
|
67587
67494
|
var text = commentArr[0];
|
|
67588
67495
|
comment.lineHeight = 20 * (1 + commentArr[1]) + 10;
|
|
67589
|
-
commentTextShape = new createjs.Text(text,
|
|
67496
|
+
commentTextShape = new createjs.Text(text, '12px 微软雅黑', '#666');
|
|
67590
67497
|
commentTextShape.lineWidth = commentWidth - 25;
|
|
67591
67498
|
commentTextShape.lineHeight = 20;
|
|
67592
|
-
commentTextShape.name =
|
|
67499
|
+
commentTextShape.name = 'text';
|
|
67593
67500
|
commentTextShape.x = 10;
|
|
67594
67501
|
commentTextShape.y = dateTextShape.y + dateTextShape.getMeasuredHeight();
|
|
67595
67502
|
commentTextShape.alpha = 1;
|
|
67596
67503
|
//背景
|
|
67597
67504
|
var backShape = new createjs.Shape();
|
|
67598
|
-
backShape.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke(
|
|
67505
|
+
backShape.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke('rgba(255, 0, 0, 1)').beginFill('#ffe5e5')
|
|
67599
67506
|
//.drawRoundRect(0, 0, commentWidth - 20, comment.lineHeigh,5);
|
|
67600
67507
|
.drawRect(0, 0, commentWidth - 20, comment.lineHeight);
|
|
67601
|
-
backShape.name =
|
|
67508
|
+
backShape.name = 'back';
|
|
67602
67509
|
backShape.alpha = 0.5;
|
|
67603
67510
|
//横线
|
|
67604
67511
|
var horizontalLine = new createjs.Shape();
|
|
67605
|
-
horizontalLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke(
|
|
67512
|
+
horizontalLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke('rgba(255, 0, 0, 1)').moveTo(nodeX, nodeY).lineTo(docWidth, nodeY);
|
|
67606
67513
|
horizontalLine.name = comment.id;
|
|
67607
67514
|
horizontalLine.alpha = 0.5;
|
|
67608
67515
|
//指向线
|
|
67609
67516
|
var guideLine = new createjs.Shape();
|
|
67610
|
-
guideLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke(
|
|
67517
|
+
guideLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke('rgba(255, 0, 0, 1)').moveTo(docWidth, nodeY).lineTo(docWidth + 15, commentY - comment.lineHeight / 4);
|
|
67611
67518
|
guideLine.name = comment.id;
|
|
67612
67519
|
guideLine.alpha = 0.5;
|
|
67613
67520
|
container.addChild(backShape);
|
|
67614
67521
|
container.addChild(nameTextShape);
|
|
67615
67522
|
container.addChild(dateTextShape);
|
|
67616
67523
|
container.addChild(commentTextShape);
|
|
67617
|
-
backShape.addEventListener(
|
|
67524
|
+
backShape.addEventListener('mousedown', function (e) {
|
|
67618
67525
|
return _this4.onMouseDown(e, comment);
|
|
67619
67526
|
});
|
|
67620
67527
|
if (!hoEditorFactory.isHideComments && commentWidth > 100) {
|
|
@@ -67656,7 +67563,7 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
67656
67563
|
var container = new createjs.Container();
|
|
67657
67564
|
container.x = docWidth + 15;
|
|
67658
67565
|
container.y = commentY - comment.lineHeight / 2;
|
|
67659
|
-
container.name =
|
|
67566
|
+
container.name = 'record' + comment.id;
|
|
67660
67567
|
var commentTextShape = null;
|
|
67661
67568
|
// 批注内容
|
|
67662
67569
|
var commentArr = comment.commentTextWarp(commentWidth, comment.text);
|
|
@@ -67664,10 +67571,10 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
67664
67571
|
//const textLen = (commentArr[1] as number) > 1 ? (commentArr[1] as number) - 1 : (commentArr[1] as number);
|
|
67665
67572
|
var textLen = commentArr[1];
|
|
67666
67573
|
comment.lineHeight = 20 * textLen + 10;
|
|
67667
|
-
commentTextShape = new createjs.Text(text,
|
|
67574
|
+
commentTextShape = new createjs.Text(text, '12px 微软雅黑', '#666');
|
|
67668
67575
|
commentTextShape.lineWidth = commentWidth - 25;
|
|
67669
67576
|
commentTextShape.lineHeight = 20;
|
|
67670
|
-
commentTextShape.name =
|
|
67577
|
+
commentTextShape.name = 'oldValue';
|
|
67671
67578
|
commentTextShape.x = 5;
|
|
67672
67579
|
commentTextShape.y = 10;
|
|
67673
67580
|
commentTextShape.alpha = 1;
|
|
@@ -67675,18 +67582,18 @@ var DrawArea = /*#__PURE__*/function (_DrawRect) {
|
|
|
67675
67582
|
var textWidth = commentTextShape.getMeasuredWidth();
|
|
67676
67583
|
var shapeWidth = textWidth + 10 > commentWidth - 30 ? commentWidth - 30 : textWidth + 10;
|
|
67677
67584
|
var backShape = new createjs.Shape();
|
|
67678
|
-
backShape.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke(
|
|
67679
|
-
backShape.name =
|
|
67585
|
+
backShape.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke('rgba(255, 0, 0, 1)').beginFill('#ffe5e5').drawRoundRect(0, 0, shapeWidth, comment.lineHeight, 5);
|
|
67586
|
+
backShape.name = 'backShape';
|
|
67680
67587
|
backShape.alpha = 0.5;
|
|
67681
67588
|
//横线
|
|
67682
67589
|
var horizontalLine = new createjs.Shape();
|
|
67683
|
-
horizontalLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke(
|
|
67684
|
-
horizontalLine.name =
|
|
67590
|
+
horizontalLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke('rgba(255, 0, 0, 1)').moveTo(nodeX, nodeY).lineTo(docWidth, nodeY);
|
|
67591
|
+
horizontalLine.name = 'record' + comment.id;
|
|
67685
67592
|
horizontalLine.alpha = 1;
|
|
67686
67593
|
//指向线
|
|
67687
67594
|
var guideLine = new createjs.Shape();
|
|
67688
|
-
guideLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke(
|
|
67689
|
-
guideLine.name =
|
|
67595
|
+
guideLine.graphics.setStrokeDash([4, 1], 0).setStrokeStyle(1).beginStroke('rgba(255, 0, 0, 1)').moveTo(docWidth, nodeY).lineTo(docWidth + 15, commentY - comment.lineHeight / 4);
|
|
67596
|
+
guideLine.name = 'record' + comment.id;
|
|
67690
67597
|
guideLine.alpha = 1;
|
|
67691
67598
|
container.addChild(backShape);
|
|
67692
67599
|
container.addChild(commentTextShape);
|
|
@@ -68155,7 +68062,7 @@ var DrawPage = /*#__PURE__*/function () {
|
|
|
68155
68062
|
// this._drawTree = hoeditorfacotry.drawTree;
|
|
68156
68063
|
this._active = false;
|
|
68157
68064
|
this._pageIndex = index;
|
|
68158
|
-
this._name =
|
|
68065
|
+
this._name = 'vuePage';
|
|
68159
68066
|
this._domLevel = null;
|
|
68160
68067
|
this._selectLevel = null;
|
|
68161
68068
|
this._needUpdateStage = true;
|
|
@@ -68358,7 +68265,7 @@ var DrawPage = /*#__PURE__*/function () {
|
|
|
68358
68265
|
value: function addAreaSplitTag(x1, y1, x2, y2, x3, y3) {
|
|
68359
68266
|
var aTag = new createjs.Container();
|
|
68360
68267
|
var ashape = new createjs.Shape();
|
|
68361
|
-
ashape.graphics.beginStroke(
|
|
68268
|
+
ashape.graphics.beginStroke('#000').setStrokeStyle(1);
|
|
68362
68269
|
ashape.graphics.moveTo(x1, y1);
|
|
68363
68270
|
ashape.graphics.lineTo(x2, y2);
|
|
68364
68271
|
ashape.graphics.moveTo(x2, y2);
|
|
@@ -68401,7 +68308,7 @@ var DrawPage = /*#__PURE__*/function () {
|
|
|
68401
68308
|
}, {
|
|
68402
68309
|
key: "clear",
|
|
68403
68310
|
value: function clear(mode) {
|
|
68404
|
-
var lm = typeof mode !=
|
|
68311
|
+
var lm = typeof mode != 'number' ? 2 : mode;
|
|
68405
68312
|
if (lm != 1) {
|
|
68406
68313
|
this._selectContainer.removeAllChildren();
|
|
68407
68314
|
}
|
|
@@ -68456,7 +68363,7 @@ var DrawPage = /*#__PURE__*/function () {
|
|
|
68456
68363
|
this._footerRightTag.y = this._drawFooter.y;
|
|
68457
68364
|
this._drawMainDoc.x = hoEditorFactory.pageProperty.leftMarginPixes;
|
|
68458
68365
|
this._mainDocBorder && (this._mainDocBorder.children = []);
|
|
68459
|
-
if (hoEditorFactory.pageProperty.borderColor !==
|
|
68366
|
+
if (hoEditorFactory.pageProperty.borderColor !== '#FFFFFF' && hoEditorFactory.pageProperty.isPaintBorder) {
|
|
68460
68367
|
var _this$_domLevel$stage;
|
|
68461
68368
|
this._mainDocBorder = this.addMainDocBorder(dhheight);
|
|
68462
68369
|
(_this$_domLevel$stage = this._domLevel.stage) === null || _this$_domLevel$stage === void 0 ? void 0 : _this$_domLevel$stage.addChild(this._mainDocBorder);
|
|
@@ -68497,7 +68404,7 @@ var DrawPage = /*#__PURE__*/function () {
|
|
|
68497
68404
|
if (!this._background) this._background = new createjs.Shape();
|
|
68498
68405
|
hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_11__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
68499
68406
|
this._background.graphics.clear();
|
|
68500
|
-
backColor = hoEditorFactory.drawTree.paintStatus === _drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_7__/* .PaintState.psPreview */ .Dh.psPreview ?
|
|
68407
|
+
backColor = hoEditorFactory.drawTree.paintStatus === _drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_7__/* .PaintState.psPreview */ .Dh.psPreview ? '#FFFFFF' : '#FFFFFF'; // this._background.graphics
|
|
68501
68408
|
// .beginFill(backColor)
|
|
68502
68409
|
// .drawRect(
|
|
68503
68410
|
// 0,
|
|
@@ -68543,7 +68450,7 @@ var DrawPage = /*#__PURE__*/function () {
|
|
|
68543
68450
|
}, {
|
|
68544
68451
|
key: "getDrawAreaByPath",
|
|
68545
68452
|
value: function getDrawAreaByPath(path) {
|
|
68546
|
-
var arr = path.split(
|
|
68453
|
+
var arr = path.split('/');
|
|
68547
68454
|
if (arr[0] === _dom_DocTree__WEBPACK_IMPORTED_MODULE_6__/* .gMainPath */ .d9) {
|
|
68548
68455
|
return this._drawMainDoc;
|
|
68549
68456
|
} else if (arr[0] === _dom_DocTree__WEBPACK_IMPORTED_MODULE_6__/* .gHeaderPath */ .Yh) {
|
|
@@ -68689,20 +68596,6 @@ var DrawPageHeaderFooter = /*#__PURE__*/function (_DrawArea) {
|
|
|
68689
68596
|
|
|
68690
68597
|
|
|
68691
68598
|
|
|
68692
|
-
// // import {Select} from "./Select"
|
|
68693
|
-
// // import {InputNode} from "./drawCombineNode"
|
|
68694
|
-
// import {NodeType} from "./BaseNode"
|
|
68695
|
-
// import "@/yuki-createjs";
|
|
68696
|
-
// window.addEventListener("DOMContentLoaded", () => {
|
|
68697
|
-
// const acanvas: HTMLCanvasElement=window.document.getElementById("canvasBase") as HTMLCanvasElement;
|
|
68698
|
-
// const adiv: HTMLDivElement=window.document.getElementById("textDiv") as HTMLDivElement;
|
|
68699
|
-
// const atextarea: HTMLTextAreaElement=document.getElementById("textarea") as HTMLTextAreaElement;
|
|
68700
|
-
// // let aSelect:Select =new Select(acanvas);
|
|
68701
|
-
// // let stage=new createjs.Stage(acanvas);
|
|
68702
|
-
// // let aInput=new InputNode(null,NodeType.ntPage,null,stage);
|
|
68703
|
-
// // stage.addChild(aInput.container);
|
|
68704
|
-
// // stage.update();
|
|
68705
|
-
// });
|
|
68706
68599
|
|
|
68707
68600
|
|
|
68708
68601
|
|
|
@@ -78405,25 +78298,23 @@ var Editor = /*#__PURE__*/function () {
|
|
|
78405
78298
|
(0,defineProperty/* default */.Z)(this, "editController", void 0);
|
|
78406
78299
|
(0,defineProperty/* default */.Z)(this, "_hoEditorFactoryID", void 0);
|
|
78407
78300
|
this._hoEditorFactoryID = hoEditorFactoryID;
|
|
78408
|
-
var atextArea = document.createElement(
|
|
78409
|
-
atextArea.id =
|
|
78410
|
-
atextArea.style.position =
|
|
78411
|
-
atextArea.style.top =
|
|
78412
|
-
atextArea.style.left =
|
|
78413
|
-
atextArea.style.width =
|
|
78414
|
-
atextArea.style.height =
|
|
78415
|
-
atextArea.style.zIndex =
|
|
78416
|
-
atextArea.style.margin =
|
|
78417
|
-
atextArea.style.border =
|
|
78418
|
-
atextArea.style.padding =
|
|
78301
|
+
var atextArea = document.createElement('textarea');
|
|
78302
|
+
atextArea.id = 'hoEmrEditTextArea';
|
|
78303
|
+
atextArea.style.position = 'absolute';
|
|
78304
|
+
atextArea.style.top = '0';
|
|
78305
|
+
atextArea.style.left = '0';
|
|
78306
|
+
atextArea.style.width = '0';
|
|
78307
|
+
atextArea.style.height = '0';
|
|
78308
|
+
atextArea.style.zIndex = '3';
|
|
78309
|
+
atextArea.style.margin = '0';
|
|
78310
|
+
atextArea.style.border = '0';
|
|
78311
|
+
atextArea.style.padding = '0';
|
|
78419
78312
|
// atextArea.style.resize = "none";
|
|
78420
|
-
atextArea.style.outline =
|
|
78421
|
-
atextArea.style.fontSize =
|
|
78313
|
+
atextArea.style.outline = 'none';
|
|
78314
|
+
atextArea.style.fontSize = '16px';
|
|
78422
78315
|
// atextArea.style.overflow = "hidden";
|
|
78423
|
-
atextArea.style.background =
|
|
78424
|
-
atextArea.value =
|
|
78425
|
-
// window.document.body.appendChild(atextarea);
|
|
78426
|
-
// window.document.body.appendChild(atextarea);
|
|
78316
|
+
atextArea.style.background = 'none';
|
|
78317
|
+
atextArea.value = '';
|
|
78427
78318
|
this.pageIndex = -1;
|
|
78428
78319
|
this.input = atextArea;
|
|
78429
78320
|
this.editController = new EditorController(this._hoEditorFactoryID, this);
|
|
@@ -78476,8 +78367,8 @@ var Editor = /*#__PURE__*/function () {
|
|
|
78476
78367
|
key: "moveTo",
|
|
78477
78368
|
value: function moveTo(pageIndex, x, y) {
|
|
78478
78369
|
this.setPage(pageIndex);
|
|
78479
|
-
this.input.style.left = x +
|
|
78480
|
-
this.input.style.top = y +
|
|
78370
|
+
this.input.style.left = x + 'px';
|
|
78371
|
+
this.input.style.top = y + 'px';
|
|
78481
78372
|
this.input.focus();
|
|
78482
78373
|
}
|
|
78483
78374
|
}]);
|
|
@@ -88831,12 +88722,8 @@ var UnitConvert = /*#__PURE__*/function () {
|
|
|
88831
88722
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, UnitConvert);
|
|
88832
88723
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)(this, "dpiX", void 0);
|
|
88833
88724
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)(this, "dpiY", void 0);
|
|
88834
|
-
|
|
88835
|
-
|
|
88836
|
-
// this.dpiY= window.screen.deviceYDPI;
|
|
88837
|
-
// } else {
|
|
88838
|
-
var tmpNode = document.createElement("DIV");
|
|
88839
|
-
tmpNode.style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden";
|
|
88725
|
+
var tmpNode = document.createElement('DIV');
|
|
88726
|
+
tmpNode.style.cssText = 'width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden';
|
|
88840
88727
|
document.body.appendChild(tmpNode);
|
|
88841
88728
|
this.dpiX = tmpNode.offsetWidth;
|
|
88842
88729
|
this.dpiY = tmpNode.offsetHeight;
|
|
@@ -88871,22 +88758,22 @@ var UnitConvert = /*#__PURE__*/function () {
|
|
|
88871
88758
|
}, {
|
|
88872
88759
|
key: "randomColor",
|
|
88873
88760
|
value: function randomColor() {
|
|
88874
|
-
var color =
|
|
88761
|
+
var color = '#';
|
|
88875
88762
|
//for循环中,如果后面仅有一条语句,{}可省略不写
|
|
88876
88763
|
//同上面方法
|
|
88877
88764
|
for (var i = 0; i < 8; i++) {
|
|
88878
|
-
color += parseInt(Math.random() * 16 +
|
|
88765
|
+
color += parseInt(Math.random() * 16 + '').toString(16);
|
|
88879
88766
|
}
|
|
88880
88767
|
return color;
|
|
88881
88768
|
}
|
|
88882
88769
|
}, {
|
|
88883
88770
|
key: "getChineseNumber",
|
|
88884
88771
|
value: function getChineseNumber(num) {
|
|
88885
|
-
var chnNumChar = [
|
|
88886
|
-
var chnUnitSection = [
|
|
88772
|
+
var chnNumChar = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
|
88773
|
+
var chnUnitSection = ['', '万', '亿', '万亿', '亿亿'];
|
|
88887
88774
|
var unitPos = 0;
|
|
88888
|
-
var strIns =
|
|
88889
|
-
var chnStr =
|
|
88775
|
+
var strIns = '';
|
|
88776
|
+
var chnStr = '';
|
|
88890
88777
|
var needZero = false;
|
|
88891
88778
|
if (num === 0) {
|
|
88892
88779
|
return chnNumChar[0];
|
|
@@ -88908,10 +88795,10 @@ var UnitConvert = /*#__PURE__*/function () {
|
|
|
88908
88795
|
}, {
|
|
88909
88796
|
key: "SectionToChinese",
|
|
88910
88797
|
value: function SectionToChinese(section) {
|
|
88911
|
-
var chnNumChar = [
|
|
88912
|
-
var chnUnitChar = [
|
|
88913
|
-
var strIns =
|
|
88914
|
-
var chnStr =
|
|
88798
|
+
var chnNumChar = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
|
88799
|
+
var chnUnitChar = ['', '十', '百', '千'];
|
|
88800
|
+
var strIns = '';
|
|
88801
|
+
var chnStr = '';
|
|
88915
88802
|
var unitPos = 0;
|
|
88916
88803
|
var zero = true;
|
|
88917
88804
|
while (section > 0) {
|
|
@@ -88940,7 +88827,7 @@ var UnitConvert = /*#__PURE__*/function () {
|
|
|
88940
88827
|
}, {
|
|
88941
88828
|
key: "replaceAll",
|
|
88942
88829
|
value: function replaceAll(str, s1, s2) {
|
|
88943
|
-
str = str.replace(new RegExp(s1,
|
|
88830
|
+
str = str.replace(new RegExp(s1, 'gm'), s2);
|
|
88944
88831
|
return str;
|
|
88945
88832
|
}
|
|
88946
88833
|
}], [{
|
|
@@ -88978,7 +88865,7 @@ var UnitConvert = /*#__PURE__*/function () {
|
|
|
88978
88865
|
if (seconds.length === 1) {
|
|
88979
88866
|
seconds = "0".concat(seconds);
|
|
88980
88867
|
}
|
|
88981
|
-
return (format ||
|
|
88868
|
+
return (format || 'yyyy-MM-dd HH:mm:ss').replace(/yyyy/g, year).replace(/MM/g, month).replace(/dd/g, day).replace(/HH/g, hours).replace(/mm/g, minutes).replace(/ss/g, seconds);
|
|
88982
88869
|
}
|
|
88983
88870
|
}, {
|
|
88984
88871
|
key: "isPuctuation",
|
|
@@ -127406,7 +127293,7 @@ this.enableDOMEvents(true);}var p=createjs.extend(Stage,createjs.Container);// e
|
|
|
127406
127293
|
*
|
|
127407
127294
|
* @method enableDOMEvents
|
|
127408
127295
|
* @param {Boolean} [enable=true] Indicates whether to enable or disable the events. Default is true.
|
|
127409
|
-
**/p.enableDOMEvents=function(enable){if(enable==null){enable=true;}var n,o,ls=this._eventListeners;if(!enable&&ls){for(n in ls){o=ls[n];o.t.removeEventListener(n,o.f,false);}this._eventListeners=null;}else if(enable&&!ls&&this.canvas){var t=window.addEventListener?window:document;var _this=this;ls=this._eventListeners={};ls["mouseup"]={t:t,f:function f(e){_this._handleMouseUp(e);}};ls["mousemove"]={t:t,f:function f(e){_this._handleMouseMove(e);}};ls["dblclick"]={t:this.canvas,f:function f(e){_this._handleDoubleClick(e);}};ls["mousedown"]={t:this.canvas,f:function f(e){_this._handleMouseDown(e);}};for(n in ls){o=ls[n];o.t.addEventListener(n,o.f,false);}}};/**
|
|
127296
|
+
**/p.enableDOMEvents=function(enable){if(enable==null){enable=true;}var n,o,ls=this._eventListeners;if(window.nodejs){this._eventListeners=null;}else if(!enable&&ls){for(n in ls){o=ls[n];o.t.removeEventListener(n,o.f,false);}this._eventListeners=null;}else if(enable&&!ls&&this.canvas){var t=window.addEventListener?window:document;var _this=this;ls=this._eventListeners={};ls["mouseup"]={t:t,f:function f(e){_this._handleMouseUp(e);}};ls["mousemove"]={t:t,f:function f(e){_this._handleMouseMove(e);}};ls["dblclick"]={t:this.canvas,f:function f(e){_this._handleDoubleClick(e);}};ls["mousedown"]={t:this.canvas,f:function f(e){_this._handleMouseDown(e);}};for(n in ls){o=ls[n];o.t.addEventListener(n,o.f,false);}}};/**
|
|
127410
127297
|
* Stage instances cannot be cloned.
|
|
127411
127298
|
* @method clone
|
|
127412
127299
|
**/p.clone=function(){throw"Stage cannot be cloned.";};/**
|
|
@@ -257401,57 +257288,12 @@ var DrawDomLevel = /*#__PURE__*/function () {
|
|
|
257401
257288
|
(0,esm_defineProperty/* default */.Z)(this, "_domCanvas", void 0);
|
|
257402
257289
|
(0,esm_defineProperty/* default */.Z)(this, "_hoEditorFactoryID", void 0);
|
|
257403
257290
|
this._hoEditorFactoryID = hoEditorFactoryID;
|
|
257404
|
-
// this._domCanvas = domCanvas;
|
|
257405
257291
|
this._pageIndex = pageIndex;
|
|
257406
257292
|
this._domCanvas = domCanvas;
|
|
257407
|
-
// if (hoeditorfactory.drawTree.paintStatus !== PaintState.psPreview) {
|
|
257408
|
-
// this._domStage = new createjs.StageGL(domCanvas);
|
|
257409
|
-
// (this._domStage as any).setClearColor("#ffffff");
|
|
257410
|
-
// } else {
|
|
257411
|
-
// this._domStage = new createjs.Stage(domCanvas);
|
|
257412
|
-
// }
|
|
257413
257293
|
this._domStage = null;
|
|
257414
257294
|
this._headerTop = 0;
|
|
257415
257295
|
this._mainDocTop = 0;
|
|
257416
257296
|
this._footerTop = 0;
|
|
257417
|
-
// const strHPath = this._drawTree.getHeaderDNodes(drawPage.pageIndex)[1];
|
|
257418
|
-
// HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.getHeaderByPath(strHPath); //
|
|
257419
|
-
// this._drawHeader = new DrawHeader(hoeditorfactory, strHPath);
|
|
257420
|
-
// this._drawHeader.AddPage(drawPage);
|
|
257421
|
-
// const strFPath = this._drawTree.getFooterDNodes(drawPage.pageIndex)[1];
|
|
257422
|
-
// HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.getFooterByPath(strFPath); //
|
|
257423
|
-
// this._drawFooter = new DrawFooter(hoeditorfactory, strFPath);
|
|
257424
|
-
// this._drawFooter.AddPage(drawPage);
|
|
257425
|
-
// const hoeditorfactory = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
257426
|
-
// const dPage = hoeditorfactory.drawTree.drawPages[pageIndex];
|
|
257427
|
-
// this._headerTop = dPage.drawHeader.dTop;
|
|
257428
|
-
// this._mainDocTop = dPage.drawHeader.dTop + dPage.drawHeader.dHeight;
|
|
257429
|
-
// this._footerTop = dPage.drawFooter.dTop;
|
|
257430
|
-
// this._drawMainDoc =
|
|
257431
|
-
// hoeditorfactory.drawPageTree.drawMainDocs[drawPage.pageIndex];
|
|
257432
|
-
// new DrawPageMainDoc(
|
|
257433
|
-
// hoeditorfactory,
|
|
257434
|
-
// gMainPath,
|
|
257435
|
-
// drawPage.pageIndex,
|
|
257436
|
-
// this._mainDocTop
|
|
257437
|
-
// );
|
|
257438
|
-
// this._domStage.addChild(this._drawHeader);
|
|
257439
|
-
// this._drawHeader.x=0;
|
|
257440
|
-
// this._drawHeader.y=HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).pageProperty.topMarginPixes;
|
|
257441
|
-
// this._domStage.addChild(dPage.drawHeader);
|
|
257442
|
-
// dPage.drawHeader.x = hoeditorfactory.pageProperty.leftMarginPixes;
|
|
257443
|
-
// dPage.drawHeader.y = hoeditorfactory.pageProperty.headerYPixes;
|
|
257444
|
-
// // this._domStage.addChildAt(this._drawMainDoc, 0);
|
|
257445
|
-
// dPage.drawMainDoc.x = hoeditorfactory.pageProperty.leftMarginPixes;
|
|
257446
|
-
// dPage.drawMainDoc.y = this._mainDocTop; // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).pageProperty.topMarginPixes +
|
|
257447
|
-
// // HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).pageProperty.headerYPixes;
|
|
257448
|
-
// this._domStage.addChild(dPage.drawFooter);
|
|
257449
|
-
// dPage.drawFooter.x = hoeditorfactory.pageProperty.leftMarginPixes;
|
|
257450
|
-
// dPage.drawFooter.y =
|
|
257451
|
-
// hoeditorfactory.pageProperty.heightPixes -
|
|
257452
|
-
// hoeditorfactory.pageProperty.bottomMarginPixes;
|
|
257453
|
-
// this._domStage.addChild(dPage.drawMainDoc);
|
|
257454
|
-
// this._domStage.update();
|
|
257455
257297
|
}
|
|
257456
257298
|
(0,esm_createClass/* default */.Z)(DrawDomLevel, [{
|
|
257457
257299
|
key: "footerTop",
|
|
@@ -257479,10 +257321,6 @@ var DrawDomLevel = /*#__PURE__*/function () {
|
|
|
257479
257321
|
var hoeditorfactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
257480
257322
|
this._domCanvas.width = hoeditorfactory.pageProperty.canvasParams.width;
|
|
257481
257323
|
this._domCanvas.height = hoeditorfactory.pageProperty.canvasParams.height;
|
|
257482
|
-
// if (hoeditorfactory.drawTree.paintStatus === PaintState.psReview) {
|
|
257483
|
-
// this._domCanvas.width += 100;
|
|
257484
|
-
// }
|
|
257485
|
-
// this._domCanvas.height = hoeditorfactory.pageProperty.heightPixes * DrawConfig.instance().scaleXY;
|
|
257486
257324
|
this._domStage = new createjs.Stage(this._domCanvas);
|
|
257487
257325
|
this._domStage.scaleX = DrawConfig/* DrawConfig.instance */.f.instance().scaleXY;
|
|
257488
257326
|
this._domStage.scaleY = DrawConfig/* DrawConfig.instance */.f.instance().scaleXY;
|
|
@@ -259890,7 +259728,7 @@ var ParagraphNode = __webpack_require__(67945);
|
|
|
259890
259728
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/MarkNode.ts
|
|
259891
259729
|
var MarkNode = __webpack_require__(57727);
|
|
259892
259730
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
259893
|
-
/* harmony default export */ var version = ('3.0.
|
|
259731
|
+
/* harmony default export */ var version = ('3.0.29');
|
|
259894
259732
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
259895
259733
|
var PoperTipText = __webpack_require__(15845);
|
|
259896
259734
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|
|
@@ -265534,7 +265372,7 @@ var StructureConvert = /*#__PURE__*/function () {
|
|
|
265534
265372
|
}
|
|
265535
265373
|
});
|
|
265536
265374
|
|
|
265537
|
-
for (var t =
|
|
265375
|
+
for (var t = tableArr.length - 1; t >= 0; t--) {
|
|
265538
265376
|
// const table=tableArr[t];
|
|
265539
265377
|
tableArr[t].update();
|
|
265540
265378
|
// const dpos = hoEditorFactory.drawTree.getDlineDrawRootLists(
|