hoeditor-web 3.1.28 → 3.1.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.umd.js +86 -32
- package/lib/hoeditor.umd.min.js +3 -3
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -43625,6 +43625,24 @@ var DocController = /*#__PURE__*/function () {
|
|
|
43625
43625
|
node.imgSrc = imgSrc;
|
|
43626
43626
|
hoEditorFactory.docTree.change(changeEvent);
|
|
43627
43627
|
}
|
|
43628
|
+
/**
|
|
43629
|
+
* 更新签名自定义属性
|
|
43630
|
+
* @param node 签名节点
|
|
43631
|
+
* @param customProperty 自定义属性
|
|
43632
|
+
*/
|
|
43633
|
+
}, {
|
|
43634
|
+
key: "updateSignCustomProp",
|
|
43635
|
+
value: function updateSignCustomProp(node, customProperty) {
|
|
43636
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_78__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
43637
|
+
var sPath = hoEditorFactory.docTree.getNodeLastPath(node.previousLeaf());
|
|
43638
|
+
var ePath = hoEditorFactory.docTree.getNodeLastPath(node);
|
|
43639
|
+
var changeEvent = new _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_76__/* .NodeChangeEvent */ .G(this._hoEditorFactoryID, _DocTree__WEBPACK_IMPORTED_MODULE_27__/* .DocAction */ .gk.daModifyStyle, sPath, ePath);
|
|
43640
|
+
changeEvent.oldEndPath = ePath;
|
|
43641
|
+
changeEvent.afterChangePath = ePath;
|
|
43642
|
+
changeEvent.oldDrawLines = new _draw_SelectRange__WEBPACK_IMPORTED_MODULE_77__/* .SelectRange */ .E(this._hoEditorFactoryID).getRangeDrawLines(sPath, ePath, true);
|
|
43643
|
+
node.customProperty = customProperty;
|
|
43644
|
+
hoEditorFactory.docTree.change(changeEvent);
|
|
43645
|
+
}
|
|
43628
43646
|
/**
|
|
43629
43647
|
*
|
|
43630
43648
|
* @returns 返回病历文件变更日志
|
|
@@ -106035,7 +106053,7 @@ Context2D.prototype.arcTo=function(x1,y1,x2,y2,radius){throw new Error("arcTo no
|
|
|
106035
106053
|
var scale=this.ctx.transform.scaleX;var acharSpace=this.letterSpacing?parseFloat(this.letterSpacing):0.0;//自定义修改 以处理宋体粗体
|
|
106036
106054
|
if(this.font.indexOf("SimSun")>=0&&this.font.indexOf("bold")>=0){//renderingMode: "stroke",
|
|
106037
106055
|
putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign,maxWidth:maxWidth,// renderingMode: "fillThenStroke",
|
|
106038
|
-
charSpace:acharSpace});}else{putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace});}};/**
|
|
106056
|
+
charSpace:acharSpace+1});}else{putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace});}};/**
|
|
106039
106057
|
* Draws text on the canvas (no fill)
|
|
106040
106058
|
*
|
|
106041
106059
|
* @name strokeText
|
|
@@ -106046,7 +106064,7 @@ charSpace:acharSpace});}else{putText.call(this,{text:text,x:x,y:y,scale:scale,an
|
|
|
106046
106064
|
* @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
|
|
106047
106065
|
* @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.
|
|
106048
106066
|
*/Context2D.prototype.strokeText=function(text,x,y,maxWidth){if(isNaN(x)||isNaN(y)||typeof text!=="string"){console.error("jsPDF.context2d.strokeText: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.strokeText");}if(isStrokeTransparent.call(this)){return;}maxWidth=isNaN(maxWidth)?undefined:maxWidth;var degs=rad2deg(this.ctx.transform.rotation);var scale=this.ctx.transform.scaleX;var acharSpace=this.letterSpacing?this.letterSpacing:0;// 自定义修改
|
|
106049
|
-
putText.call(this,{text:text,x:x,y:y,scale:scale,renderingMode:"stroke",angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace// 自定义修改
|
|
106067
|
+
putText.call(this,{text:text,x:x,y:y,scale:scale,renderingMode:"stroke",angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace+1// 自定义修改
|
|
106050
106068
|
});};/**
|
|
106051
106069
|
* Returns an object that contains the width of the specified text
|
|
106052
106070
|
*
|
|
@@ -214878,8 +214896,8 @@ var es_string_match = __webpack_require__(4723);
|
|
|
214878
214896
|
var es_number_constructor = __webpack_require__(9653);
|
|
214879
214897
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.json.stringify.js
|
|
214880
214898
|
var es_json_stringify = __webpack_require__(38862);
|
|
214881
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDoc.vue?vue&type=template&id=
|
|
214882
|
-
var
|
|
214899
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDoc.vue?vue&type=template&id=388ed640&
|
|
214900
|
+
var HoDocvue_type_template_id_388ed640_render = function render() {
|
|
214883
214901
|
var _vm = this,
|
|
214884
214902
|
_c = _vm._self._c;
|
|
214885
214903
|
return _c('div', {
|
|
@@ -215035,7 +215053,7 @@ var HoDocvue_type_template_id_5c4a2104_render = function render() {
|
|
|
215035
215053
|
}
|
|
215036
215054
|
}, [_vm._v("v " + _vm._s(_vm.version))])])])], 1);
|
|
215037
215055
|
};
|
|
215038
|
-
var
|
|
215056
|
+
var HoDocvue_type_template_id_388ed640_staticRenderFns = [];
|
|
215039
215057
|
|
|
215040
215058
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
|
|
215041
215059
|
var es_array_filter = __webpack_require__(57327);
|
|
@@ -218040,7 +218058,7 @@ var TextNode = __webpack_require__(27198);
|
|
|
218040
218058
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
218041
218059
|
var ParagraphNode = __webpack_require__(67945);
|
|
218042
218060
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
218043
|
-
/* harmony default export */ var version = ('3.1.
|
|
218061
|
+
/* harmony default export */ var version = ('3.1.29');
|
|
218044
218062
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
218045
218063
|
var PoperTipText = __webpack_require__(50987);
|
|
218046
218064
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|
|
@@ -218713,10 +218731,11 @@ var defaultHeight = Math.floor(1122 * scaleXY) % 2 === 1 ? Math.floor(1122 * sca
|
|
|
218713
218731
|
var nodePos = node.drawNodes[0];
|
|
218714
218732
|
var drawLine = hoEditorFactory.drawTree.getDrawLineByDNode(nodePos);
|
|
218715
218733
|
var docPos = drawLine.localToGlobal(nodePos.x, nodePos.y === 0 ? drawLine.dHeight : nodePos.y);
|
|
218734
|
+
var scaleXY = Math.max(DrawConfig/* DrawConfig */.f.instance().scaleXY, DrawConfig/* DrawConfig */.f.instance().transformScale);
|
|
218716
218735
|
this.poperPos = {
|
|
218717
|
-
x: docPos.x /
|
|
218736
|
+
x: docPos.x / scaleXY,
|
|
218718
218737
|
// 目标元素所在行的 x
|
|
218719
|
-
y: docPos.y /
|
|
218738
|
+
y: docPos.y / scaleXY + 5,
|
|
218720
218739
|
// 目标元素所在行的 y
|
|
218721
218740
|
width: nodePos.dWidth ? nodePos.dWidth : 0,
|
|
218722
218741
|
height: drawLine.dHeight,
|
|
@@ -218810,10 +218829,10 @@ var defaultHeight = Math.floor(1122 * scaleXY) % 2 === 1 ? Math.floor(1122 * sca
|
|
|
218810
218829
|
});
|
|
218811
218830
|
;// CONCATENATED MODULE: ./src/components/HoDoc.vue?vue&type=script&lang=js&
|
|
218812
218831
|
/* harmony default export */ var components_HoDocvue_type_script_lang_js_ = (HoDocvue_type_script_lang_js_);
|
|
218813
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDoc.vue?vue&type=style&index=0&id=
|
|
218832
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDoc.vue?vue&type=style&index=0&id=388ed640&prod&lang=less&
|
|
218814
218833
|
// extracted by mini-css-extract-plugin
|
|
218815
218834
|
|
|
218816
|
-
;// CONCATENATED MODULE: ./src/components/HoDoc.vue?vue&type=style&index=0&id=
|
|
218835
|
+
;// CONCATENATED MODULE: ./src/components/HoDoc.vue?vue&type=style&index=0&id=388ed640&prod&lang=less&
|
|
218817
218836
|
|
|
218818
218837
|
;// CONCATENATED MODULE: ./src/components/HoDoc.vue
|
|
218819
218838
|
|
|
@@ -218826,8 +218845,8 @@ var defaultHeight = Math.floor(1122 * scaleXY) % 2 === 1 ? Math.floor(1122 * sca
|
|
|
218826
218845
|
|
|
218827
218846
|
var HoDoc_component = (0,componentNormalizer/* default */.Z)(
|
|
218828
218847
|
components_HoDocvue_type_script_lang_js_,
|
|
218829
|
-
|
|
218830
|
-
|
|
218848
|
+
HoDocvue_type_template_id_388ed640_render,
|
|
218849
|
+
HoDocvue_type_template_id_388ed640_staticRenderFns,
|
|
218831
218850
|
false,
|
|
218832
218851
|
null,
|
|
218833
218852
|
null,
|
|
@@ -229662,6 +229681,17 @@ var VueController = /*#__PURE__*/function () {
|
|
|
229662
229681
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
229663
229682
|
hoEditorFactory.docController.updateSignType(node, type, imgSrc, imgWidth, imgHeight);
|
|
229664
229683
|
}
|
|
229684
|
+
/**
|
|
229685
|
+
* 更新签名自定义属性
|
|
229686
|
+
* @param node 签名节点
|
|
229687
|
+
* @param customProperty 自定义属性
|
|
229688
|
+
*/
|
|
229689
|
+
}, {
|
|
229690
|
+
key: "updateSignCustomProp",
|
|
229691
|
+
value: function updateSignCustomProp(node, customProperty) {
|
|
229692
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
229693
|
+
hoEditorFactory.docController.updateSignCustomProp(node, customProperty);
|
|
229694
|
+
}
|
|
229665
229695
|
/**
|
|
229666
229696
|
* 强制删除
|
|
229667
229697
|
*/
|
|
@@ -230552,19 +230582,43 @@ var VueController = /*#__PURE__*/function () {
|
|
|
230552
230582
|
}()
|
|
230553
230583
|
}, {
|
|
230554
230584
|
key: "isSetFontFamily",
|
|
230555
|
-
value: function
|
|
230556
|
-
var
|
|
230557
|
-
|
|
230558
|
-
|
|
230559
|
-
|
|
230560
|
-
|
|
230561
|
-
|
|
230585
|
+
value: function () {
|
|
230586
|
+
var _isSetFontFamily = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee10(callback) {
|
|
230587
|
+
var hoEditorFactory, font;
|
|
230588
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee10$(_context11) {
|
|
230589
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
230590
|
+
case 0:
|
|
230591
|
+
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
230592
|
+
if (hoEditorFactory.printController.isSetFont) {
|
|
230593
|
+
_context11.next = 8;
|
|
230594
|
+
break;
|
|
230595
|
+
}
|
|
230596
|
+
_context11.next = 4;
|
|
230597
|
+
return hoEditorFactory.vueController.hoLocalStorage().loadFontString();
|
|
230598
|
+
case 4:
|
|
230599
|
+
font = _context11.sent;
|
|
230600
|
+
if (font) {
|
|
230601
|
+
hoEditorFactory.printController.setjsPDFFonts(font);
|
|
230602
|
+
callback && callback();
|
|
230603
|
+
setTimeout(function () {
|
|
230604
|
+
font = '';
|
|
230605
|
+
}, 0);
|
|
230606
|
+
}
|
|
230607
|
+
_context11.next = 9;
|
|
230608
|
+
break;
|
|
230609
|
+
case 8:
|
|
230610
|
+
callback && callback();
|
|
230611
|
+
case 9:
|
|
230612
|
+
case "end":
|
|
230613
|
+
return _context11.stop();
|
|
230562
230614
|
}
|
|
230563
|
-
});
|
|
230564
|
-
}
|
|
230565
|
-
|
|
230615
|
+
}, _callee10, this);
|
|
230616
|
+
}));
|
|
230617
|
+
function isSetFontFamily(_x25) {
|
|
230618
|
+
return _isSetFontFamily.apply(this, arguments);
|
|
230566
230619
|
}
|
|
230567
|
-
|
|
230620
|
+
return isSetFontFamily;
|
|
230621
|
+
}()
|
|
230568
230622
|
/**
|
|
230569
230623
|
* 患者签名插入和更新
|
|
230570
230624
|
*/
|
|
@@ -231702,7 +231756,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231702
231756
|
isTemplate: node.isTemplate,
|
|
231703
231757
|
number: node.number,
|
|
231704
231758
|
isVerify: node.otherProperties && node.otherProperties.isVerify ? true : false,
|
|
231705
|
-
customProperty:
|
|
231759
|
+
customProperty: node.customProperty,
|
|
231706
231760
|
previousText: '',
|
|
231707
231761
|
dataId: node.dataId,
|
|
231708
231762
|
name: node.name
|
|
@@ -232946,10 +233000,10 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232946
233000
|
}, {
|
|
232947
233001
|
key: "importWordFile",
|
|
232948
233002
|
value: function () {
|
|
232949
|
-
var _importWordFile = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function
|
|
233003
|
+
var _importWordFile = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee11(fileStr) {
|
|
232950
233004
|
var hoEditorFactory, _curDomRange, startPath, endPath, changingEvent, nodes;
|
|
232951
|
-
return (0,regeneratorRuntime/* default */.Z)().wrap(function
|
|
232952
|
-
while (1) switch (
|
|
233005
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee11$(_context12) {
|
|
233006
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
232953
233007
|
case 0:
|
|
232954
233008
|
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
232955
233009
|
hoEditorFactory.isThrowError = false;
|
|
@@ -232958,10 +233012,10 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232958
233012
|
endPath = _curDomRange.normalize().endPath;
|
|
232959
233013
|
changingEvent = new NodeChangingEvent/* NodeChangingEvent */.Q(DocTree/* DocAction */.gk.daInsert, startPath, endPath, NodeChangingEvent/* OperType */.y.openLocalFiles);
|
|
232960
233014
|
if (!hoEditorFactory.docTree.changing(changingEvent)) {
|
|
232961
|
-
|
|
233015
|
+
_context12.next = 14;
|
|
232962
233016
|
break;
|
|
232963
233017
|
}
|
|
232964
|
-
|
|
233018
|
+
_context12.next = 9;
|
|
232965
233019
|
return hoEditorFactory.docController.initBlankDoc();
|
|
232966
233020
|
case 9:
|
|
232967
233021
|
hoEditorFactory.drawTree.inViewPages = [0];
|
|
@@ -232973,11 +233027,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232973
233027
|
hoEditorFactory.undoService.stack = [];
|
|
232974
233028
|
case 15:
|
|
232975
233029
|
case "end":
|
|
232976
|
-
return
|
|
233030
|
+
return _context12.stop();
|
|
232977
233031
|
}
|
|
232978
|
-
},
|
|
233032
|
+
}, _callee11, this);
|
|
232979
233033
|
}));
|
|
232980
|
-
function importWordFile(
|
|
233034
|
+
function importWordFile(_x26) {
|
|
232981
233035
|
return _importWordFile.apply(this, arguments);
|
|
232982
233036
|
}
|
|
232983
233037
|
return importWordFile;
|