hoeditor-web 3.1.92 → 3.1.93
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.umd.js +43 -24
- package/lib/hoeditor.umd.min.js +3 -3
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -33076,6 +33076,8 @@ var assertThisInitialized = __webpack_require__(75808);
|
|
|
33076
33076
|
var get = __webpack_require__(52060);
|
|
33077
33077
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
33078
33078
|
var getPrototypeOf = __webpack_require__(27967);
|
|
33079
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
|
|
33080
|
+
var es_function_name = __webpack_require__(68309);
|
|
33079
33081
|
// EXTERNAL MODULE: ./src/editor/utils/DrawSimpleText.ts
|
|
33080
33082
|
var DrawSimpleText = __webpack_require__(57590);
|
|
33081
33083
|
;// CONCATENATED MODULE: ./src/editor/draw/drawPrint/DrawPrintRecord.ts
|
|
@@ -33087,6 +33089,7 @@ var DrawSimpleText = __webpack_require__(57590);
|
|
|
33087
33089
|
|
|
33088
33090
|
|
|
33089
33091
|
|
|
33092
|
+
|
|
33090
33093
|
/*
|
|
33091
33094
|
* @Author: your name
|
|
33092
33095
|
* @Date: 2021-01-28 10:33:07
|
|
@@ -33133,6 +33136,7 @@ var DrawPrintRecord = /*#__PURE__*/function (_DrawPrintBase) {
|
|
|
33133
33136
|
key: "paintBar",
|
|
33134
33137
|
value: function paintBar(selectContainer) {
|
|
33135
33138
|
if (!this._text) this._text = new DrawSimpleText/* DrawSimpleText */.b("温馨提示,以下内容还没有打印", undefined, "#FF0000");
|
|
33139
|
+
this._text.name = "print_mark";
|
|
33136
33140
|
selectContainer.addChild(this._text);
|
|
33137
33141
|
(0,get/* default */.Z)((0,getPrototypeOf/* default */.Z)(DrawPrintRecord.prototype), "paintBar", this).call(this, selectContainer);
|
|
33138
33142
|
var h = this._text.getMeasuredHeight();
|
|
@@ -33166,8 +33170,6 @@ var es_regexp_sticky = __webpack_require__(88386);
|
|
|
33166
33170
|
var es_regexp_to_string = __webpack_require__(39714);
|
|
33167
33171
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js
|
|
33168
33172
|
var es_error_cause = __webpack_require__(21703);
|
|
33169
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
|
|
33170
|
-
var es_function_name = __webpack_require__(68309);
|
|
33171
33173
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.test.js
|
|
33172
33174
|
var es_regexp_test = __webpack_require__(77601);
|
|
33173
33175
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.fill.js
|
|
@@ -35465,17 +35467,7 @@ var Print = /*#__PURE__*/function () {
|
|
|
35465
35467
|
return _context4.abrupt("break", 42);
|
|
35466
35468
|
case 28:
|
|
35467
35469
|
cpage = hoEditorFactory.drawTree.drawPages[index];
|
|
35468
|
-
children = cpage.drawMainDoc.children;
|
|
35469
|
-
// index === hoEditorFactory.drawTree.drawPages.length - 1 &&
|
|
35470
|
-
// children.length === 2 &&
|
|
35471
|
-
// !(children[0] instanceof DrawPageTable) &&
|
|
35472
|
-
// children[1] &&
|
|
35473
|
-
// (children[1] as any).drawItems.length === 0
|
|
35474
|
-
// ) {
|
|
35475
|
-
// console.log(children, children[0]);
|
|
35476
|
-
// console.log('??????');
|
|
35477
|
-
// break;
|
|
35478
|
-
// }
|
|
35470
|
+
children = cpage.drawMainDoc.children;
|
|
35479
35471
|
if (!(index === hoEditorFactory.drawTree.drawPages.length - 1 && (children.length == 1 && children[0] instanceof DrawLine/* DrawLine */.a && children[0].drawItems.length == 0 || children.length == 2 && !(children[0] instanceof DrawPageTable/* DrawPageTable */.ox) && !(children[0] instanceof DrawLine/* DrawLine */.a) && children[1] && ((_children$1$drawItems = children[1].drawItems) === null || _children$1$drawItems === void 0 ? void 0 : _children$1$drawItems.length) == 0 || children.length == 2 && !(children[0] instanceof DrawPageTable/* DrawPageTable */.ox) && children[0] && ((_children$0$drawItems = children[0].drawItems) === null || _children$0$drawItems === void 0 ? void 0 : _children$0$drawItems.length) == 0))) {
|
|
35480
35472
|
_context4.next = 32;
|
|
35481
35473
|
break;
|
|
@@ -77216,6 +77208,21 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
77216
77208
|
node.imgHeight = nodeImageWidth;
|
|
77217
77209
|
}
|
|
77218
77210
|
var width = hitWidth * hoEditorFactory.signHeight / image.naturalHeight; //+ this._drawText.getMeasuredWidth();
|
|
77211
|
+
// 压缩高分辨率签名图片
|
|
77212
|
+
if (hoEditorFactory.convertSignImage && hitHeight > hoEditorFactory.signHeight * 2) {
|
|
77213
|
+
var canvas = document.createElement('canvas');
|
|
77214
|
+
var ctx = canvas.getContext('2d');
|
|
77215
|
+
canvas.width = width * 2;
|
|
77216
|
+
canvas.height = hoEditorFactory.signHeight * 2;
|
|
77217
|
+
canvas.style.width = _this3.dWidth + 'px';
|
|
77218
|
+
canvas.style.height = hoEditorFactory.signHeight + 'px';
|
|
77219
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
77220
|
+
ctx.fillStyle = '#FFFFFF';
|
|
77221
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
77222
|
+
ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
|
|
77223
|
+
var base64 = canvas.toDataURL('image/png', 1);
|
|
77224
|
+
drawNode.node.imgSrc = base64;
|
|
77225
|
+
}
|
|
77219
77226
|
if (node.parentNode instanceof _editor_dom_treeNode_CellNode__WEBPACK_IMPORTED_MODULE_9__/* .CellNode */ .D) {
|
|
77220
77227
|
var cellWidth = node.parentNode.drawCell.dWidth;
|
|
77221
77228
|
if (width > cellWidth - 5) {
|
|
@@ -79742,7 +79749,10 @@ var DrawStyleText = /*#__PURE__*/function () {
|
|
|
79742
79749
|
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
79743
79750
|
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(40561);
|
|
79744
79751
|
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
79745
|
-
/* harmony import */ var
|
|
79752
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(68309);
|
|
79753
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
79754
|
+
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(74089);
|
|
79755
|
+
|
|
79746
79756
|
|
|
79747
79757
|
|
|
79748
79758
|
|
|
@@ -79812,7 +79822,7 @@ var DrawPrintBase = /*#__PURE__*/function () {
|
|
|
79812
79822
|
key: "clear",
|
|
79813
79823
|
value: function clear() {
|
|
79814
79824
|
var _this = this;
|
|
79815
|
-
var hoEditorFactory =
|
|
79825
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_9__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
79816
79826
|
var pages = hoEditorFactory.drawTree.drawPages;
|
|
79817
79827
|
try {
|
|
79818
79828
|
this._fg.forEach(function (value, index) {
|
|
@@ -79835,7 +79845,7 @@ var DrawPrintBase = /*#__PURE__*/function () {
|
|
|
79835
79845
|
key: "paintArea",
|
|
79836
79846
|
value: function paintArea() {
|
|
79837
79847
|
var _this2 = this;
|
|
79838
|
-
var hoEditorFactory =
|
|
79848
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_9__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
79839
79849
|
var _hasPainted = function _hasPainted(selectContainer, index) {
|
|
79840
79850
|
if (index <= _this2._fg.length - 1) {
|
|
79841
79851
|
// console.log("index", selectContainer.children.indexOf(this._fg[index]));
|
|
@@ -79911,7 +79921,7 @@ var DrawPrintBase = /*#__PURE__*/function () {
|
|
|
79911
79921
|
value: function paintBar(selectContainer) {
|
|
79912
79922
|
if (!this._bar) this._bar = new createjs.Shape();
|
|
79913
79923
|
this._bar.graphics.clear();
|
|
79914
|
-
this._bar.graphics.beginFill(this._barColor).drawRect(0, this._rangePosy,
|
|
79924
|
+
this._bar.graphics.beginFill(this._barColor).drawRect(0, this._rangePosy, _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_9__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID).pageProperty.widthPixes, 1).closePath();
|
|
79915
79925
|
selectContainer.addChild(this._bar);
|
|
79916
79926
|
}
|
|
79917
79927
|
/**
|
|
@@ -79924,8 +79934,9 @@ var DrawPrintBase = /*#__PURE__*/function () {
|
|
|
79924
79934
|
value: function paintFront(selectContainer, height, pindex) {
|
|
79925
79935
|
var fg = new createjs.Shape();
|
|
79926
79936
|
fg.graphics.clear();
|
|
79927
|
-
fg.graphics.beginFill(this._frontColor).drawRect(0, 0,
|
|
79937
|
+
fg.graphics.beginFill(this._frontColor).drawRect(0, 0, _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_9__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID).pageProperty.widthPixes, height).closePath();
|
|
79928
79938
|
fg.alpha = 0.5;
|
|
79939
|
+
fg.name = "print_mark";
|
|
79929
79940
|
this._fg.splice(pindex, 0, fg);
|
|
79930
79941
|
selectContainer.addChild(fg);
|
|
79931
79942
|
}
|
|
@@ -79937,7 +79948,7 @@ var DrawPrintBase = /*#__PURE__*/function () {
|
|
|
79937
79948
|
value: function paintMask() {
|
|
79938
79949
|
if (!this.mask) this.mask = new createjs.Shape();
|
|
79939
79950
|
this.clear();
|
|
79940
|
-
var hoEditorFactory =
|
|
79951
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_9__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
79941
79952
|
var dPage = hoEditorFactory.drawTree.drawPages[this.Position[0]];
|
|
79942
79953
|
var domlevel = hoEditorFactory.drawTree.drawPages[this.Position[0]].drawDomLevel;
|
|
79943
79954
|
if (!domlevel) return;
|
|
@@ -79962,7 +79973,7 @@ var DrawPrintBase = /*#__PURE__*/function () {
|
|
|
79962
79973
|
key: "clearMask",
|
|
79963
79974
|
value: function clearMask() {
|
|
79964
79975
|
this.clear();
|
|
79965
|
-
var hoEditorFactory =
|
|
79976
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_9__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
79966
79977
|
var domlevel = hoEditorFactory.drawTree.drawPages[this.Position[0]].drawDomLevel;
|
|
79967
79978
|
var dPage = hoEditorFactory.drawTree.drawPages[this.Position[0]];
|
|
79968
79979
|
if (!domlevel) return;
|
|
@@ -79986,7 +79997,7 @@ var DrawPrintBase = /*#__PURE__*/function () {
|
|
|
79986
79997
|
key: "preparePrint",
|
|
79987
79998
|
value: function preparePrint() {
|
|
79988
79999
|
this.clear();
|
|
79989
|
-
var hoEditorFactory =
|
|
80000
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_9__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
79990
80001
|
var dPage = hoEditorFactory.drawTree.drawPages[this._pageindex];
|
|
79991
80002
|
var domlevel = hoEditorFactory.drawTree.drawPages[this._pageindex].drawDomLevel;
|
|
79992
80003
|
if (!domlevel) return;
|
|
@@ -207322,7 +207333,7 @@ var TextNode = __webpack_require__(27198);
|
|
|
207322
207333
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
207323
207334
|
var ParagraphNode = __webpack_require__(67945);
|
|
207324
207335
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
207325
|
-
/* harmony default export */ var version = ('3.1.
|
|
207336
|
+
/* harmony default export */ var version = ('3.1.93');
|
|
207326
207337
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
207327
207338
|
var PoperTipText = __webpack_require__(50987);
|
|
207328
207339
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|
|
@@ -234372,7 +234383,13 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
234372
234383
|
if (dPage.drawSelectLevel && !dPage.drawSelectLevel.stage) {
|
|
234373
234384
|
dPage.drawSelectLevel.bindStage();
|
|
234374
234385
|
}
|
|
234375
|
-
dPage.selectContainer.children
|
|
234386
|
+
if (dPage.selectContainer.children.length) {
|
|
234387
|
+
dPage.selectContainer.children.forEach(function (child) {
|
|
234388
|
+
if (child.name == 'print_mark') {
|
|
234389
|
+
dPage.selectContainer.removeChild(child);
|
|
234390
|
+
}
|
|
234391
|
+
});
|
|
234392
|
+
}
|
|
234376
234393
|
(_dPage$selectContaine = dPage.selectContainer.stage) === null || _dPage$selectContaine === void 0 ? void 0 : _dPage$selectContaine.update();
|
|
234377
234394
|
});
|
|
234378
234395
|
hoEditorFactory.vueController.rebuildAll(true);
|
|
@@ -236128,12 +236145,14 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
236128
236145
|
(0,esm_defineProperty/* default */.Z)(this, "_allowUncheckRadio", false);
|
|
236129
236146
|
//允许直接取消勾选单选控件(默认不允许)
|
|
236130
236147
|
(0,esm_defineProperty/* default */.Z)(this, "_insHtmlWithColor", true);
|
|
236148
|
+
//插入检查检验文本带颜色(默认带颜色)
|
|
236149
|
+
(0,esm_defineProperty/* default */.Z)(this, "convertSignImage", false);
|
|
236131
236150
|
this._hoEditorFactoryId = id;
|
|
236132
236151
|
}
|
|
236133
236152
|
(0,esm_createClass/* default */.Z)(HOEditorFactory, [{
|
|
236134
236153
|
key: "hoLocalStorage",
|
|
236135
236154
|
get:
|
|
236136
|
-
|
|
236155
|
+
// 处理签名图片,减小其分辨率大小,提高打印时图片处理速度
|
|
236137
236156
|
/**
|
|
236138
236157
|
* Getter hoLocalStorage
|
|
236139
236158
|
* @return {HoLocalStorage}
|