hoeditor-web 3.0.87 → 3.0.89
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 +42 -22
- package/lib/hoeditor.umd.min.js +5 -5
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -16713,7 +16713,7 @@ var component = (0,componentNormalizer/* default */.Z)(
|
|
|
16713
16713
|
|
|
16714
16714
|
/***/ }),
|
|
16715
16715
|
|
|
16716
|
-
/***/
|
|
16716
|
+
/***/ 47585:
|
|
16717
16717
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
16718
16718
|
|
|
16719
16719
|
"use strict";
|
|
@@ -16729,7 +16729,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
16729
16729
|
var es_array_includes = __webpack_require__(26699);
|
|
16730
16730
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
|
|
16731
16731
|
var es_string_includes = __webpack_require__(32023);
|
|
16732
|
-
;// 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/controls/table/TableCellProperty.vue?vue&type=template&id=
|
|
16732
|
+
;// 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/controls/table/TableCellProperty.vue?vue&type=template&id=9af121a8&
|
|
16733
16733
|
|
|
16734
16734
|
|
|
16735
16735
|
var render = function render() {
|
|
@@ -17563,7 +17563,7 @@ var render = function render() {
|
|
|
17563
17563
|
};
|
|
17564
17564
|
var staticRenderFns = [];
|
|
17565
17565
|
|
|
17566
|
-
;// CONCATENATED MODULE: ./src/components/controls/table/TableCellProperty.vue?vue&type=template&id=
|
|
17566
|
+
;// CONCATENATED MODULE: ./src/components/controls/table/TableCellProperty.vue?vue&type=template&id=9af121a8&
|
|
17567
17567
|
|
|
17568
17568
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules
|
|
17569
17569
|
var slicedToArray = __webpack_require__(27222);
|
|
@@ -17801,6 +17801,9 @@ var columns = [{
|
|
|
17801
17801
|
},
|
|
17802
17802
|
methods: {
|
|
17803
17803
|
isDrawGridlinesChange: function isDrawGridlinesChange() {
|
|
17804
|
+
if (!this.isDrawGridlines) {
|
|
17805
|
+
this.gridLineDisplay = [false, false, false, false];
|
|
17806
|
+
}
|
|
17804
17807
|
// if (!this.isDrawGridlines) {
|
|
17805
17808
|
// this.printGridLines = false;
|
|
17806
17809
|
// }
|
|
@@ -17961,10 +17964,10 @@ var columns = [{
|
|
|
17961
17964
|
});
|
|
17962
17965
|
;// CONCATENATED MODULE: ./src/components/controls/table/TableCellProperty.vue?vue&type=script&lang=js&
|
|
17963
17966
|
/* harmony default export */ var table_TableCellPropertyvue_type_script_lang_js_ = (TableCellPropertyvue_type_script_lang_js_);
|
|
17964
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/table/TableCellProperty.vue?vue&type=style&index=0&id=
|
|
17967
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/table/TableCellProperty.vue?vue&type=style&index=0&id=9af121a8&prod&lang=scss&
|
|
17965
17968
|
// extracted by mini-css-extract-plugin
|
|
17966
17969
|
|
|
17967
|
-
;// CONCATENATED MODULE: ./src/components/controls/table/TableCellProperty.vue?vue&type=style&index=0&id=
|
|
17970
|
+
;// CONCATENATED MODULE: ./src/components/controls/table/TableCellProperty.vue?vue&type=style&index=0&id=9af121a8&prod&lang=scss&
|
|
17968
17971
|
|
|
17969
17972
|
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
17970
17973
|
var componentNormalizer = __webpack_require__(70713);
|
|
@@ -75236,6 +75239,9 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
75236
75239
|
}, {
|
|
75237
75240
|
key: "paintCellBorders",
|
|
75238
75241
|
value: function paintCellBorders(newHeight, r, c) {
|
|
75242
|
+
if (!this._cell.cellProperty.isDrawGridlines) {
|
|
75243
|
+
this._cell.cellProperty.gridLineDisplay = [false, false, false, false];
|
|
75244
|
+
}
|
|
75239
75245
|
if (this._cell.cellProperty.isDrawGridlines) {
|
|
75240
75246
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
75241
75247
|
var x = 0.5;
|
|
@@ -75260,7 +75266,11 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
75260
75266
|
if (printGridLines || !printGridLines && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPreview */.Dh.psPreview && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPrint */.Dh.psPrint) {
|
|
75261
75267
|
if (gridLineDisplay[0]) {
|
|
75262
75268
|
//上边框
|
|
75263
|
-
|
|
75269
|
+
var topCell = null;
|
|
75270
|
+
if (r > 0) {
|
|
75271
|
+
topCell = this._cell.table.getMainCell(r - 1, c)[0];
|
|
75272
|
+
}
|
|
75273
|
+
if (r == 0 || this.dTop == 0 || r > 0 && topCell && !topCell.cellProperty.gridLineDisplay[1]) {
|
|
75264
75274
|
this._topLine.name = "topLine";
|
|
75265
75275
|
this._topLine.graphics.beginStroke(gridLinesColor[0]);
|
|
75266
75276
|
if (printGridLines && this.cell.cellProperty.gridLinesStyle !== TableProperty/* GridLinesStyle.solid */.he.solid || !printGridLines && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPreview */.Dh.psPreview && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPrint */.Dh.psPrint) {
|
|
@@ -75276,8 +75286,8 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
75276
75286
|
}
|
|
75277
75287
|
} else {
|
|
75278
75288
|
if (r > 0) {
|
|
75279
|
-
var
|
|
75280
|
-
var drawPageCells =
|
|
75289
|
+
var _topCell = this._cell.table.getMainCell(r - 1, c)[0];
|
|
75290
|
+
var drawPageCells = _topCell.drawCell.drawPageCells;
|
|
75281
75291
|
if (drawPageCells.length > 0) {
|
|
75282
75292
|
for (var i = 0; i < drawPageCells[drawPageCells.length - 1].children.length; i++) {
|
|
75283
75293
|
var child = drawPageCells[drawPageCells.length - 1].children[i];
|
|
@@ -75318,7 +75328,11 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
75318
75328
|
}
|
|
75319
75329
|
if (gridLineDisplay[2]) {
|
|
75320
75330
|
//左边框
|
|
75321
|
-
|
|
75331
|
+
var leftCell = null;
|
|
75332
|
+
if (c > 0) {
|
|
75333
|
+
leftCell = this._cell.table.getMainCell(r, c - 1)[0];
|
|
75334
|
+
}
|
|
75335
|
+
if (c == 0 || c > 0 && leftCell && !leftCell.cellProperty.gridLineDisplay[3]) {
|
|
75322
75336
|
this._leftLine.name = "leftLine";
|
|
75323
75337
|
this._leftLine.graphics.beginStroke(gridLinesColor[2]);
|
|
75324
75338
|
if (printGridLines && this.cell.cellProperty.gridLinesStyle !== TableProperty/* GridLinesStyle.solid */.he.solid || !printGridLines && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPreview */.Dh.psPreview && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPrint */.Dh.psPrint) {
|
|
@@ -75334,8 +75348,8 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
75334
75348
|
}
|
|
75335
75349
|
} else {
|
|
75336
75350
|
if (c > 0) {
|
|
75337
|
-
var
|
|
75338
|
-
var _drawPageCells2 =
|
|
75351
|
+
var _leftCell = this._cell.table.getMainCell(r, c - 1)[0];
|
|
75352
|
+
var _drawPageCells2 = _leftCell.drawCell.drawPageCells;
|
|
75339
75353
|
if (_drawPageCells2.length > 0) {
|
|
75340
75354
|
for (var _i2 = 0; _i2 < _drawPageCells2.length; _i2++) {
|
|
75341
75355
|
var children = _drawPageCells2[_i2].children;
|
|
@@ -78648,9 +78662,7 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
78648
78662
|
}
|
|
78649
78663
|
hoEditorFactory.loadImageCount--;
|
|
78650
78664
|
};
|
|
78651
|
-
if (_this3.imgSrc.includes("data:image/") || _this3.imgSrc.includes(".
|
|
78652
|
-
handleOrientation();
|
|
78653
|
-
} else {
|
|
78665
|
+
if (_this3.imgSrc.includes("data:image/jpeg") || _this3.imgSrc.includes("data:image/jpg") || _this3.imgSrc.includes(".jpg") || _this3.imgSrc.includes(".jpeg")) {
|
|
78654
78666
|
if (!_this3._exif) {
|
|
78655
78667
|
_this3._exif = __webpack_require__(29794);
|
|
78656
78668
|
}
|
|
@@ -78660,6 +78672,8 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
78660
78672
|
handleOrientation();
|
|
78661
78673
|
});
|
|
78662
78674
|
}
|
|
78675
|
+
} else {
|
|
78676
|
+
handleOrientation();
|
|
78663
78677
|
}
|
|
78664
78678
|
};
|
|
78665
78679
|
image.onerror = function () {
|
|
@@ -99350,10 +99364,14 @@ if(image.colorSpace===color_spaces.INDEXED){var objId=this.internal.newObject();
|
|
|
99350
99364
|
putStream({data:arrayBufferToBinaryString(new Uint8Array(image.palette)),objectId:objId});out("endobj");}};var putResourcesCallback=function putResourcesCallback(){var images=this.internal.collections[namespace+"images"];for(var i in images){putImage.call(this,images[i]);}};var putXObjectsDictCallback=function putXObjectsDictCallback(){var images=this.internal.collections[namespace+"images"],out=this.internal.write,image;for(var i in images){image=images[i];out("/I"+image.index,image.objectId,"0","R");}};var checkCompressValue=function checkCompressValue(value){if(value&&typeof value==="string")value=value.toUpperCase();return value in jsPDFAPI.image_compression?value:image_compression.NONE;};var initialize=function initialize(){if(!this.internal.collections[namespace+"images"]){this.internal.collections[namespace+"images"]={};this.internal.events.subscribe("putResources",putResourcesCallback);this.internal.events.subscribe("putXobjectDict",putXObjectsDictCallback);}};var getImages=function getImages(){var images=this.internal.collections[namespace+"images"];initialize.call(this);return images;};var getImageIndex=function getImageIndex(){return Object.keys(this.internal.collections[namespace+"images"]).length;};var notDefined=function notDefined(value){return typeof value==="undefined"||value===null||value.length===0;};var generateAliasFromImageData=function generateAliasFromImageData(imageData){if(typeof imageData==="string"||isArrayBufferView(imageData)){return sHashCode(imageData);}else if(isArrayBufferView(imageData.data)){return sHashCode(imageData.data);}return null;};var isImageTypeSupported=function isImageTypeSupported(type){return typeof jsPDFAPI["process"+type.toUpperCase()]==="function";};var isDOMElement=function isDOMElement(object){return (0,esm_typeof/* default */.Z)(object)==="object"&&object.nodeType===1;};var getImageDataFromElement=function getImageDataFromElement(element,format){//if element is an image which uses data url definition, just return the dataurl
|
|
99351
99365
|
if(element.nodeName==="IMG"&&element.hasAttribute("src")){var src=""+element.getAttribute("src");//is base64 encoded dataUrl, directly process it
|
|
99352
99366
|
if(src.indexOf("data:image/")===0){return atob(unescape(src).split("base64,").pop());}//it is probably an url, try to load it
|
|
99353
|
-
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;console.log(image.exifdata,'----------------------');if(image.exifdata&&image.exifdata.Orientation){rotation={6:270,8:90
|
|
99367
|
+
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;console.log(image.exifdata,'----------------------');if(image.exifdata&&image.exifdata.Orientation){rotation={6:270,8:90,// 5: 180,
|
|
99368
|
+
// 7: 180,
|
|
99369
|
+
2:270,4:90// 1: 180,
|
|
99370
|
+
// 3: 180
|
|
99371
|
+
}[image.exifdata.Orientation];}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
|
|
99354
99372
|
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
|
|
99355
99373
|
if(rotation){if(image.exifdata&&image.exifdata.Orientation){if(image.exifdata.Orientation==8||image.exifdata.Orientation==4){x+=height;y-=width-10;}else if(image.exifdata.Orientation==6||image.exifdata.Orientation==2){y-=width-10;}}else{// 自定义修改 修复图片旋转后位置错误问题 水平方向增加自身宽度 减去的 18px 来源未知 垂直方向减去自身高度
|
|
99356
|
-
x+=Number(coord(width))+20;y-=height;}console.log(width,height,
|
|
99374
|
+
x+=Number(coord(width))+20;y-=height;}console.log(coord(width),vcoord(width),coord(height),vcoord(height));this.internal.write([1,"0","0",1,coord(x),vcoord(y+height),"cm"].join(" "));//Translate
|
|
99357
99375
|
this.internal.write(rotationTransformationMatrix.join(" "));//Rotate
|
|
99358
99376
|
this.internal.write([coord(width),"0","0",coord(height),"0","0","cm"].join(" "));//Scale
|
|
99359
99377
|
}else{this.internal.write([coord(width),"0","0",coord(height),coord(x),vcoord(y+height),"cm"].join(" "));//Translate and Scale
|
|
@@ -99920,7 +99938,8 @@ var f2,getHorizontalCoordinateString,getVerticalCoordinateString,getHorizontalCo
|
|
|
99920
99938
|
* A pattern object to use to fill the drawing (not supported by context2d)
|
|
99921
99939
|
*/Object.defineProperty(this,"fillStyle",{get:function get(){return this.ctx.fillStyle;},set:function set(value){var rgba;rgba=getRGBA(value);this.ctx.fillStyle=rgba.style;this.ctx.isFillTransparent=rgba.a===0;//自定义修改 当透明度小于1时改成0 ,以适配不支持透明度的打印机
|
|
99922
99940
|
if(rgba.a<1){this.ctx.fillOpacity=0;}else{this.ctx.fillOpacity=rgba.a;}// 自定义修改 处理彩色字体打印问题
|
|
99923
|
-
var alpha=this.ctx.fillOpacity;if(window.printBlack&&!['#000','#000000','#fff','#ffffff','#FFF','#FFFFFF'].includes(this.ctx.fillStyle)){console.log(window.printBlack,this.ctx.fillStyle,"?????????????");if(Array.isArray(this.ctx.path)&&this.ctx.path.length>4){this.ctx.fillStyle="#000000";}this.pdf.setFillColor(255,255,255,{a:alpha});this.pdf.setTextColor(0,0,0,{a:alpha});}else{console.log(rgba.r,rgba.g,rgba.b,alpha,rgba.style,'----------',this.ctx);
|
|
99941
|
+
var alpha=this.ctx.fillOpacity;console.log(this.ctx,this.ctx.fillStyle);if(window.printBlack&&!['#000','#000000','#fff','#ffffff','#FFF','#FFFFFF'].includes(this.ctx.fillStyle)){console.log(window.printBlack,this.ctx.fillStyle,"?????????????");if(Array.isArray(this.ctx.path)&&this.ctx.path.length>4){this.ctx.fillStyle="#000000";}this.pdf.setFillColor(255,255,255,{a:alpha});this.pdf.setTextColor(0,0,0,{a:alpha});}else{// console.log(rgba.r, rgba.g, rgba.b, alpha, rgba.style,'----------', this.ctx);
|
|
99942
|
+
this.pdf.setFillColor(rgba.r,rgba.g,rgba.b,{a:alpha});this.pdf.setTextColor(rgba.r,rgba.g,rgba.b,{a:alpha});}}});/**
|
|
99924
99943
|
* Sets or returns the color, gradient, or pattern used for strokes
|
|
99925
99944
|
*
|
|
99926
99945
|
* @name strokeStyle
|
|
@@ -99929,7 +99948,8 @@ var alpha=this.ctx.fillOpacity;if(window.printBlack&&!['#000','#000000','#fff','
|
|
|
99929
99948
|
* @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)
|
|
99930
99949
|
* @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)
|
|
99931
99950
|
*/Object.defineProperty(this,"strokeStyle",{get:function get(){return this.ctx.strokeStyle;},set:function set(value){var rgba=getRGBA(value);this.ctx.strokeStyle=rgba.style;this.ctx.isStrokeTransparent=rgba.a===0;//自定义修改 当透明度小于1时改成0 ,以适配不支持透明度的打印机
|
|
99932
|
-
if(rgba.a<1){this.ctx.strokeOpacity=0;}else{this.ctx.strokeOpacity=rgba.a;}if(rgba.a===0){this.pdf.setDrawColor(255,255,255);}else if(rgba.a===1){this.pdf.setDrawColor(rgba.r,rgba.g,rgba.b);}else{this.pdf.setDrawColor(rgba.r,rgba.g,rgba.b);}
|
|
99951
|
+
if(rgba.a<1){this.ctx.strokeOpacity=0;}else{this.ctx.strokeOpacity=rgba.a;}if(rgba.a===0){this.pdf.setDrawColor(255,255,255);}else if(rgba.a===1){this.pdf.setDrawColor(rgba.r,rgba.g,rgba.b);}else{this.pdf.setDrawColor(rgba.r,rgba.g,rgba.b);}// console.log(this.ctx, "----------------------------");
|
|
99952
|
+
if(window.printBlack&&!['#000','#000000','#fff','#ffffff','#FFF','#FFFFFF'].includes(this.ctx.strokeStyle)){if(Array.isArray(this.ctx.path)&&this.ctx.path.length>4){this.ctx.strokeStyle="#000000";this.pdf.setDrawColor(0,0,0);}}}});/**
|
|
99933
99953
|
* Sets or returns the style of the end caps for a line
|
|
99934
99954
|
*
|
|
99935
99955
|
* @name lineCap
|
|
@@ -100159,7 +100179,7 @@ Context2D.prototype.arcTo=function(x1,y1,x2,y2,radius){throw new Error("arcTo no
|
|
|
100159
100179
|
*/Context2D.prototype.fillText=function(text,x,y,maxWidth){if(isNaN(x)||isNaN(y)||typeof text!=="string"){console.error("jsPDF.context2d.fillText: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.fillText");}maxWidth=isNaN(maxWidth)?undefined:maxWidth;if(isFillTransparent.call(this)){return;}var degs=rad2deg(this.ctx.transform.rotation);// We only use X axis as scale hint
|
|
100160
100180
|
var scale=this.ctx.transform.scaleX;var acharSpace=this.letterSpacing?parseFloat(this.letterSpacing):0.0;//自定义修改 以处理宋体粗体
|
|
100161
100181
|
if(this.font.indexOf("SimSun")>=0&&this.font.indexOf("bold")>=0){//renderingMode: "stroke",
|
|
100162
|
-
putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign,maxWidth:maxWidth,renderingMode:"fillThenStroke",charSpace:acharSpace+0.35});}else{putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace});}};/**
|
|
100182
|
+
this.ctx.strokeStyle=this.ctx.fillStyle;console.log(this.font,this.ctx,this,"?????????????????");putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign,maxWidth:maxWidth,renderingMode:"fillThenStroke",charSpace:acharSpace+0.35});}else{console.log(this.font,this.ctx,this,"=====================");putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace});}};/**
|
|
100163
100183
|
* Draws text on the canvas (no fill)
|
|
100164
100184
|
*
|
|
100165
100185
|
* @name strokeText
|
|
@@ -100288,7 +100308,7 @@ return y;case"alphabetic":default:return y;}};var getTextBottom=function getText
|
|
|
100288
100308
|
* @param counterclockwise
|
|
100289
100309
|
* @param style
|
|
100290
100310
|
* @param isClip
|
|
100291
|
-
*/var drawArc=function drawArc(x,y,r,a1,a2,counterclockwise,style,isClip){var curves=createArc.call(this,r,a1,a2,counterclockwise);for(var i=0;i<curves.length;i++){var curve=curves[i];if(i===0){doMove.call(this,curve.x1+x,curve.y1+y);}drawCurve.call(this,x,y,curve.x2,curve.y2,curve.x3,curve.y3,curve.x4,curve.y4);}if(!isClip){putStyle.call(this,style);}else{doClip.call(this);}};var putStyle=function putStyle(style){switch(style){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f");break;}};var doClip=function doClip(){this.pdf.clip();this.pdf.discardPath();};var doMove=function doMove(x,y){this.pdf.internal.out(getHorizontalCoordinateString(x)+" "+getVerticalCoordinateString(y)+" m");};var putText=function putText(options){var textAlign;switch(options.align){case"right":case"end":textAlign="right";break;case"center":textAlign="center";break;case"left":case"start":default:textAlign="left";break;}var textDimensions=this.pdf.getTextDimensions(options.text);var yBaseLine=getBaseline.call(this,options.y);var yBottom=getTextBottom.call(this,yBaseLine);var yTop=yBottom-textDimensions.h;var pt=this.ctx.transform.applyToPoint(new Point(options.x,yBaseLine));var decomposedTransformationMatrix=this.ctx.transform.decompose();var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);var baselineRect=this.ctx.transform.applyToRectangle(new Rectangle(options.x,yBaseLine,textDimensions.w,textDimensions.h));var textBounds=matrix.applyToRectangle(new Rectangle(options.x,yTop,textDimensions.w,textDimensions.h));var pageArray=getPagesByPath.call(this,textBounds);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,oldSize,oldLineWidth;options.text=options.text.replace(/[\t]/g,' ');// 自定义修改 修复打印不了tab键的问题
|
|
100311
|
+
*/var drawArc=function drawArc(x,y,r,a1,a2,counterclockwise,style,isClip){var curves=createArc.call(this,r,a1,a2,counterclockwise);for(var i=0;i<curves.length;i++){var curve=curves[i];if(i===0){doMove.call(this,curve.x1+x,curve.y1+y);}drawCurve.call(this,x,y,curve.x2,curve.y2,curve.x3,curve.y3,curve.x4,curve.y4);}if(!isClip){putStyle.call(this,style);}else{doClip.call(this);}};var putStyle=function putStyle(style){switch(style){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f");break;}};var doClip=function doClip(){this.pdf.clip();this.pdf.discardPath();};var doMove=function doMove(x,y){this.pdf.internal.out(getHorizontalCoordinateString(x)+" "+getVerticalCoordinateString(y)+" m");};var putText=function putText(options){var textAlign;switch(options.align){case"right":case"end":textAlign="right";break;case"center":textAlign="center";break;case"left":case"start":default:textAlign="left";break;}var textDimensions=this.pdf.getTextDimensions(options.text);console.log(options.text,textDimensions,this,"0000000000000000");var yBaseLine=getBaseline.call(this,options.y);var yBottom=getTextBottom.call(this,yBaseLine);var yTop=yBottom-textDimensions.h;var pt=this.ctx.transform.applyToPoint(new Point(options.x,yBaseLine));var decomposedTransformationMatrix=this.ctx.transform.decompose();var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);var baselineRect=this.ctx.transform.applyToRectangle(new Rectangle(options.x,yBaseLine,textDimensions.w,textDimensions.h));var textBounds=matrix.applyToRectangle(new Rectangle(options.x,yTop,textDimensions.w,textDimensions.h));var pageArray=getPagesByPath.call(this,textBounds);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,oldSize,oldLineWidth;options.text=options.text.replace(/[\t]/g,' ');// 自定义修改 修复打印不了tab键的问题
|
|
100292
100312
|
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 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 pageHeightMinusBottomMargin=this.pdf.internal.pageSize.height-this.margin[2];var pageHeightMinusMargins=pageHeightMinusBottomMargin-this.margin[0];var pageWidthMinusRightMargin=this.pdf.internal.pageSize.width-this.margin[1];var pageWidthMinusMargins=pageWidthMinusRightMargin-this.margin[3];var previousPageHeightSum=i===1?0:firstPageHeight+(i-2)*pageHeightMinusMargins;var acharSpace=options.charSpace?parseFloat(options.charSpace):0.0;//自定义修改
|
|
100293
100313
|
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],-1*previousPageHeightSum+topMargin);drawPaths.call(this,"fill",true);this.path=tmpPaths;}var textBoundsOnPage=pathPositionRedo([JSON.parse(JSON.stringify(textBounds))],this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset)[0];if(options.scale>=0.01){oldSize=this.pdf.internal.getFontSize();this.pdf.setFontSize(oldSize*options.scale);oldLineWidth=this.lineWidth;this.lineWidth=oldLineWidth*options.scale;}var doSlice=this.autoPaging!=="text";if(doSlice||textBoundsOnPage.y+textBoundsOnPage.h<=pageHeightMinusBottomMargin){if(doSlice||textBoundsOnPage.y>=topMargin&&textBoundsOnPage.x<=pageWidthMinusRightMargin){var croppedText=doSlice?options.text:this.pdf.splitTextToSize(options.text,options.maxWidth||pageWidthMinusRightMargin-textBoundsOnPage.x)[0];var baseLineRectOnPage=pathPositionRedo([JSON.parse(JSON.stringify(baselineRect))],this.posX+this.margin[3],-previousPageHeightSum+topMargin+this.ctx.prevPageLastElemOffset)[0];var needsClipping=doSlice&&(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.text(croppedText,baseLineRectOnPage.x,baseLineRectOnPage.y,{angle:options.angle,align:textAlign,renderingMode:options.renderingMode,charSpace:acharSpace// 自定义修改
|
|
100294
100314
|
});if(needsClipping){this.pdf.restoreGraphicsState();}}}else{// This text is the last element of the page, but it got cut off due to the margin
|
|
@@ -199754,7 +199774,7 @@ var map = {
|
|
|
199754
199774
|
"./selectDialog/SelectDialog.vue": 59075,
|
|
199755
199775
|
"./sign/Sign.vue": 28715,
|
|
199756
199776
|
"./table/TableCellPoper.vue": 61917,
|
|
199757
|
-
"./table/TableCellProperty.vue":
|
|
199777
|
+
"./table/TableCellProperty.vue": 47585,
|
|
199758
199778
|
"./table/TableColProperty.vue": 2116,
|
|
199759
199779
|
"./table/TableForm.vue": 19064,
|
|
199760
199780
|
"./table/TableFormTree.vue": 39703,
|
|
@@ -239116,7 +239136,7 @@ var ParagraphNode = __webpack_require__(67945);
|
|
|
239116
239136
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/MarkNode.ts
|
|
239117
239137
|
var MarkNode = __webpack_require__(57727);
|
|
239118
239138
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
239119
|
-
/* harmony default export */ var version = ('3.0.
|
|
239139
|
+
/* harmony default export */ var version = ('3.0.89');
|
|
239120
239140
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
239121
239141
|
var PoperTipText = __webpack_require__(36081);
|
|
239122
239142
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|