hoeditor-web 3.0.81 → 3.0.83
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 +1609 -333
- package/lib/hoeditor.umd.min.js +6 -6
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -16591,7 +16591,7 @@ var component = (0,componentNormalizer/* default */.Z)(
|
|
|
16591
16591
|
|
|
16592
16592
|
/***/ }),
|
|
16593
16593
|
|
|
16594
|
-
/***/
|
|
16594
|
+
/***/ 61973:
|
|
16595
16595
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
16596
16596
|
|
|
16597
16597
|
"use strict";
|
|
@@ -16607,7 +16607,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
16607
16607
|
var es_array_includes = __webpack_require__(26699);
|
|
16608
16608
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
|
|
16609
16609
|
var es_string_includes = __webpack_require__(32023);
|
|
16610
|
-
;// 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=
|
|
16610
|
+
;// 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=488dae95&
|
|
16611
16611
|
|
|
16612
16612
|
|
|
16613
16613
|
var render = function render() {
|
|
@@ -16856,7 +16856,11 @@ var render = function render() {
|
|
|
16856
16856
|
staticStyle: {
|
|
16857
16857
|
"display": "inline-block"
|
|
16858
16858
|
}
|
|
16859
|
-
}, [_vm._v("边框颜色")]), _c('
|
|
16859
|
+
}, [_vm._v("边框颜色")]), _c('span', {
|
|
16860
|
+
staticStyle: {
|
|
16861
|
+
"padding": "0 10px 0 0"
|
|
16862
|
+
}
|
|
16863
|
+
}, [_vm._v("上")]), _c('ho-color-picker', {
|
|
16860
16864
|
model: {
|
|
16861
16865
|
value: _vm.gridLinesColor[0],
|
|
16862
16866
|
callback: function callback($$v) {
|
|
@@ -16864,6 +16868,99 @@ var render = function render() {
|
|
|
16864
16868
|
},
|
|
16865
16869
|
expression: "gridLinesColor[0]"
|
|
16866
16870
|
}
|
|
16871
|
+
}), _c('span', {
|
|
16872
|
+
staticStyle: {
|
|
16873
|
+
"padding": "0 10px 0 0"
|
|
16874
|
+
}
|
|
16875
|
+
}, [_vm._v("下")]), _c('ho-color-picker', {
|
|
16876
|
+
model: {
|
|
16877
|
+
value: _vm.gridLinesColor[1],
|
|
16878
|
+
callback: function callback($$v) {
|
|
16879
|
+
_vm.$set(_vm.gridLinesColor, 1, $$v);
|
|
16880
|
+
},
|
|
16881
|
+
expression: "gridLinesColor[1]"
|
|
16882
|
+
}
|
|
16883
|
+
}), _c('span', {
|
|
16884
|
+
staticStyle: {
|
|
16885
|
+
"padding": "0 10px 0 0"
|
|
16886
|
+
}
|
|
16887
|
+
}, [_vm._v("左")]), _c('ho-color-picker', {
|
|
16888
|
+
model: {
|
|
16889
|
+
value: _vm.gridLinesColor[2],
|
|
16890
|
+
callback: function callback($$v) {
|
|
16891
|
+
_vm.$set(_vm.gridLinesColor, 2, $$v);
|
|
16892
|
+
},
|
|
16893
|
+
expression: "gridLinesColor[2]"
|
|
16894
|
+
}
|
|
16895
|
+
}), _c('span', {
|
|
16896
|
+
staticStyle: {
|
|
16897
|
+
"padding": "0 10px 0 0"
|
|
16898
|
+
}
|
|
16899
|
+
}, [_vm._v("右")]), _c('ho-color-picker', {
|
|
16900
|
+
model: {
|
|
16901
|
+
value: _vm.gridLinesColor[3],
|
|
16902
|
+
callback: function callback($$v) {
|
|
16903
|
+
_vm.$set(_vm.gridLinesColor, 3, $$v);
|
|
16904
|
+
},
|
|
16905
|
+
expression: "gridLinesColor[3]"
|
|
16906
|
+
}
|
|
16907
|
+
})], 1)]), _c('div', {
|
|
16908
|
+
staticClass: "control-item"
|
|
16909
|
+
}, [_c('div', {
|
|
16910
|
+
staticClass: "grid-lines-color-item"
|
|
16911
|
+
}, [_c('span', {
|
|
16912
|
+
staticClass: "label",
|
|
16913
|
+
staticStyle: {
|
|
16914
|
+
"display": "inline-block"
|
|
16915
|
+
}
|
|
16916
|
+
}, [_vm._v("显示边框")]), _c('span', {
|
|
16917
|
+
staticStyle: {
|
|
16918
|
+
"padding": "0 10px 0 0"
|
|
16919
|
+
}
|
|
16920
|
+
}, [_vm._v("上")]), _c('a-checkbox', {
|
|
16921
|
+
model: {
|
|
16922
|
+
value: _vm.gridLineDisplay[0],
|
|
16923
|
+
callback: function callback($$v) {
|
|
16924
|
+
_vm.$set(_vm.gridLineDisplay, 0, $$v);
|
|
16925
|
+
},
|
|
16926
|
+
expression: "gridLineDisplay[0]"
|
|
16927
|
+
}
|
|
16928
|
+
}), _c('span', {
|
|
16929
|
+
staticStyle: {
|
|
16930
|
+
"padding": "0 10px"
|
|
16931
|
+
}
|
|
16932
|
+
}, [_vm._v("下")]), _c('a-checkbox', {
|
|
16933
|
+
model: {
|
|
16934
|
+
value: _vm.gridLineDisplay[1],
|
|
16935
|
+
callback: function callback($$v) {
|
|
16936
|
+
_vm.$set(_vm.gridLineDisplay, 1, $$v);
|
|
16937
|
+
},
|
|
16938
|
+
expression: "gridLineDisplay[1]"
|
|
16939
|
+
}
|
|
16940
|
+
}), _c('span', {
|
|
16941
|
+
staticStyle: {
|
|
16942
|
+
"padding": "0 10px"
|
|
16943
|
+
}
|
|
16944
|
+
}, [_vm._v("左")]), _c('a-checkbox', {
|
|
16945
|
+
model: {
|
|
16946
|
+
value: _vm.gridLineDisplay[2],
|
|
16947
|
+
callback: function callback($$v) {
|
|
16948
|
+
_vm.$set(_vm.gridLineDisplay, 2, $$v);
|
|
16949
|
+
},
|
|
16950
|
+
expression: "gridLineDisplay[2]"
|
|
16951
|
+
}
|
|
16952
|
+
}), _c('span', {
|
|
16953
|
+
staticStyle: {
|
|
16954
|
+
"padding": "0 10px"
|
|
16955
|
+
}
|
|
16956
|
+
}, [_vm._v("右")]), _c('a-checkbox', {
|
|
16957
|
+
model: {
|
|
16958
|
+
value: _vm.gridLineDisplay[3],
|
|
16959
|
+
callback: function callback($$v) {
|
|
16960
|
+
_vm.$set(_vm.gridLineDisplay, 3, $$v);
|
|
16961
|
+
},
|
|
16962
|
+
expression: "gridLineDisplay[3]"
|
|
16963
|
+
}
|
|
16867
16964
|
})], 1)]), _c('PrintLineStyle', {
|
|
16868
16965
|
attrs: {
|
|
16869
16966
|
"isDrawGridlines": false,
|
|
@@ -16876,9 +16973,6 @@ var render = function render() {
|
|
|
16876
16973
|
}), _c('li', {
|
|
16877
16974
|
staticClass: "control-item"
|
|
16878
16975
|
}, [_c('a-checkbox', {
|
|
16879
|
-
attrs: {
|
|
16880
|
-
"disabled": !_vm.isDrawGridlines
|
|
16881
|
-
},
|
|
16882
16976
|
model: {
|
|
16883
16977
|
value: _vm.printGridLines,
|
|
16884
16978
|
callback: function callback($$v) {
|
|
@@ -17335,7 +17429,7 @@ var render = function render() {
|
|
|
17335
17429
|
};
|
|
17336
17430
|
var staticRenderFns = [];
|
|
17337
17431
|
|
|
17338
|
-
;// CONCATENATED MODULE: ./src/components/controls/table/TableCellProperty.vue?vue&type=template&id=
|
|
17432
|
+
;// CONCATENATED MODULE: ./src/components/controls/table/TableCellProperty.vue?vue&type=template&id=488dae95&
|
|
17339
17433
|
|
|
17340
17434
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules
|
|
17341
17435
|
var slicedToArray = __webpack_require__(27222);
|
|
@@ -17347,6 +17441,8 @@ var es_array_filter = __webpack_require__(57327);
|
|
|
17347
17441
|
var es_object_to_string = __webpack_require__(41539);
|
|
17348
17442
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
|
|
17349
17443
|
var es_function_name = __webpack_require__(68309);
|
|
17444
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
|
|
17445
|
+
var es_array_map = __webpack_require__(21249);
|
|
17350
17446
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
|
|
17351
17447
|
var es_array_concat = __webpack_require__(92222);
|
|
17352
17448
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
|
|
@@ -17388,6 +17484,7 @@ var util = __webpack_require__(62783);
|
|
|
17388
17484
|
|
|
17389
17485
|
|
|
17390
17486
|
|
|
17487
|
+
|
|
17391
17488
|
var columns = [{
|
|
17392
17489
|
dataIndex: 'rowIndexs',
|
|
17393
17490
|
key: 'rowIndexs',
|
|
@@ -17461,6 +17558,7 @@ var columns = [{
|
|
|
17461
17558
|
// 是否绘制边框
|
|
17462
17559
|
gridLinesColor: ['#000000', '#000000', '#000000', '#000000'],
|
|
17463
17560
|
// 边框边框颜色 上、下、左、右
|
|
17561
|
+
gridLineDisplay: [true, true, true, true],
|
|
17464
17562
|
gridLinesStyle: 4,
|
|
17465
17563
|
// 边框样式
|
|
17466
17564
|
span: 0,
|
|
@@ -17519,6 +17617,16 @@ var columns = [{
|
|
|
17519
17617
|
} else {
|
|
17520
17618
|
this.gridLinesColor = ['#000000', '#000000', '#000000', '#000000'];
|
|
17521
17619
|
}
|
|
17620
|
+
if (Array.isArray(cellNode.cellProperty.gridLineDisplay)) {
|
|
17621
|
+
this.gridLineDisplay = (0,toConsumableArray/* default */.Z)(cellNode.cellProperty.gridLineDisplay).map(function (v) {
|
|
17622
|
+
if (v == true || v == 'true') {
|
|
17623
|
+
return true;
|
|
17624
|
+
}
|
|
17625
|
+
return false;
|
|
17626
|
+
});
|
|
17627
|
+
} else {
|
|
17628
|
+
this.gridLineDisplay = [true, true, true, true];
|
|
17629
|
+
}
|
|
17522
17630
|
this.backColor = cellNode.cellProperty.backColor ? cellNode.cellProperty.backColor : '#ffffff';
|
|
17523
17631
|
this.gridLinesStyle = cellNode.cellProperty.gridLinesStyle;
|
|
17524
17632
|
this.span = cellNode.cellProperty.span;
|
|
@@ -17559,9 +17667,9 @@ var columns = [{
|
|
|
17559
17667
|
},
|
|
17560
17668
|
methods: {
|
|
17561
17669
|
isDrawGridlinesChange: function isDrawGridlinesChange() {
|
|
17562
|
-
if (!this.isDrawGridlines) {
|
|
17563
|
-
|
|
17564
|
-
}
|
|
17670
|
+
// if (!this.isDrawGridlines) {
|
|
17671
|
+
// this.printGridLines = false;
|
|
17672
|
+
// }
|
|
17565
17673
|
},
|
|
17566
17674
|
getCellNodes: function getCellNodes() {
|
|
17567
17675
|
var nodes = this.vueController.findNodebyPath(this.endPath).node;
|
|
@@ -17659,7 +17767,8 @@ var columns = [{
|
|
|
17659
17767
|
},
|
|
17660
17768
|
sure: function sure() {
|
|
17661
17769
|
var _this2 = this;
|
|
17662
|
-
this.gridLinesColor = [this.gridLinesColor[0], this.gridLinesColor[0], this.gridLinesColor[0], this.gridLinesColor[0]];
|
|
17770
|
+
// this.gridLinesColor = [this.gridLinesColor[0], this.gridLinesColor[0], this.gridLinesColor[0], this.gridLinesColor[0]];
|
|
17771
|
+
|
|
17663
17772
|
var params = {
|
|
17664
17773
|
id: this.id,
|
|
17665
17774
|
lightCellBorders: this.lightCellBorders,
|
|
@@ -17671,6 +17780,7 @@ var columns = [{
|
|
|
17671
17780
|
cellInnerMargin: [this.cellTop, this.cellBottom, this.cellLeft, this.cellRight],
|
|
17672
17781
|
isDrawGridlines: this.isDrawGridlines,
|
|
17673
17782
|
gridLinesColor: this.gridLinesColor,
|
|
17783
|
+
gridLineDisplay: this.gridLineDisplay,
|
|
17674
17784
|
gridLinesStyle: this.gridLinesStyle,
|
|
17675
17785
|
span: this.span,
|
|
17676
17786
|
alignTextToGridline: this.alignTextToGridline,
|
|
@@ -17717,10 +17827,10 @@ var columns = [{
|
|
|
17717
17827
|
});
|
|
17718
17828
|
;// CONCATENATED MODULE: ./src/components/controls/table/TableCellProperty.vue?vue&type=script&lang=js&
|
|
17719
17829
|
/* harmony default export */ var table_TableCellPropertyvue_type_script_lang_js_ = (TableCellPropertyvue_type_script_lang_js_);
|
|
17720
|
-
;// 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=
|
|
17830
|
+
;// 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=488dae95&prod&lang=scss&
|
|
17721
17831
|
// extracted by mini-css-extract-plugin
|
|
17722
17832
|
|
|
17723
|
-
;// CONCATENATED MODULE: ./src/components/controls/table/TableCellProperty.vue?vue&type=style&index=0&id=
|
|
17833
|
+
;// CONCATENATED MODULE: ./src/components/controls/table/TableCellProperty.vue?vue&type=style&index=0&id=488dae95&prod&lang=scss&
|
|
17724
17834
|
|
|
17725
17835
|
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
17726
17836
|
var componentNormalizer = __webpack_require__(70713);
|
|
@@ -39481,16 +39591,20 @@ var DocController = /*#__PURE__*/function () {
|
|
|
39481
39591
|
}
|
|
39482
39592
|
startPath = domRange.startPath;
|
|
39483
39593
|
endPath = domRange.endPath;
|
|
39484
|
-
if (startPath !== endPath && domRange.npEnd.node instanceof
|
|
39485
|
-
|
|
39486
|
-
|
|
39487
|
-
|
|
39488
|
-
|
|
39489
|
-
|
|
39490
|
-
|
|
39491
|
-
|
|
39492
|
-
|
|
39493
|
-
|
|
39594
|
+
// if (startPath !== endPath && domRange.npEnd.node instanceof MarkNode) {
|
|
39595
|
+
// const nodes = DomRange.getSelectDomNodesForDelete(
|
|
39596
|
+
// this._hoEditorFactoryID,
|
|
39597
|
+
// startPath,
|
|
39598
|
+
// endPath
|
|
39599
|
+
// );
|
|
39600
|
+
// if (nodes.length == 1 && nodes[0] instanceof TextInputFieldNode && nodes[0].isEmpty()) {
|
|
39601
|
+
// startPath = nodes[0].StartMarkNode.getNodePath();
|
|
39602
|
+
// endPath = nodes[0].childNodes[1].getNodePath();
|
|
39603
|
+
// const newDomRange = new DomRange(this._hoEditorFactoryID, startPath, endPath);
|
|
39604
|
+
// hoEditorFactory.docTree.curDomRange = newDomRange;
|
|
39605
|
+
// hoEditorFactory.drawTree.moveCaretToPath(startPath);
|
|
39606
|
+
// }
|
|
39607
|
+
// }
|
|
39494
39608
|
var changingEvent = new _events_NodeChangingEvent__WEBPACK_IMPORTED_MODULE_22__/* .NodeChangingEvent */ .Q(_DocTree__WEBPACK_IMPORTED_MODULE_25__/* .DocAction.daInsert */ .gk.daInsert, startPath, endPath, _events_NodeChangingEvent__WEBPACK_IMPORTED_MODULE_22__/* .OperType.keyBoardInput */ .y.keyBoardInput);
|
|
39495
39609
|
if (hoEditorFactory.docTree.changing(changingEvent)) {
|
|
39496
39610
|
if (domRange.npStart.node && domRange.npStart.node.parentNode instanceof _treeNode_CellNode__WEBPACK_IMPORTED_MODULE_56__/* .CellNode */ .D) {
|
|
@@ -45630,6 +45744,7 @@ var DomRange = /*#__PURE__*/function () {
|
|
|
45630
45744
|
// const hoEditorFactory = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
45631
45745
|
// const isValidPath = hoEditorFactory.docTree.checkPath(value);
|
|
45632
45746
|
if (value.indexOf("-") >= 0) {
|
|
45747
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_22__/* ["default"].destroy */ .Z.destroy();
|
|
45633
45748
|
//const hoEditorFactory = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
45634
45749
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_22__/* ["default"].warn */ .Z.warn("当前路径s(" + value + ")异常,请用鼠标点击一下页面(重获路径)再进行之后的操作。(" + this._startPath + ")");
|
|
45635
45750
|
this.setSamePath(this._startPath);
|
|
@@ -45649,6 +45764,7 @@ var DomRange = /*#__PURE__*/function () {
|
|
|
45649
45764
|
// const hoEditorFactory = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
45650
45765
|
// const isValidPath = hoEditorFactory.docTree.checkPath(value);
|
|
45651
45766
|
if (value.indexOf("-") >= 0) {
|
|
45767
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_22__/* ["default"].destroy */ .Z.destroy();
|
|
45652
45768
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_22__/* ["default"].warn */ .Z.warn("当前路径e(" + value + ")异常,请用鼠标点击一下页面(重获路径)再进行之后的操作。(" + this._endPath + ")");
|
|
45653
45769
|
this.setSamePath(this._endPath);
|
|
45654
45770
|
return;
|
|
@@ -65122,7 +65238,7 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
|
|
|
65122
65238
|
/*
|
|
65123
65239
|
* @Author: your name
|
|
65124
65240
|
* @Date: 2020-11-03 15:17:54
|
|
65125
|
-
* @LastEditTime: 2023-
|
|
65241
|
+
* @LastEditTime: 2023-07-12 09:59:55
|
|
65126
65242
|
* @LastEditors: liyanan 2441631434@qq.com
|
|
65127
65243
|
* @Description: In User Settings Edit
|
|
65128
65244
|
* @FilePath: \hoeditor-web\src\editor\dom\treeNode\TextInputFieldNode.ts
|
|
@@ -67188,6 +67304,9 @@ var TextInputFieldNode = /*#__PURE__*/function (_BaseCombineNode) {
|
|
|
67188
67304
|
if (!(eChildNode instanceof _MarkNode__WEBPACK_IMPORTED_MODULE_45__/* .MarkNode */ .j) || eChildNode instanceof _MarkNode__WEBPACK_IMPORTED_MODULE_45__/* .MarkNode */ .j && eChildNode.MarkNodeType !== _MarkNode__WEBPACK_IMPORTED_MODULE_45__/* .MarkNodeType.mtEnd */ .q.mtEnd) {
|
|
67189
67305
|
throw new Error('经检测,病历元素“' + temp.name + '”的模板格式有问题,无法正常加载,请联系工程师进行处理。');
|
|
67190
67306
|
}
|
|
67307
|
+
if (temp.childNodes.length > 3 && temp.childNodes[1] instanceof _MarkNode__WEBPACK_IMPORTED_MODULE_45__/* .MarkNode */ .j) {
|
|
67308
|
+
temp.childNodes.splice(1, 1);
|
|
67309
|
+
}
|
|
67191
67310
|
}
|
|
67192
67311
|
if (temp.childNodes[1] instanceof _TableFormula__WEBPACK_IMPORTED_MODULE_53__/* .TableFormula */ .N) {
|
|
67193
67312
|
return temp;
|
|
@@ -72972,15 +73091,17 @@ var DrawContainer = /*#__PURE__*/function (_createjs$Container) {
|
|
|
72972
73091
|
/* harmony export */ "L": function() { return /* binding */ DrawDateTime; }
|
|
72973
73092
|
/* harmony export */ });
|
|
72974
73093
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70280);
|
|
72975
|
-
/* harmony import */ var
|
|
73094
|
+
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(66298);
|
|
72976
73095
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75808);
|
|
72977
73096
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11651);
|
|
72978
73097
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19593);
|
|
72979
|
-
/* harmony import */ var
|
|
73098
|
+
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(78255);
|
|
72980
73099
|
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68309);
|
|
72981
73100
|
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
72982
73101
|
/* harmony import */ var _editor_utils_DrawSimpleText__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(57590);
|
|
72983
73102
|
/* harmony import */ var _DrawCombineNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(66114);
|
|
73103
|
+
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(74089);
|
|
73104
|
+
|
|
72984
73105
|
|
|
72985
73106
|
|
|
72986
73107
|
|
|
@@ -73005,9 +73126,9 @@ var DrawDateTime = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
73005
73126
|
var _this;
|
|
73006
73127
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, DrawDateTime);
|
|
73007
73128
|
_this = _super.call(this, hoeditfactoryID, rootPath, node, 0);
|
|
73008
|
-
(0,
|
|
73009
|
-
(0,
|
|
73010
|
-
(0,
|
|
73129
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_text", void 0);
|
|
73130
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_textStyle", void 0);
|
|
73131
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_dText", void 0);
|
|
73011
73132
|
_this._text = node.text;
|
|
73012
73133
|
_this._textStyle = textStyle;
|
|
73013
73134
|
_this._dText = new _editor_utils_DrawSimpleText__WEBPACK_IMPORTED_MODULE_5__/* .DrawSimpleText */ .b(_this._text, textStyle.getStyleKey(), textStyle.color, 0);
|
|
@@ -73015,12 +73136,13 @@ var DrawDateTime = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
73015
73136
|
_this.dHeight = height;
|
|
73016
73137
|
_this.charSpace = 0;
|
|
73017
73138
|
_this.drawDateTime();
|
|
73018
|
-
|
|
73139
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_7__/* .HOEditorFactorys.instance */ .b.instance().getFactory(_this._hoEditorFactoryID);
|
|
73140
|
+
if (hoEditorFactory.isDrawMustMarker && node.customProperty && node.customProperty.must && node.text === node.labelText) {
|
|
73019
73141
|
_this.drawMarkIcon();
|
|
73020
73142
|
}
|
|
73021
73143
|
return _this;
|
|
73022
73144
|
}
|
|
73023
|
-
(0,
|
|
73145
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)(DrawDateTime, [{
|
|
73024
73146
|
key: "text",
|
|
73025
73147
|
get: function get() {
|
|
73026
73148
|
return this._text;
|
|
@@ -73070,11 +73192,11 @@ var DrawDateTime = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
73070
73192
|
/* harmony export */ "I": function() { return /* binding */ DrawDownListNode; }
|
|
73071
73193
|
/* harmony export */ });
|
|
73072
73194
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70280);
|
|
73073
|
-
/* harmony import */ var
|
|
73195
|
+
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(66298);
|
|
73074
73196
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75808);
|
|
73075
73197
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11651);
|
|
73076
73198
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19593);
|
|
73077
|
-
/* harmony import */ var
|
|
73199
|
+
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78255);
|
|
73078
73200
|
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68309);
|
|
73079
73201
|
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
73080
73202
|
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(40561);
|
|
@@ -73082,6 +73204,8 @@ var DrawDateTime = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
73082
73204
|
/* harmony import */ var _editor_dom_treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45712);
|
|
73083
73205
|
/* harmony import */ var _editor_utils_DrawSimpleText__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(57590);
|
|
73084
73206
|
/* harmony import */ var _DrawCombineNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(66114);
|
|
73207
|
+
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(74089);
|
|
73208
|
+
|
|
73085
73209
|
|
|
73086
73210
|
|
|
73087
73211
|
|
|
@@ -73110,10 +73234,10 @@ var DrawDownListNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
73110
73234
|
var _this;
|
|
73111
73235
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, DrawDownListNode);
|
|
73112
73236
|
_this = _super.call(this, hoEditorFactoryID, rootPath, node, 0);
|
|
73113
|
-
(0,
|
|
73114
|
-
(0,
|
|
73115
|
-
(0,
|
|
73116
|
-
(0,
|
|
73237
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_text", void 0);
|
|
73238
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_textStyle", void 0);
|
|
73239
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_dText", void 0);
|
|
73240
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_charCount", void 0);
|
|
73117
73241
|
_this._text = node.text;
|
|
73118
73242
|
_this._textStyle = textStyle;
|
|
73119
73243
|
_this._node = node;
|
|
@@ -73122,12 +73246,13 @@ var DrawDownListNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
73122
73246
|
_this.dWidth = _this._dText.getMeasuredWidth(); //+ charSpace * (this._text.length - 1);
|
|
73123
73247
|
_this.dHeight = height;
|
|
73124
73248
|
_this.drawDownList(0);
|
|
73125
|
-
|
|
73249
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_9__/* .HOEditorFactorys.instance */ .b.instance().getFactory(_this._hoEditorFactoryID);
|
|
73250
|
+
if (hoEditorFactory.isDrawMustMarker && node instanceof _editor_dom_treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_6__/* .DownListNode */ .yF && node.customProperty && node.customProperty.must && node.keyValue === "") {
|
|
73126
73251
|
_this.drawMarkIcon();
|
|
73127
73252
|
}
|
|
73128
73253
|
return _this;
|
|
73129
73254
|
}
|
|
73130
|
-
(0,
|
|
73255
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(DrawDownListNode, [{
|
|
73131
73256
|
key: "charCount",
|
|
73132
73257
|
get: function get() {
|
|
73133
73258
|
return this._charCount;
|
|
@@ -73303,7 +73428,7 @@ var DrawMarkNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
73303
73428
|
if (_this.dWidth != 0 && node.MarkNodeType == _editor_dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_9__/* .MarkNodeType.mtContent */ .q.mtContent) _this.addChild(_this._dText);
|
|
73304
73429
|
_this.drawBackColor();
|
|
73305
73430
|
_this.drawUnderline();
|
|
73306
|
-
if (node.MarkNodeType == _editor_dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_9__/* .MarkNodeType.mtEnd */ .q.mtEnd && _this.text.substring(0, 1) !== "C" && node.parentNode instanceof _editor_dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_10__/* .TextInputFieldNode */ .re) {
|
|
73431
|
+
if (hoEditorFactory.isDrawMustMarker && node.MarkNodeType == _editor_dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_9__/* .MarkNodeType.mtEnd */ .q.mtEnd && _this.text.substring(0, 1) !== "C" && node.parentNode instanceof _editor_dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_10__/* .TextInputFieldNode */ .re) {
|
|
73307
73432
|
var customProperty = node.parentNode.customProperty;
|
|
73308
73433
|
if (customProperty && customProperty.must && node.parentNode.childNodes[1] instanceof _editor_dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_9__/* .MarkNode */ .j) {
|
|
73309
73434
|
_this.drawMarkIcon();
|
|
@@ -74116,6 +74241,14 @@ var inherits = __webpack_require__(11651);
|
|
|
74116
74241
|
var createSuper = __webpack_require__(19593);
|
|
74117
74242
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
74118
74243
|
var defineProperty = __webpack_require__(78255);
|
|
74244
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
|
|
74245
|
+
var es_function_name = __webpack_require__(68309);
|
|
74246
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
|
|
74247
|
+
var es_array_includes = __webpack_require__(26699);
|
|
74248
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
|
|
74249
|
+
var es_string_includes = __webpack_require__(32023);
|
|
74250
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
|
|
74251
|
+
var es_array_splice = __webpack_require__(40561);
|
|
74119
74252
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js
|
|
74120
74253
|
var es_error_cause = __webpack_require__(21703);
|
|
74121
74254
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
@@ -74433,6 +74566,10 @@ var DrawPageTable = __webpack_require__(15694);
|
|
|
74433
74566
|
|
|
74434
74567
|
|
|
74435
74568
|
|
|
74569
|
+
|
|
74570
|
+
|
|
74571
|
+
|
|
74572
|
+
|
|
74436
74573
|
|
|
74437
74574
|
|
|
74438
74575
|
|
|
@@ -74464,6 +74601,7 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
74464
74601
|
_this._drawPageTable = dPartTable;
|
|
74465
74602
|
// this._crossShape = null;
|
|
74466
74603
|
_this._backImg = new createjs.Shape();
|
|
74604
|
+
_this._backImg.name = "backImg";
|
|
74467
74605
|
_this._topLine = new createjs.Shape();
|
|
74468
74606
|
_this._bottomLine = new createjs.Shape();
|
|
74469
74607
|
_this._leftLine = new createjs.Shape();
|
|
@@ -74945,10 +75083,159 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
74945
75083
|
}
|
|
74946
75084
|
this._backImg.graphics.endStroke();
|
|
74947
75085
|
}
|
|
75086
|
+
}, {
|
|
75087
|
+
key: "paintCellBorders",
|
|
75088
|
+
value: function paintCellBorders(newHeight, r, c) {
|
|
75089
|
+
if (this._cell.cellProperty.isDrawGridlines) {
|
|
75090
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
75091
|
+
var x = 0.5;
|
|
75092
|
+
var y = 0.5;
|
|
75093
|
+
var dWidth = this._dWidth - 0.5;
|
|
75094
|
+
var height = newHeight - 0.5;
|
|
75095
|
+
if (r > this._drawPageTable.startRow) {
|
|
75096
|
+
y = -0.5;
|
|
75097
|
+
height += 0.5;
|
|
75098
|
+
}
|
|
75099
|
+
if (c > 0) {
|
|
75100
|
+
x = -0.5;
|
|
75101
|
+
dWidth = this._dWidth + 0.5;
|
|
75102
|
+
}
|
|
75103
|
+
this._topLine.graphics.clear();
|
|
75104
|
+
this._bottomLine.graphics.clear();
|
|
75105
|
+
this._leftLine.graphics.clear();
|
|
75106
|
+
this._rightLine.graphics.clear();
|
|
75107
|
+
var printGridLines = this._cell.cellProperty.printGridLines;
|
|
75108
|
+
var gridLineDisplay = this._cell.cellProperty.gridLineDisplay;
|
|
75109
|
+
var gridLinesColor = this._cell.cellProperty.gridLinesColor;
|
|
75110
|
+
if (printGridLines || !printGridLines && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPreview */.Dh.psPreview && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPrint */.Dh.psPrint) {
|
|
75111
|
+
if (gridLineDisplay[0]) {
|
|
75112
|
+
//上边框
|
|
75113
|
+
if (r == 0 || this.dTop == 0) {
|
|
75114
|
+
this._topLine.name = "topLine";
|
|
75115
|
+
this._topLine.graphics.beginStroke(gridLinesColor[0]);
|
|
75116
|
+
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) {
|
|
75117
|
+
this._topLine.graphics.setStrokeDash([2, 2]);
|
|
75118
|
+
} else {
|
|
75119
|
+
this._topLine.graphics.setStrokeStyle(1, 0, 0, undefined, true);
|
|
75120
|
+
}
|
|
75121
|
+
this._topLine.graphics.moveTo(x, y).lineTo(x + dWidth, y);
|
|
75122
|
+
this._topLine.graphics.endStroke();
|
|
75123
|
+
if (!this.children.includes(this._topLine)) {
|
|
75124
|
+
this.addChild(this._topLine);
|
|
75125
|
+
}
|
|
75126
|
+
}
|
|
75127
|
+
} else {
|
|
75128
|
+
if (r > 0) {
|
|
75129
|
+
var topCell = this._cell.table.getMainCell(r - 1, c)[0];
|
|
75130
|
+
var drawPageCells = topCell.drawCell.drawPageCells;
|
|
75131
|
+
if (drawPageCells.length > 0) {
|
|
75132
|
+
for (var i = 0; i < drawPageCells[drawPageCells.length - 1].children.length; i++) {
|
|
75133
|
+
var child = drawPageCells[drawPageCells.length - 1].children[i];
|
|
75134
|
+
if (child.name == "bottomLine") {
|
|
75135
|
+
drawPageCells[drawPageCells.length - 1].children.splice(i, 1);
|
|
75136
|
+
}
|
|
75137
|
+
}
|
|
75138
|
+
}
|
|
75139
|
+
}
|
|
75140
|
+
}
|
|
75141
|
+
if (gridLineDisplay[1]) {
|
|
75142
|
+
//下边框
|
|
75143
|
+
this._bottomLine.name = "bottomLine";
|
|
75144
|
+
this._bottomLine.graphics.beginStroke(gridLinesColor[1]);
|
|
75145
|
+
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) {
|
|
75146
|
+
this._bottomLine.graphics.setStrokeDash([2, 2]);
|
|
75147
|
+
} else {
|
|
75148
|
+
this._bottomLine.graphics.setStrokeStyle(1, 0, 0, undefined, true);
|
|
75149
|
+
}
|
|
75150
|
+
this._bottomLine.graphics.moveTo(x, y + height).lineTo(x + dWidth, y + height);
|
|
75151
|
+
this._bottomLine.graphics.endStroke();
|
|
75152
|
+
if (!this.children.includes(this._bottomLine)) {
|
|
75153
|
+
this.addChild(this._bottomLine);
|
|
75154
|
+
}
|
|
75155
|
+
} else {
|
|
75156
|
+
if (r < this.cell.table.rowCount - 1) {
|
|
75157
|
+
var bottomCell = this._cell.table.getMainCell(r + 1, c)[0];
|
|
75158
|
+
var _drawPageCells = bottomCell.drawCell.drawPageCells;
|
|
75159
|
+
if (_drawPageCells.length > 0) {
|
|
75160
|
+
for (var _i = 0; _i < _drawPageCells[0].children.length; _i++) {
|
|
75161
|
+
var _child = _drawPageCells[0].children[_i];
|
|
75162
|
+
if (_child.name == "topLine") {
|
|
75163
|
+
_drawPageCells[0].children.splice(_i, 1);
|
|
75164
|
+
}
|
|
75165
|
+
}
|
|
75166
|
+
}
|
|
75167
|
+
}
|
|
75168
|
+
}
|
|
75169
|
+
if (gridLineDisplay[2]) {
|
|
75170
|
+
//左边框
|
|
75171
|
+
if (c == 0) {
|
|
75172
|
+
this._leftLine.name = "leftLine";
|
|
75173
|
+
this._leftLine.graphics.beginStroke(gridLinesColor[2]);
|
|
75174
|
+
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) {
|
|
75175
|
+
this._leftLine.graphics.setStrokeDash([2, 2]);
|
|
75176
|
+
} else {
|
|
75177
|
+
this._leftLine.graphics.setStrokeStyle(1, 0, 0, undefined, true);
|
|
75178
|
+
}
|
|
75179
|
+
this._leftLine.graphics.moveTo(x, y).lineTo(x, y + height);
|
|
75180
|
+
this._leftLine.graphics.endStroke();
|
|
75181
|
+
if (!this.children.includes(this._leftLine)) {
|
|
75182
|
+
this.addChild(this._leftLine);
|
|
75183
|
+
}
|
|
75184
|
+
}
|
|
75185
|
+
} else {
|
|
75186
|
+
if (c > 0) {
|
|
75187
|
+
var leftCell = this._cell.table.getMainCell(r, c - 1)[0];
|
|
75188
|
+
var _drawPageCells2 = leftCell.drawCell.drawPageCells;
|
|
75189
|
+
if (_drawPageCells2.length > 0) {
|
|
75190
|
+
for (var _i2 = 0; _i2 < _drawPageCells2.length; _i2++) {
|
|
75191
|
+
var children = _drawPageCells2[_i2].children;
|
|
75192
|
+
for (var j = 0; j < children.length; j++) {
|
|
75193
|
+
var _child2 = children[j];
|
|
75194
|
+
if (_child2.name == "rightLine") {
|
|
75195
|
+
children.splice(j, 1);
|
|
75196
|
+
}
|
|
75197
|
+
}
|
|
75198
|
+
}
|
|
75199
|
+
}
|
|
75200
|
+
}
|
|
75201
|
+
}
|
|
75202
|
+
if (gridLineDisplay[3]) {
|
|
75203
|
+
//右边框
|
|
75204
|
+
this._rightLine.name = "rightLine";
|
|
75205
|
+
this._rightLine.graphics.beginStroke(gridLinesColor[3]);
|
|
75206
|
+
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) {
|
|
75207
|
+
this._rightLine.graphics.setStrokeDash([2, 2]);
|
|
75208
|
+
} else {
|
|
75209
|
+
this._rightLine.graphics.setStrokeStyle(1, 0, 0, undefined, true);
|
|
75210
|
+
}
|
|
75211
|
+
this._rightLine.graphics.moveTo(x + dWidth, y).lineTo(x + dWidth, y + height);
|
|
75212
|
+
this._rightLine.graphics.endStroke();
|
|
75213
|
+
if (!this.children.includes(this._rightLine)) {
|
|
75214
|
+
this.addChild(this._rightLine);
|
|
75215
|
+
}
|
|
75216
|
+
} else {
|
|
75217
|
+
if (c < this.cell.table.colCount - 1) {
|
|
75218
|
+
var rightCell = this._cell.table.getMainCell(r, c + 1)[0];
|
|
75219
|
+
var _drawPageCells3 = rightCell.drawCell.drawPageCells;
|
|
75220
|
+
if (_drawPageCells3.length > 0) {
|
|
75221
|
+
for (var _i3 = 0; _i3 < _drawPageCells3.length; _i3++) {
|
|
75222
|
+
var _children = _drawPageCells3[_i3].children;
|
|
75223
|
+
for (var _j = 0; _j < _children.length; _j++) {
|
|
75224
|
+
var _child3 = _children[_j];
|
|
75225
|
+
if (_child3.name == "leftLine") {
|
|
75226
|
+
_children.splice(_j, 1);
|
|
75227
|
+
}
|
|
75228
|
+
}
|
|
75229
|
+
}
|
|
75230
|
+
}
|
|
75231
|
+
}
|
|
75232
|
+
}
|
|
75233
|
+
}
|
|
75234
|
+
}
|
|
75235
|
+
}
|
|
74948
75236
|
}, {
|
|
74949
75237
|
key: "paintCellBackground",
|
|
74950
75238
|
value: function paintCellBackground(newHeight, r, c) {
|
|
74951
|
-
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
74952
75239
|
this._backImg.x = 0;
|
|
74953
75240
|
this._backImg.y = 0;
|
|
74954
75241
|
// this._backImg.uncache();
|
|
@@ -74956,171 +75243,12 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
74956
75243
|
this._backImg.graphics.beginFill(this._cell.cellProperty.backColor === '#FFFFFF' ? 'transparent' : this._cell.cellProperty.backColor);
|
|
74957
75244
|
this._backImg.graphics.rect(1, 1, this.dWidth - 1, this.dHeight - 1);
|
|
74958
75245
|
this._backImg.graphics.endFill();
|
|
74959
|
-
|
|
74960
|
-
// const rightCell = this._cell.table.getMainCell(r, c + this._cell.colSpan)[0];
|
|
74961
|
-
// this.paintNeerByCellBorder(rightCell, this._dWidth, 0, this._dWidth, this._dHeight);
|
|
74962
|
-
// }
|
|
74963
|
-
// if (r + this._cell.rowSpan <= this._cell.table.rowCount - 1) {
|
|
74964
|
-
// const bottomCell = this._cell.table.getMainCell(r + this._cell.rowSpan, c)[0];
|
|
74965
|
-
// this.paintNeerByCellBorder(bottomCell, 0, this._dHeight, this._dWidth, this._dHeight);
|
|
74966
|
-
// }
|
|
74967
|
-
this._backImg.graphics.beginStroke(this._cell.cellProperty.gridLinesColor[0]);
|
|
74968
|
-
if (this._cell.cellProperty.isDrawGridlines) {
|
|
74969
|
-
if (!this._cell.cellProperty.printGridLines && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPreview */.Dh.psPreview && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPrint */.Dh.psPrint) {
|
|
74970
|
-
this._backImg.graphics.setStrokeDash([2, 2]);
|
|
74971
|
-
}
|
|
74972
|
-
if (this._cell.cellProperty.printGridLines || !this._cell.cellProperty.printGridLines && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPreview */.Dh.psPreview && hoEditorFactory.drawTree.paintStatus !== DrawTree/* PaintState.psPrint */.Dh.psPrint) {
|
|
74973
|
-
var x = 0.5;
|
|
74974
|
-
var y = 0.5;
|
|
74975
|
-
var dWidth = this._dWidth - 0.5;
|
|
74976
|
-
var height = newHeight - 0.5;
|
|
74977
|
-
if (this.cell.cellProperty.gridLinesStyle === TableProperty/* GridLinesStyle.solid */.he.solid) {
|
|
74978
|
-
this._backImg.graphics.setStrokeStyle(0.5);
|
|
74979
|
-
} else {
|
|
74980
|
-
this._backImg.graphics.setStrokeDash([2, 2]);
|
|
74981
|
-
}
|
|
74982
|
-
if (r > this._drawPageTable.startRow) {
|
|
74983
|
-
y = -0.5;
|
|
74984
|
-
height += 0.5;
|
|
74985
|
-
}
|
|
74986
|
-
if (c > 0) {
|
|
74987
|
-
x = -0.5;
|
|
74988
|
-
dWidth = this._dWidth + 0.5;
|
|
74989
|
-
}
|
|
74990
|
-
this._backImg.graphics.drawRect(x, y, dWidth, height);
|
|
74991
|
-
/*
|
|
74992
|
-
const gridLineDisplay = this._cell.cellProperty.gridLineDisplay;
|
|
74993
|
-
const gridLinesColor = this._cell.cellProperty.gridLinesColor;
|
|
74994
|
-
const colNo = this.cell.row.indexOf(this.cell);
|
|
74995
|
-
const rowNo = this.cell.table.rows.indexOf(this.cell.row);
|
|
74996
|
-
if (gridLineDisplay[0]) {//上边框
|
|
74997
|
-
if (rowNo == 0) {
|
|
74998
|
-
this._topLine.name = "topLine";
|
|
74999
|
-
this._topLine.graphics.clear().beginStroke(gridLinesColor[0]);
|
|
75000
|
-
if (this.cell.cellProperty.gridLinesStyle === GridLinesStyle.solid) {
|
|
75001
|
-
this._topLine.graphics.setStrokeStyle(0.5);
|
|
75002
|
-
} else {
|
|
75003
|
-
this._topLine.graphics.setStrokeDash([2, 2]);
|
|
75004
|
-
}
|
|
75005
|
-
this._topLine.graphics.moveTo(x, y).lineTo(x + dWidth, y);
|
|
75006
|
-
this._topLine.graphics.endStroke();
|
|
75007
|
-
if (!this.contains(this._topLine)) {
|
|
75008
|
-
this.addChild(this._topLine);
|
|
75009
|
-
}
|
|
75010
|
-
}
|
|
75011
|
-
} else {
|
|
75012
|
-
if (rowNo > 0) {
|
|
75013
|
-
const topCell = this._cell.table.getMainCell(rowNo - 1, colNo)[0];
|
|
75014
|
-
const drawPageCells = topCell.drawCell.drawPageCells;
|
|
75015
|
-
if (drawPageCells.length > 0) {
|
|
75016
|
-
for (let i = 0; i < drawPageCells[drawPageCells.length - 1].children.length; i++) {
|
|
75017
|
-
const child = drawPageCells[drawPageCells.length - 1].children[i];
|
|
75018
|
-
if (child.name == "bottomLine") {
|
|
75019
|
-
drawPageCells[drawPageCells.length - 1].children.splice(i, 1);
|
|
75020
|
-
}
|
|
75021
|
-
}
|
|
75022
|
-
}
|
|
75023
|
-
}
|
|
75024
|
-
}
|
|
75025
|
-
if (gridLineDisplay[1]) {//下边框
|
|
75026
|
-
this._bottomLine.name = "bottomLine";
|
|
75027
|
-
this._bottomLine.graphics.clear().beginStroke(gridLinesColor[1]);
|
|
75028
|
-
if (this.cell.cellProperty.gridLinesStyle === GridLinesStyle.solid) {
|
|
75029
|
-
this._bottomLine.graphics.setStrokeStyle(0.5);
|
|
75030
|
-
} else {
|
|
75031
|
-
this._bottomLine.graphics.setStrokeDash([2, 2]);
|
|
75032
|
-
}
|
|
75033
|
-
this._bottomLine.graphics.moveTo(x, y + height).lineTo(x + dWidth, y + height);
|
|
75034
|
-
this._bottomLine.graphics.endStroke();
|
|
75035
|
-
if (!this.contains(this._bottomLine)) {
|
|
75036
|
-
this.addChild(this._bottomLine);
|
|
75037
|
-
}
|
|
75038
|
-
} else {
|
|
75039
|
-
if (rowNo < this.cell.table.rowCount - 1) {
|
|
75040
|
-
const bottomCell = this._cell.table.getMainCell(rowNo + 1, colNo)[0];
|
|
75041
|
-
const drawPageCells = bottomCell.drawCell.drawPageCells;
|
|
75042
|
-
if (drawPageCells.length > 0) {
|
|
75043
|
-
for (let i = 0; i < drawPageCells[0].children.length; i++) {
|
|
75044
|
-
const child = drawPageCells[0].children[i];
|
|
75045
|
-
if (child.name == "topLine") {
|
|
75046
|
-
drawPageCells[0].children.splice(i, 1);
|
|
75047
|
-
}
|
|
75048
|
-
}
|
|
75049
|
-
}
|
|
75050
|
-
}
|
|
75051
|
-
}
|
|
75052
|
-
if (gridLineDisplay[2]) {//左边框
|
|
75053
|
-
if (colNo == 0) {
|
|
75054
|
-
this._leftLine.name = "leftLine";
|
|
75055
|
-
this._leftLine.graphics.clear().beginStroke(gridLinesColor[2]);
|
|
75056
|
-
if (this.cell.cellProperty.gridLinesStyle === GridLinesStyle.solid) {
|
|
75057
|
-
this._leftLine.graphics.setStrokeStyle(0.5);
|
|
75058
|
-
} else {
|
|
75059
|
-
this._leftLine.graphics.setStrokeDash([2, 2]);
|
|
75060
|
-
}
|
|
75061
|
-
this._leftLine.graphics.moveTo(x, y).lineTo(x, y + height);
|
|
75062
|
-
this._leftLine.graphics.endStroke();
|
|
75063
|
-
if (!this.contains(this._leftLine)) {
|
|
75064
|
-
this.addChild(this._leftLine);
|
|
75065
|
-
}
|
|
75066
|
-
}
|
|
75067
|
-
} else {
|
|
75068
|
-
if (colNo > 0) {
|
|
75069
|
-
const leftCell = this._cell.table.getMainCell(rowNo, colNo - 1)[0];
|
|
75070
|
-
const drawPageCells = leftCell.drawCell.drawPageCells;
|
|
75071
|
-
if (drawPageCells.length > 0) {
|
|
75072
|
-
for (let i = 0; i < drawPageCells.length; i++) {
|
|
75073
|
-
const children = drawPageCells[i].children;
|
|
75074
|
-
for (let j = 0; j < children.length; j++) {
|
|
75075
|
-
const child = children[j];
|
|
75076
|
-
if (child.name == "rightLine") {
|
|
75077
|
-
children.splice(j, 1);
|
|
75078
|
-
}
|
|
75079
|
-
}
|
|
75080
|
-
}
|
|
75081
|
-
}
|
|
75082
|
-
}
|
|
75083
|
-
}
|
|
75084
|
-
if (gridLineDisplay[3]) {//右边框
|
|
75085
|
-
this._rightLine.name = "rightLine";
|
|
75086
|
-
this._rightLine.graphics.clear().beginStroke(gridLinesColor[3]);
|
|
75087
|
-
if (this.cell.cellProperty.gridLinesStyle === GridLinesStyle.solid) {
|
|
75088
|
-
this._rightLine.graphics.setStrokeStyle(0.5);
|
|
75089
|
-
} else {
|
|
75090
|
-
this._rightLine.graphics.setStrokeDash([2, 2]);
|
|
75091
|
-
}
|
|
75092
|
-
this._rightLine.graphics.moveTo(x + dWidth, y).lineTo(x + dWidth, y + height);
|
|
75093
|
-
this._rightLine.graphics.endStroke();
|
|
75094
|
-
if (!this.contains(this._rightLine)) {
|
|
75095
|
-
this.addChild(this._rightLine);
|
|
75096
|
-
}
|
|
75097
|
-
} else {
|
|
75098
|
-
if (colNo < this.cell.table.colCount - 1) {
|
|
75099
|
-
const rightCell = this._cell.table.getMainCell(rowNo, colNo + 1)[0];
|
|
75100
|
-
const drawPageCells = rightCell.drawCell.drawPageCells;
|
|
75101
|
-
if (drawPageCells.length > 0) {
|
|
75102
|
-
for (let i = 0; i < drawPageCells.length; i++) {
|
|
75103
|
-
const children = drawPageCells[i].children;
|
|
75104
|
-
for (let j = 0; j < children.length; j++) {
|
|
75105
|
-
const child = children[j];
|
|
75106
|
-
if (child.name == "leftLine") {
|
|
75107
|
-
children.splice(j, 1);
|
|
75108
|
-
}
|
|
75109
|
-
}
|
|
75110
|
-
}
|
|
75111
|
-
}
|
|
75112
|
-
}
|
|
75113
|
-
}
|
|
75114
|
-
*/
|
|
75115
|
-
}
|
|
75116
|
-
}
|
|
75117
|
-
|
|
75118
|
-
this._backImg.graphics.endStroke();
|
|
75119
|
-
if (!this.contains(this._backImg)) {
|
|
75246
|
+
if (!this.children.includes(this._backImg)) {
|
|
75120
75247
|
this.addChildAt(this._backImg, 0);
|
|
75121
75248
|
} else {
|
|
75122
75249
|
this.setChildIndex(this._backImg, 0);
|
|
75123
75250
|
}
|
|
75251
|
+
this.paintCellBorders(newHeight, r, c);
|
|
75124
75252
|
if (this._cell.needPaintLineGrid()) this.paintLineGrid();
|
|
75125
75253
|
this.setBounds(0, 0, this._dWidth, newHeight);
|
|
75126
75254
|
// this._backImg.cache(0, 0, this._dWidth, newHeight);
|
|
@@ -75226,8 +75354,8 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
75226
75354
|
var pageTableIndex = this._cell.table.drawTable.drawPageTables.indexOf(dPageCell._drawPageTable);
|
|
75227
75355
|
var pageCellIndex = this._cell.drawCell.drawPageCells.length - 1;
|
|
75228
75356
|
var cellrestHeight = rowHeightArr[pageTableIndex][0];
|
|
75229
|
-
for (var
|
|
75230
|
-
var dObj = this._cell.drawCell.drawLines[
|
|
75357
|
+
for (var _i4 = childCount - 1; _i4 >= 0; _i4--) {
|
|
75358
|
+
var dObj = this._cell.drawCell.drawLines[_i4];
|
|
75231
75359
|
if (dObj instanceof DrawLine/* DrawLine */.a || dObj instanceof DrawPageTable/* DrawPageTable */.ox) {
|
|
75232
75360
|
while (pageCellIndex > 0 && cellrestHeight < dObj.dHeight) {
|
|
75233
75361
|
pageCellIndex -= 1;
|
|
@@ -77717,6 +77845,7 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
77717
77845
|
//职称
|
|
77718
77846
|
|
|
77719
77847
|
//日期位置 1放签名右侧 其它:放签名下面
|
|
77848
|
+
|
|
77720
77849
|
function DrawSignNode(hoeditfactoryID, rootPath, node, number, type, name, imgSrc, imgWidth, imgHeight, cbStyle, fingerPrintSrc, fingerPosition, attribute, customProperty, connectChar, otherProperties) {
|
|
77721
77850
|
var _this;
|
|
77722
77851
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, DrawSignNode);
|
|
@@ -77738,6 +77867,7 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
77738
77867
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_title", "");
|
|
77739
77868
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_drawTitle", void 0);
|
|
77740
77869
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_timePosition", "0");
|
|
77870
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_exif", null);
|
|
77741
77871
|
_this._number = number;
|
|
77742
77872
|
_this._imgSrc = imgSrc;
|
|
77743
77873
|
_this._type = type;
|
|
@@ -78274,107 +78404,112 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
|
|
|
78274
78404
|
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_10__/* .HOEditorFactorys.instance */ .b.instance().getFactory(drawNode.node.hoEditorFactoryID);
|
|
78275
78405
|
hoEditorFactory.loadImageCount++;
|
|
78276
78406
|
image.onload = function () {
|
|
78277
|
-
var
|
|
78278
|
-
|
|
78279
|
-
|
|
78280
|
-
|
|
78281
|
-
|
|
78282
|
-
|
|
78283
|
-
|
|
78284
|
-
node.imgWidth
|
|
78285
|
-
|
|
78286
|
-
|
|
78287
|
-
var width = hitWidth * hoEditorFactory.signHeight / image.naturalHeight; //+ this._drawText.getMeasuredWidth();
|
|
78288
|
-
if (node.parentNode instanceof _editor_dom_treeNode_CellNode__WEBPACK_IMPORTED_MODULE_7__/* .CellNode */ .D) {
|
|
78289
|
-
var cellWidth = node.parentNode.drawCell.dWidth;
|
|
78290
|
-
if (width > cellWidth - 5) {
|
|
78291
|
-
drawNode.dHeight = (cellWidth - 5) * hoEditorFactory.signHeight / width;
|
|
78292
|
-
width = cellWidth - 5;
|
|
78407
|
+
var handleOrientation = function handleOrientation() {
|
|
78408
|
+
var hitWidth = image.naturalWidth !== 0 ? image.naturalWidth : image.width;
|
|
78409
|
+
var hitHeight = image.naturalHeight !== 0 ? image.naturalHeight : image.height;
|
|
78410
|
+
// 处理宽高和实际宽高相反的问题 --- 2.0.66版本问题 --2.0.68后版本临时处理 再过几个版本后可以删掉
|
|
78411
|
+
var node = _this3.node;
|
|
78412
|
+
var nodeImageWidth = node.imgWidth;
|
|
78413
|
+
var nodeImageHeight = node.imgHeight;
|
|
78414
|
+
if (image.naturalWidth > image.naturalHeight && nodeImageWidth < nodeImageHeight || image.naturalWidth < image.naturalHeight && node.imgWidth > node.imgHeight) {
|
|
78415
|
+
node.imgWidth = nodeImageHeight;
|
|
78416
|
+
node.imgHeight = nodeImageWidth;
|
|
78293
78417
|
}
|
|
78294
|
-
|
|
78295
|
-
|
|
78296
|
-
|
|
78297
|
-
|
|
78298
|
-
|
|
78299
|
-
|
|
78300
|
-
|
|
78301
|
-
if (_this3._drawDate.getMeasuredWidth() > drawNode.dWidth) {
|
|
78302
|
-
drawNode.dWidth = _this3._drawDate.getMeasuredWidth();
|
|
78418
|
+
var width = hitWidth * hoEditorFactory.signHeight / image.naturalHeight; //+ this._drawText.getMeasuredWidth();
|
|
78419
|
+
if (node.parentNode instanceof _editor_dom_treeNode_CellNode__WEBPACK_IMPORTED_MODULE_7__/* .CellNode */ .D) {
|
|
78420
|
+
var cellWidth = node.parentNode.drawCell.dWidth;
|
|
78421
|
+
if (width > cellWidth - 5) {
|
|
78422
|
+
drawNode.dHeight = (cellWidth - 5) * hoEditorFactory.signHeight / width;
|
|
78423
|
+
width = cellWidth - 5;
|
|
78424
|
+
}
|
|
78303
78425
|
}
|
|
78304
|
-
|
|
78305
|
-
|
|
78306
|
-
|
|
78426
|
+
drawNode.dWidth = width;
|
|
78427
|
+
if (drawNode.attribute === 2 && drawNode.abi02 !== "") {
|
|
78428
|
+
drawNode.dWidth += drawNode._drawAbi02.getMeasuredWidth();
|
|
78429
|
+
}
|
|
78430
|
+
if (drawNode.attribute == 3 && drawNode.title != "") {
|
|
78307
78431
|
drawNode.dWidth += drawNode._drawTitle.getMeasuredWidth();
|
|
78432
|
+
if (_this3._drawDate.getMeasuredWidth() > drawNode.dWidth) {
|
|
78433
|
+
drawNode.dWidth = _this3._drawDate.getMeasuredWidth();
|
|
78434
|
+
}
|
|
78308
78435
|
}
|
|
78309
|
-
if (
|
|
78310
|
-
if (
|
|
78311
|
-
drawNode.dWidth
|
|
78312
|
-
}
|
|
78313
|
-
|
|
78436
|
+
if (drawNode.attribute === 4) {
|
|
78437
|
+
if (drawNode.title != "") {
|
|
78438
|
+
drawNode.dWidth += drawNode._drawTitle.getMeasuredWidth();
|
|
78439
|
+
}
|
|
78440
|
+
if (_this3.signTime !== "") {
|
|
78441
|
+
if (_this3.timePosition === "1") {
|
|
78442
|
+
drawNode.dWidth = drawNode.dWidth + drawNode._drawDate.getMeasuredWidth();
|
|
78443
|
+
} else {
|
|
78444
|
+
drawNode.dWidth = Math.max(drawNode.dWidth, drawNode._drawDate.getMeasuredWidth());
|
|
78445
|
+
}
|
|
78314
78446
|
}
|
|
78315
78447
|
}
|
|
78316
|
-
|
|
78317
|
-
|
|
78318
|
-
drawNode.dWidth += _this3._drawText ? _this3._drawText.getMeasuredWidth() : 0;
|
|
78319
|
-
}
|
|
78320
|
-
if (drawNode.attribute === 2 && drawNode.abi02 !== "") {
|
|
78321
|
-
bitmap.setTransform(drawNode._drawAbi02.getMeasuredWidth(), -drawNode.dHeight + 2, width / hitWidth, drawNode.dHeight / hitHeight);
|
|
78322
|
-
} else if (drawNode.attribute === 3 && drawNode.title !== "") {
|
|
78323
|
-
bitmap.setTransform(drawNode._drawTitle.getMeasuredWidth(), -drawNode.dHeight - 4, width / hitWidth, (drawNode.dHeight - drawNode._drawDate.getMeasuredHeight() - 2) / hitHeight);
|
|
78324
|
-
} else if (drawNode.attribute === 4) {
|
|
78325
|
-
var x = 0;
|
|
78326
|
-
var y = 0;
|
|
78327
|
-
var scaleY = drawNode.dHeight / hitHeight;
|
|
78328
|
-
if (drawNode.title !== "") {
|
|
78329
|
-
x = drawNode._drawTitle.getMeasuredWidth();
|
|
78330
|
-
} else {
|
|
78331
|
-
x = 0;
|
|
78448
|
+
if (_this3.number === 2) {
|
|
78449
|
+
drawNode.dWidth += _this3._drawText ? _this3._drawText.getMeasuredWidth() : 0;
|
|
78332
78450
|
}
|
|
78333
|
-
if (
|
|
78334
|
-
|
|
78335
|
-
|
|
78336
|
-
|
|
78337
|
-
|
|
78451
|
+
if (drawNode.attribute === 2 && drawNode.abi02 !== "") {
|
|
78452
|
+
bitmap.setTransform(drawNode._drawAbi02.getMeasuredWidth(), -drawNode.dHeight + 2, width / hitWidth, drawNode.dHeight / hitHeight);
|
|
78453
|
+
} else if (drawNode.attribute === 3 && drawNode.title !== "") {
|
|
78454
|
+
bitmap.setTransform(drawNode._drawTitle.getMeasuredWidth(), -drawNode.dHeight - 4, width / hitWidth, (drawNode.dHeight - drawNode._drawDate.getMeasuredHeight() - 2) / hitHeight);
|
|
78455
|
+
} else if (drawNode.attribute === 4) {
|
|
78456
|
+
var x = 0;
|
|
78457
|
+
var y = 0;
|
|
78458
|
+
var scaleY = drawNode.dHeight / hitHeight;
|
|
78459
|
+
if (drawNode.title !== "") {
|
|
78460
|
+
x = drawNode._drawTitle.getMeasuredWidth();
|
|
78461
|
+
} else {
|
|
78462
|
+
x = 0;
|
|
78463
|
+
}
|
|
78464
|
+
if (_this3.signTime === "") {
|
|
78338
78465
|
y = -drawNode.dHeight + 5;
|
|
78339
78466
|
scaleY = drawNode.dHeight / hitHeight;
|
|
78340
78467
|
} else {
|
|
78341
|
-
|
|
78342
|
-
|
|
78468
|
+
if (_this3.timePosition === "1") {
|
|
78469
|
+
y = -drawNode.dHeight + 5;
|
|
78470
|
+
scaleY = drawNode.dHeight / hitHeight;
|
|
78471
|
+
} else {
|
|
78472
|
+
y = -drawNode.dHeight - 4;
|
|
78473
|
+
scaleY = (drawNode.dHeight - drawNode._drawDate.getMeasuredHeight() - 2) / hitHeight;
|
|
78474
|
+
}
|
|
78343
78475
|
}
|
|
78344
|
-
|
|
78345
|
-
bitmap.setTransform(x, y, width / hitWidth, scaleY);
|
|
78346
|
-
} else {
|
|
78347
|
-
bitmap.setTransform(0, -drawNode.dHeight, width / hitWidth, drawNode.dHeight / hitHeight);
|
|
78348
|
-
}
|
|
78349
|
-
var hitArea = new createjs.Shape();
|
|
78350
|
-
hitArea.graphics.beginFill('#000').drawRect(0, 0, drawNode.dWidth, drawNode.dHeight); //这里是图片大小
|
|
78351
|
-
bitmap.hitArea = hitArea;
|
|
78352
|
-
// if (this.attribute !== 4) {
|
|
78353
|
-
// if (this.imgSrc.indexOf('data:image/') != -1 && this.imgSrc.indexOf('data:image/png') == -1) {
|
|
78354
|
-
// const canvas = document.createElement('canvas');
|
|
78355
|
-
// canvas.width = image.naturalWidth;
|
|
78356
|
-
// canvas.height = image.naturalHeight;
|
|
78357
|
-
// const ctx = canvas.getContext('2d') as CanvasRenderingContext2D;
|
|
78358
|
-
// ctx.fillStyle = '#FFFFFF';
|
|
78359
|
-
// ctx.fillRect(0, 0, image.naturalWidth, image.naturalHeight);
|
|
78360
|
-
// ctx.drawImage(image, 0, 0, image.naturalWidth, image.naturalHeight);
|
|
78361
|
-
// (this.node as SignNode).imgSrc = canvas.toDataURL('image/png');
|
|
78362
|
-
// }
|
|
78363
|
-
// }
|
|
78364
|
-
var dArea = hoEditorFactory.drawPageTree.getMainRootArea(drawNode);
|
|
78365
|
-
if (dArea) {
|
|
78366
|
-
var atype = hoEditorFactory.subDocManger.getHeaderFooterType(_this3.node.getNodePath());
|
|
78367
|
-
if (atype === _editor_SubDocManger__WEBPACK_IMPORTED_MODULE_9__/* .HeaderFooterType.hftHead */ .pi.hftHead && dArea != hoEditorFactory.drawTree.drawPages[dArea.index].drawHeader) {
|
|
78368
|
-
hoEditorFactory.subDocManger.copySubDocToPages(dArea, dArea.index, atype);
|
|
78476
|
+
bitmap.setTransform(x, y, width / hitWidth, scaleY);
|
|
78369
78477
|
} else {
|
|
78370
|
-
|
|
78478
|
+
bitmap.setTransform(0, -drawNode.dHeight, width / hitWidth, drawNode.dHeight / hitHeight);
|
|
78479
|
+
}
|
|
78480
|
+
var hitArea = new createjs.Shape();
|
|
78481
|
+
hitArea.graphics.beginFill('#000').drawRect(0, 0, drawNode.dWidth, drawNode.dHeight); //这里是图片大小
|
|
78482
|
+
bitmap.hitArea = hitArea;
|
|
78483
|
+
var dArea = hoEditorFactory.drawPageTree.getMainRootArea(drawNode);
|
|
78484
|
+
if (dArea) {
|
|
78485
|
+
var atype = hoEditorFactory.subDocManger.getHeaderFooterType(_this3.node.getNodePath());
|
|
78486
|
+
if (atype === _editor_SubDocManger__WEBPACK_IMPORTED_MODULE_9__/* .HeaderFooterType.hftHead */ .pi.hftHead && dArea != hoEditorFactory.drawTree.drawPages[dArea.index].drawHeader) {
|
|
78371
78487
|
hoEditorFactory.subDocManger.copySubDocToPages(dArea, dArea.index, atype);
|
|
78488
|
+
} else {
|
|
78489
|
+
if (atype === _editor_SubDocManger__WEBPACK_IMPORTED_MODULE_9__/* .HeaderFooterType.hftFoot */ .pi.hftFoot && dArea != hoEditorFactory.drawTree.drawPages[dArea.index].drawFooter) {
|
|
78490
|
+
hoEditorFactory.subDocManger.copySubDocToPages(dArea, dArea.index, atype);
|
|
78491
|
+
}
|
|
78372
78492
|
}
|
|
78493
|
+
hoEditorFactory.drawPageTree.updateDrawPage(dArea.index);
|
|
78373
78494
|
}
|
|
78374
|
-
hoEditorFactory.
|
|
78495
|
+
hoEditorFactory.loadImageCount--;
|
|
78496
|
+
};
|
|
78497
|
+
// if(this.imgSrc.includes("data:image/")) {
|
|
78498
|
+
// handleOrientation();
|
|
78499
|
+
// } else {
|
|
78500
|
+
// console.log("--------------++++++++++++++++======================")
|
|
78501
|
+
if (!_this3._exif) {
|
|
78502
|
+
_this3._exif = __webpack_require__(29794);
|
|
78503
|
+
}
|
|
78504
|
+
if (_this3._exif) {
|
|
78505
|
+
_this3._exif.getData(image, function (exifdata) {
|
|
78506
|
+
image.exifdata = exifdata;
|
|
78507
|
+
handleOrientation();
|
|
78508
|
+
});
|
|
78375
78509
|
}
|
|
78376
|
-
|
|
78510
|
+
// }
|
|
78377
78511
|
};
|
|
78512
|
+
|
|
78378
78513
|
image.onerror = function () {
|
|
78379
78514
|
return hoEditorFactory.loadImageCount--;
|
|
78380
78515
|
};
|
|
@@ -89346,30 +89481,26 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89346
89481
|
// }
|
|
89347
89482
|
//if(nodes.length == 0) return;
|
|
89348
89483
|
if (!(hoEditorFactory.drawTree.paintStatus !== _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_17__/* .PaintState.psDesign */ .Dh.psDesign && !this._isForceDelete)) {
|
|
89349
|
-
_context2.next =
|
|
89484
|
+
_context2.next = 41;
|
|
89350
89485
|
break;
|
|
89351
89486
|
}
|
|
89352
89487
|
n = 0;
|
|
89353
89488
|
case 14:
|
|
89354
89489
|
if (!(n < nodes.length)) {
|
|
89355
|
-
_context2.next =
|
|
89490
|
+
_context2.next = 40;
|
|
89356
89491
|
break;
|
|
89357
89492
|
}
|
|
89358
|
-
node = nodes[n];
|
|
89359
|
-
|
|
89360
|
-
|
|
89361
|
-
|
|
89362
|
-
}
|
|
89363
|
-
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_40__/* ["default"].warn */ .Z.warn("元素已设置为不允许删除。请先右键元素属性设置成允许删除,再进行删除操作。");
|
|
89364
|
-
this._isError = true;
|
|
89365
|
-
return _context2.abrupt("return");
|
|
89366
|
-
case 20:
|
|
89493
|
+
node = nodes[n]; // if (node instanceof MarkNode && node.parentNode instanceof TextInputFieldNode && node.MarkNodeType === 1 && !node.parentNode.isAllowDelete) {
|
|
89494
|
+
// message.warn("元素已设置为不允许删除。请先右键元素属性设置成允许删除,再进行删除操作。");
|
|
89495
|
+
// this._isError = true;
|
|
89496
|
+
// return;
|
|
89497
|
+
// }
|
|
89367
89498
|
if (!(node instanceof _dom_treeNode_ControlNode__WEBPACK_IMPORTED_MODULE_30__/* .ControlNode */ .w || node instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_22__/* .TextInputFieldNode */ .re)) {
|
|
89368
|
-
_context2.next =
|
|
89499
|
+
_context2.next = 27;
|
|
89369
89500
|
break;
|
|
89370
89501
|
}
|
|
89371
89502
|
if (node.isAllowDelete) {
|
|
89372
|
-
_context2.next =
|
|
89503
|
+
_context2.next = 27;
|
|
89373
89504
|
break;
|
|
89374
89505
|
}
|
|
89375
89506
|
tip = "";
|
|
@@ -89385,37 +89516,40 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89385
89516
|
if (node instanceof _dom_treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_33__/* .DownListNode */ .yF) {
|
|
89386
89517
|
tip = "下拉列表";
|
|
89387
89518
|
}
|
|
89519
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_40__/* ["default"].destroy */ .Z.destroy();
|
|
89388
89520
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_40__/* ["default"].warn */ .Z.warn(tip + "元素已设置为不允许删除。请先右键元素属性设置成允许删除,再进行删除操作。");
|
|
89389
89521
|
this._isError = true;
|
|
89390
89522
|
return _context2.abrupt("return");
|
|
89391
|
-
case
|
|
89523
|
+
case 27:
|
|
89392
89524
|
if (!(node instanceof _dom_treeNode_TableFormula__WEBPACK_IMPORTED_MODULE_37__/* .TableFormula */ .N)) {
|
|
89393
|
-
_context2.next =
|
|
89525
|
+
_context2.next = 32;
|
|
89394
89526
|
break;
|
|
89395
89527
|
}
|
|
89528
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_40__/* ["default"].destroy */ .Z.destroy();
|
|
89396
89529
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_40__/* ["default"].warn */ .Z.warn("不允许删除表格计算公式");
|
|
89397
89530
|
this._isError = true;
|
|
89398
89531
|
return _context2.abrupt("return");
|
|
89399
|
-
case
|
|
89532
|
+
case 32:
|
|
89400
89533
|
if (!(node instanceof _dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_35__/* .SignNode */ .N && node.isTemplate && node.number === 0)) {
|
|
89401
|
-
_context2.next =
|
|
89534
|
+
_context2.next = 37;
|
|
89402
89535
|
break;
|
|
89403
89536
|
}
|
|
89537
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_40__/* ["default"].destroy */ .Z.destroy();
|
|
89404
89538
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_40__/* ["default"].warn */ .Z.warn("该签名元素不允许删除!");
|
|
89405
89539
|
this._isError = true;
|
|
89406
89540
|
return _context2.abrupt("return");
|
|
89407
|
-
case
|
|
89541
|
+
case 37:
|
|
89408
89542
|
n++;
|
|
89409
89543
|
_context2.next = 14;
|
|
89410
89544
|
break;
|
|
89411
|
-
case
|
|
89545
|
+
case 40:
|
|
89412
89546
|
if (nodes.length === 1 && nodes[0] instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_22__/* .TextInputFieldNode */ .re && !nodes[0].isAllowDelete && nodes[0].childNodes[1] instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_23__/* .MarkNode */ .j) {
|
|
89413
89547
|
hoEditorFactory.docTree.curDomRange.setSamePath(this._endPath);
|
|
89414
89548
|
}
|
|
89415
|
-
case
|
|
89549
|
+
case 41:
|
|
89416
89550
|
pnode = (_currRange$npEnd$node = currRange.npEnd.node) === null || _currRange$npEnd$node === void 0 ? void 0 : _currRange$npEnd$node.parentNode;
|
|
89417
89551
|
if (!(pnode && pnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_22__/* .TextInputFieldNode */ .re && currRange.npEnd.path != hoEditorFactory.docTree.getNodeLastPath(pnode))) {
|
|
89418
|
-
_context2.next =
|
|
89552
|
+
_context2.next = 47;
|
|
89419
89553
|
break;
|
|
89420
89554
|
}
|
|
89421
89555
|
//判断当前TextInputField是否可编辑
|
|
@@ -89427,19 +89561,19 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89427
89561
|
// this._undo.commit();
|
|
89428
89562
|
});
|
|
89429
89563
|
if (_res[0]) {
|
|
89430
|
-
_context2.next =
|
|
89564
|
+
_context2.next = 47;
|
|
89431
89565
|
break;
|
|
89432
89566
|
}
|
|
89433
89567
|
return _context2.abrupt("return");
|
|
89434
|
-
case
|
|
89568
|
+
case 47:
|
|
89435
89569
|
changeEvent = new _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_16__/* .NodeChangeEvent */ .G(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_14__/* .DocAction.daUndoInsert */ .gk.daUndoInsert, currRange.startPath, ""); //FIXME:deleteRange函数完成后调用这个
|
|
89436
89570
|
// hoEditorFactory.docTree.deleteRange(arange.startPath, arange.endPath);
|
|
89437
89571
|
if (currRange.npStart.node && currRange.npEnd.node) {
|
|
89438
|
-
_context2.next =
|
|
89572
|
+
_context2.next = 50;
|
|
89439
89573
|
break;
|
|
89440
89574
|
}
|
|
89441
89575
|
throw _events_Exception__WEBPACK_IMPORTED_MODULE_24__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
89442
|
-
case
|
|
89576
|
+
case 50:
|
|
89443
89577
|
// const [startPath, endPath] = DomRange.skipStartEndTablePath(
|
|
89444
89578
|
// this._hoEditorFactory,
|
|
89445
89579
|
// currRange.startPath,
|
|
@@ -89451,17 +89585,17 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89451
89585
|
changeEvent.oldDrawTreeLines = new _draw_SelectRange__WEBPACK_IMPORTED_MODULE_27__/* .SelectRange */ .E(this._hoEditorFactoryID).getRangeDrawTreeLines(startPath, endPath);
|
|
89452
89586
|
res = this.deleteRange(currRange.endPath, currRange.startPath);
|
|
89453
89587
|
if (!(res == 1)) {
|
|
89454
|
-
_context2.next =
|
|
89588
|
+
_context2.next = 62;
|
|
89455
89589
|
break;
|
|
89456
89590
|
}
|
|
89457
89591
|
changeEvent.beforeChangePath = startPath;
|
|
89458
89592
|
changeEvent.afterChangePath = this._tmp.start;
|
|
89459
|
-
_context2.next =
|
|
89593
|
+
_context2.next = 60;
|
|
89460
89594
|
return hoEditorFactory.docTree.change(changeEvent);
|
|
89461
|
-
case
|
|
89595
|
+
case 60:
|
|
89462
89596
|
cgEvent = new _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_20__/* .SelectionChangeEvent */ .r(hoEditorFactory.docTree.curDomRange, new _dom_DomRange__WEBPACK_IMPORTED_MODULE_18__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.start));
|
|
89463
89597
|
hoEditorFactory.docTree.selectChange(cgEvent);
|
|
89464
|
-
case
|
|
89598
|
+
case 62:
|
|
89465
89599
|
hoEditorFactory.docTree.curDomRange.setSamePath(this._tmp.start);
|
|
89466
89600
|
hoEditorFactory.drawTree.moveCaretToPath(this._tmp.start);
|
|
89467
89601
|
aNode = currRange.npStart.node;
|
|
@@ -89469,12 +89603,12 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89469
89603
|
pnode = aNode.parentNode;
|
|
89470
89604
|
}
|
|
89471
89605
|
if (!(aNode && pnode)) {
|
|
89472
|
-
_context2.next =
|
|
89606
|
+
_context2.next = 69;
|
|
89473
89607
|
break;
|
|
89474
89608
|
}
|
|
89475
|
-
_context2.next =
|
|
89609
|
+
_context2.next = 69;
|
|
89476
89610
|
return this.ParentRepaint(pnode);
|
|
89477
|
-
case
|
|
89611
|
+
case 69:
|
|
89478
89612
|
case "end":
|
|
89479
89613
|
return _context2.stop();
|
|
89480
89614
|
}
|
|
@@ -93718,6 +93852,1094 @@ __webpack_require__(25994);
|
|
|
93718
93852
|
|
|
93719
93853
|
/***/ }),
|
|
93720
93854
|
|
|
93855
|
+
/***/ 29794:
|
|
93856
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
93857
|
+
|
|
93858
|
+
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;__webpack_require__(74916);
|
|
93859
|
+
__webpack_require__(4723);
|
|
93860
|
+
__webpack_require__(15306);
|
|
93861
|
+
__webpack_require__(75505);
|
|
93862
|
+
__webpack_require__(87714);
|
|
93863
|
+
__webpack_require__(82801);
|
|
93864
|
+
__webpack_require__(1174);
|
|
93865
|
+
__webpack_require__(18264);
|
|
93866
|
+
__webpack_require__(39575);
|
|
93867
|
+
__webpack_require__(41539);
|
|
93868
|
+
__webpack_require__(66992);
|
|
93869
|
+
__webpack_require__(82472);
|
|
93870
|
+
__webpack_require__(48675);
|
|
93871
|
+
__webpack_require__(92990);
|
|
93872
|
+
__webpack_require__(18927);
|
|
93873
|
+
__webpack_require__(33105);
|
|
93874
|
+
__webpack_require__(35035);
|
|
93875
|
+
__webpack_require__(74345);
|
|
93876
|
+
__webpack_require__(7174);
|
|
93877
|
+
__webpack_require__(63408);
|
|
93878
|
+
__webpack_require__(14590);
|
|
93879
|
+
__webpack_require__(32846);
|
|
93880
|
+
__webpack_require__(44731);
|
|
93881
|
+
__webpack_require__(77209);
|
|
93882
|
+
__webpack_require__(96319);
|
|
93883
|
+
__webpack_require__(58867);
|
|
93884
|
+
__webpack_require__(37789);
|
|
93885
|
+
__webpack_require__(33739);
|
|
93886
|
+
__webpack_require__(29368);
|
|
93887
|
+
__webpack_require__(14483);
|
|
93888
|
+
__webpack_require__(12056);
|
|
93889
|
+
__webpack_require__(3462);
|
|
93890
|
+
__webpack_require__(30678);
|
|
93891
|
+
__webpack_require__(27462);
|
|
93892
|
+
__webpack_require__(33824);
|
|
93893
|
+
__webpack_require__(55021);
|
|
93894
|
+
__webpack_require__(12974);
|
|
93895
|
+
__webpack_require__(15016);
|
|
93896
|
+
__webpack_require__(77601);
|
|
93897
|
+
__webpack_require__(9653);
|
|
93898
|
+
(function () {
|
|
93899
|
+
var debug = false;
|
|
93900
|
+
var root = this;
|
|
93901
|
+
var EXIF = function EXIF(obj) {
|
|
93902
|
+
if (obj instanceof EXIF) return obj;
|
|
93903
|
+
if (!(this instanceof EXIF)) return new EXIF(obj);
|
|
93904
|
+
this.EXIFwrapped = obj;
|
|
93905
|
+
};
|
|
93906
|
+
if (true) {
|
|
93907
|
+
if ( true && module.exports) {
|
|
93908
|
+
exports = module.exports = EXIF;
|
|
93909
|
+
}
|
|
93910
|
+
exports.EXIF = EXIF;
|
|
93911
|
+
} else {}
|
|
93912
|
+
var ExifTags = EXIF.Tags = {
|
|
93913
|
+
// version tags
|
|
93914
|
+
0x9000: 'ExifVersion',
|
|
93915
|
+
// EXIF version
|
|
93916
|
+
0xa000: 'FlashpixVersion',
|
|
93917
|
+
// Flashpix format version
|
|
93918
|
+
|
|
93919
|
+
// colorspace tags
|
|
93920
|
+
0xa001: 'ColorSpace',
|
|
93921
|
+
// Color space information tag
|
|
93922
|
+
|
|
93923
|
+
// image configuration
|
|
93924
|
+
0xa002: 'PixelXDimension',
|
|
93925
|
+
// Valid width of meaningful image
|
|
93926
|
+
0xa003: 'PixelYDimension',
|
|
93927
|
+
// Valid height of meaningful image
|
|
93928
|
+
0x9101: 'ComponentsConfiguration',
|
|
93929
|
+
// Information about channels
|
|
93930
|
+
0x9102: 'CompressedBitsPerPixel',
|
|
93931
|
+
// Compressed bits per pixel
|
|
93932
|
+
|
|
93933
|
+
// user information
|
|
93934
|
+
0x927c: 'MakerNote',
|
|
93935
|
+
// Any desired information written by the manufacturer
|
|
93936
|
+
0x9286: 'UserComment',
|
|
93937
|
+
// Comments by user
|
|
93938
|
+
|
|
93939
|
+
// related file
|
|
93940
|
+
0xa004: 'RelatedSoundFile',
|
|
93941
|
+
// Name of related sound file
|
|
93942
|
+
|
|
93943
|
+
// date and time
|
|
93944
|
+
0x9003: 'DateTimeOriginal',
|
|
93945
|
+
// Date and time when the original image was generated
|
|
93946
|
+
0x9004: 'DateTimeDigitized',
|
|
93947
|
+
// Date and time when the image was stored digitally
|
|
93948
|
+
0x9290: 'SubsecTime',
|
|
93949
|
+
// Fractions of seconds for DateTime
|
|
93950
|
+
0x9291: 'SubsecTimeOriginal',
|
|
93951
|
+
// Fractions of seconds for DateTimeOriginal
|
|
93952
|
+
0x9292: 'SubsecTimeDigitized',
|
|
93953
|
+
// Fractions of seconds for DateTimeDigitized
|
|
93954
|
+
|
|
93955
|
+
// picture-taking conditions
|
|
93956
|
+
0x829a: 'ExposureTime',
|
|
93957
|
+
// Exposure time (in seconds)
|
|
93958
|
+
0x829d: 'FNumber',
|
|
93959
|
+
// F number
|
|
93960
|
+
0x8822: 'ExposureProgram',
|
|
93961
|
+
// Exposure program
|
|
93962
|
+
0x8824: 'SpectralSensitivity',
|
|
93963
|
+
// Spectral sensitivity
|
|
93964
|
+
0x8827: 'ISOSpeedRatings',
|
|
93965
|
+
// ISO speed rating
|
|
93966
|
+
0x8828: 'OECF',
|
|
93967
|
+
// Optoelectric conversion factor
|
|
93968
|
+
0x9201: 'ShutterSpeedValue',
|
|
93969
|
+
// Shutter speed
|
|
93970
|
+
0x9202: 'ApertureValue',
|
|
93971
|
+
// Lens aperture
|
|
93972
|
+
0x9203: 'BrightnessValue',
|
|
93973
|
+
// Value of brightness
|
|
93974
|
+
0x9204: 'ExposureBias',
|
|
93975
|
+
// Exposure bias
|
|
93976
|
+
0x9205: 'MaxApertureValue',
|
|
93977
|
+
// Smallest F number of lens
|
|
93978
|
+
0x9206: 'SubjectDistance',
|
|
93979
|
+
// Distance to subject in meters
|
|
93980
|
+
0x9207: 'MeteringMode',
|
|
93981
|
+
// Metering mode
|
|
93982
|
+
0x9208: 'LightSource',
|
|
93983
|
+
// Kind of light source
|
|
93984
|
+
0x9209: 'Flash',
|
|
93985
|
+
// Flash status
|
|
93986
|
+
0x9214: 'SubjectArea',
|
|
93987
|
+
// Location and area of main subject
|
|
93988
|
+
0x920a: 'FocalLength',
|
|
93989
|
+
// Focal length of the lens in mm
|
|
93990
|
+
0xa20b: 'FlashEnergy',
|
|
93991
|
+
// Strobe energy in BCPS
|
|
93992
|
+
0xa20c: 'SpatialFrequencyResponse',
|
|
93993
|
+
//
|
|
93994
|
+
0xa20e: 'FocalPlaneXResolution',
|
|
93995
|
+
// Number of pixels in width direction per FocalPlaneResolutionUnit
|
|
93996
|
+
0xa20f: 'FocalPlaneYResolution',
|
|
93997
|
+
// Number of pixels in height direction per FocalPlaneResolutionUnit
|
|
93998
|
+
0xa210: 'FocalPlaneResolutionUnit',
|
|
93999
|
+
// Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution
|
|
94000
|
+
0xa214: 'SubjectLocation',
|
|
94001
|
+
// Location of subject in image
|
|
94002
|
+
0xa215: 'ExposureIndex',
|
|
94003
|
+
// Exposure index selected on camera
|
|
94004
|
+
0xa217: 'SensingMethod',
|
|
94005
|
+
// Image sensor type
|
|
94006
|
+
0xa300: 'FileSource',
|
|
94007
|
+
// Image source (3 == DSC)
|
|
94008
|
+
0xa301: 'SceneType',
|
|
94009
|
+
// Scene type (1 == directly photographed)
|
|
94010
|
+
0xa302: 'CFAPattern',
|
|
94011
|
+
// Color filter array geometric pattern
|
|
94012
|
+
0xa401: 'CustomRendered',
|
|
94013
|
+
// Special processing
|
|
94014
|
+
0xa402: 'ExposureMode',
|
|
94015
|
+
// Exposure mode
|
|
94016
|
+
0xa403: 'WhiteBalance',
|
|
94017
|
+
// 1 = auto white balance, 2 = manual
|
|
94018
|
+
0xa404: 'DigitalZoomRation',
|
|
94019
|
+
// Digital zoom ratio
|
|
94020
|
+
0xa405: 'FocalLengthIn35mmFilm',
|
|
94021
|
+
// Equivalent foacl length assuming 35mm film camera (in mm)
|
|
94022
|
+
0xa406: 'SceneCaptureType',
|
|
94023
|
+
// Type of scene
|
|
94024
|
+
0xa407: 'GainControl',
|
|
94025
|
+
// Degree of overall image gain adjustment
|
|
94026
|
+
0xa408: 'Contrast',
|
|
94027
|
+
// Direction of contrast processing applied by camera
|
|
94028
|
+
0xa409: 'Saturation',
|
|
94029
|
+
// Direction of saturation processing applied by camera
|
|
94030
|
+
0xa40a: 'Sharpness',
|
|
94031
|
+
// Direction of sharpness processing applied by camera
|
|
94032
|
+
0xa40b: 'DeviceSettingDescription',
|
|
94033
|
+
//
|
|
94034
|
+
0xa40c: 'SubjectDistanceRange',
|
|
94035
|
+
// Distance to subject
|
|
94036
|
+
|
|
94037
|
+
// other tags
|
|
94038
|
+
0xa005: 'InteroperabilityIFDPointer',
|
|
94039
|
+
0xa420: 'ImageUniqueID' // Identifier assigned uniquely to each image
|
|
94040
|
+
};
|
|
94041
|
+
|
|
94042
|
+
var TiffTags = EXIF.TiffTags = {
|
|
94043
|
+
0x0100: 'ImageWidth',
|
|
94044
|
+
0x0101: 'ImageHeight',
|
|
94045
|
+
0x8769: 'ExifIFDPointer',
|
|
94046
|
+
0x8825: 'GPSInfoIFDPointer',
|
|
94047
|
+
0xa005: 'InteroperabilityIFDPointer',
|
|
94048
|
+
0x0102: 'BitsPerSample',
|
|
94049
|
+
0x0103: 'Compression',
|
|
94050
|
+
0x0106: 'PhotometricInterpretation',
|
|
94051
|
+
0x0112: 'Orientation',
|
|
94052
|
+
0x0115: 'SamplesPerPixel',
|
|
94053
|
+
0x011c: 'PlanarConfiguration',
|
|
94054
|
+
0x0212: 'YCbCrSubSampling',
|
|
94055
|
+
0x0213: 'YCbCrPositioning',
|
|
94056
|
+
0x011a: 'XResolution',
|
|
94057
|
+
0x011b: 'YResolution',
|
|
94058
|
+
0x0128: 'ResolutionUnit',
|
|
94059
|
+
0x0111: 'StripOffsets',
|
|
94060
|
+
0x0116: 'RowsPerStrip',
|
|
94061
|
+
0x0117: 'StripByteCounts',
|
|
94062
|
+
0x0201: 'JPEGInterchangeFormat',
|
|
94063
|
+
0x0202: 'JPEGInterchangeFormatLength',
|
|
94064
|
+
0x012d: 'TransferFunction',
|
|
94065
|
+
0x013e: 'WhitePoint',
|
|
94066
|
+
0x013f: 'PrimaryChromaticities',
|
|
94067
|
+
0x0211: 'YCbCrCoefficients',
|
|
94068
|
+
0x0214: 'ReferenceBlackWhite',
|
|
94069
|
+
0x0132: 'DateTime',
|
|
94070
|
+
0x010e: 'ImageDescription',
|
|
94071
|
+
0x010f: 'Make',
|
|
94072
|
+
0x0110: 'Model',
|
|
94073
|
+
0x0131: 'Software',
|
|
94074
|
+
0x013b: 'Artist',
|
|
94075
|
+
0x8298: 'Copyright'
|
|
94076
|
+
};
|
|
94077
|
+
var GPSTags = EXIF.GPSTags = {
|
|
94078
|
+
0x0000: 'GPSVersionID',
|
|
94079
|
+
0x0001: 'GPSLatitudeRef',
|
|
94080
|
+
0x0002: 'GPSLatitude',
|
|
94081
|
+
0x0003: 'GPSLongitudeRef',
|
|
94082
|
+
0x0004: 'GPSLongitude',
|
|
94083
|
+
0x0005: 'GPSAltitudeRef',
|
|
94084
|
+
0x0006: 'GPSAltitude',
|
|
94085
|
+
0x0007: 'GPSTimeStamp',
|
|
94086
|
+
0x0008: 'GPSSatellites',
|
|
94087
|
+
0x0009: 'GPSStatus',
|
|
94088
|
+
0x000a: 'GPSMeasureMode',
|
|
94089
|
+
0x000b: 'GPSDOP',
|
|
94090
|
+
0x000c: 'GPSSpeedRef',
|
|
94091
|
+
0x000d: 'GPSSpeed',
|
|
94092
|
+
0x000e: 'GPSTrackRef',
|
|
94093
|
+
0x000f: 'GPSTrack',
|
|
94094
|
+
0x0010: 'GPSImgDirectionRef',
|
|
94095
|
+
0x0011: 'GPSImgDirection',
|
|
94096
|
+
0x0012: 'GPSMapDatum',
|
|
94097
|
+
0x0013: 'GPSDestLatitudeRef',
|
|
94098
|
+
0x0014: 'GPSDestLatitude',
|
|
94099
|
+
0x0015: 'GPSDestLongitudeRef',
|
|
94100
|
+
0x0016: 'GPSDestLongitude',
|
|
94101
|
+
0x0017: 'GPSDestBearingRef',
|
|
94102
|
+
0x0018: 'GPSDestBearing',
|
|
94103
|
+
0x0019: 'GPSDestDistanceRef',
|
|
94104
|
+
0x001a: 'GPSDestDistance',
|
|
94105
|
+
0x001b: 'GPSProcessingMethod',
|
|
94106
|
+
0x001c: 'GPSAreaInformation',
|
|
94107
|
+
0x001d: 'GPSDateStamp',
|
|
94108
|
+
0x001e: 'GPSDifferential'
|
|
94109
|
+
};
|
|
94110
|
+
|
|
94111
|
+
// EXIF 2.3 Spec
|
|
94112
|
+
var IFD1Tags = EXIF.IFD1Tags = {
|
|
94113
|
+
0x0100: 'ImageWidth',
|
|
94114
|
+
0x0101: 'ImageHeight',
|
|
94115
|
+
0x0102: 'BitsPerSample',
|
|
94116
|
+
0x0103: 'Compression',
|
|
94117
|
+
0x0106: 'PhotometricInterpretation',
|
|
94118
|
+
0x0111: 'StripOffsets',
|
|
94119
|
+
0x0112: 'Orientation',
|
|
94120
|
+
0x0115: 'SamplesPerPixel',
|
|
94121
|
+
0x0116: 'RowsPerStrip',
|
|
94122
|
+
0x0117: 'StripByteCounts',
|
|
94123
|
+
0x011a: 'XResolution',
|
|
94124
|
+
0x011b: 'YResolution',
|
|
94125
|
+
0x011c: 'PlanarConfiguration',
|
|
94126
|
+
0x0128: 'ResolutionUnit',
|
|
94127
|
+
0x0201: 'JpegIFOffset',
|
|
94128
|
+
// When image format is JPEG, this value show offset to JPEG data stored.(aka "ThumbnailOffset" or "JPEGInterchangeFormat")
|
|
94129
|
+
0x0202: 'JpegIFByteCount',
|
|
94130
|
+
// When image format is JPEG, this value shows data size of JPEG image (aka "ThumbnailLength" or "JPEGInterchangeFormatLength")
|
|
94131
|
+
0x0211: 'YCbCrCoefficients',
|
|
94132
|
+
0x0212: 'YCbCrSubSampling',
|
|
94133
|
+
0x0213: 'YCbCrPositioning',
|
|
94134
|
+
0x0214: 'ReferenceBlackWhite'
|
|
94135
|
+
};
|
|
94136
|
+
var StringValues = EXIF.StringValues = {
|
|
94137
|
+
ExposureProgram: {
|
|
94138
|
+
0: 'Not defined',
|
|
94139
|
+
1: 'Manual',
|
|
94140
|
+
2: 'Normal program',
|
|
94141
|
+
3: 'Aperture priority',
|
|
94142
|
+
4: 'Shutter priority',
|
|
94143
|
+
5: 'Creative program',
|
|
94144
|
+
6: 'Action program',
|
|
94145
|
+
7: 'Portrait mode',
|
|
94146
|
+
8: 'Landscape mode'
|
|
94147
|
+
},
|
|
94148
|
+
MeteringMode: {
|
|
94149
|
+
0: 'Unknown',
|
|
94150
|
+
1: 'Average',
|
|
94151
|
+
2: 'CenterWeightedAverage',
|
|
94152
|
+
3: 'Spot',
|
|
94153
|
+
4: 'MultiSpot',
|
|
94154
|
+
5: 'Pattern',
|
|
94155
|
+
6: 'Partial',
|
|
94156
|
+
255: 'Other'
|
|
94157
|
+
},
|
|
94158
|
+
LightSource: {
|
|
94159
|
+
0: 'Unknown',
|
|
94160
|
+
1: 'Daylight',
|
|
94161
|
+
2: 'Fluorescent',
|
|
94162
|
+
3: 'Tungsten (incandescent light)',
|
|
94163
|
+
4: 'Flash',
|
|
94164
|
+
9: 'Fine weather',
|
|
94165
|
+
10: 'Cloudy weather',
|
|
94166
|
+
11: 'Shade',
|
|
94167
|
+
12: 'Daylight fluorescent (D 5700 - 7100K)',
|
|
94168
|
+
13: 'Day white fluorescent (N 4600 - 5400K)',
|
|
94169
|
+
14: 'Cool white fluorescent (W 3900 - 4500K)',
|
|
94170
|
+
15: 'White fluorescent (WW 3200 - 3700K)',
|
|
94171
|
+
17: 'Standard light A',
|
|
94172
|
+
18: 'Standard light B',
|
|
94173
|
+
19: 'Standard light C',
|
|
94174
|
+
20: 'D55',
|
|
94175
|
+
21: 'D65',
|
|
94176
|
+
22: 'D75',
|
|
94177
|
+
23: 'D50',
|
|
94178
|
+
24: 'ISO studio tungsten',
|
|
94179
|
+
255: 'Other'
|
|
94180
|
+
},
|
|
94181
|
+
Flash: {
|
|
94182
|
+
0x0000: 'Flash did not fire',
|
|
94183
|
+
0x0001: 'Flash fired',
|
|
94184
|
+
0x0005: 'Strobe return light not detected',
|
|
94185
|
+
0x0007: 'Strobe return light detected',
|
|
94186
|
+
0x0009: 'Flash fired, compulsory flash mode',
|
|
94187
|
+
0x000d: 'Flash fired, compulsory flash mode, return light not detected',
|
|
94188
|
+
0x000f: 'Flash fired, compulsory flash mode, return light detected',
|
|
94189
|
+
0x0010: 'Flash did not fire, compulsory flash mode',
|
|
94190
|
+
0x0018: 'Flash did not fire, auto mode',
|
|
94191
|
+
0x0019: 'Flash fired, auto mode',
|
|
94192
|
+
0x001d: 'Flash fired, auto mode, return light not detected',
|
|
94193
|
+
0x001f: 'Flash fired, auto mode, return light detected',
|
|
94194
|
+
0x0020: 'No flash function',
|
|
94195
|
+
0x0041: 'Flash fired, red-eye reduction mode',
|
|
94196
|
+
0x0045: 'Flash fired, red-eye reduction mode, return light not detected',
|
|
94197
|
+
0x0047: 'Flash fired, red-eye reduction mode, return light detected',
|
|
94198
|
+
0x0049: 'Flash fired, compulsory flash mode, red-eye reduction mode',
|
|
94199
|
+
0x004d: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected',
|
|
94200
|
+
0x004f: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected',
|
|
94201
|
+
0x0059: 'Flash fired, auto mode, red-eye reduction mode',
|
|
94202
|
+
0x005d: 'Flash fired, auto mode, return light not detected, red-eye reduction mode',
|
|
94203
|
+
0x005f: 'Flash fired, auto mode, return light detected, red-eye reduction mode'
|
|
94204
|
+
},
|
|
94205
|
+
SensingMethod: {
|
|
94206
|
+
1: 'Not defined',
|
|
94207
|
+
2: 'One-chip color area sensor',
|
|
94208
|
+
3: 'Two-chip color area sensor',
|
|
94209
|
+
4: 'Three-chip color area sensor',
|
|
94210
|
+
5: 'Color sequential area sensor',
|
|
94211
|
+
7: 'Trilinear sensor',
|
|
94212
|
+
8: 'Color sequential linear sensor'
|
|
94213
|
+
},
|
|
94214
|
+
SceneCaptureType: {
|
|
94215
|
+
0: 'Standard',
|
|
94216
|
+
1: 'Landscape',
|
|
94217
|
+
2: 'Portrait',
|
|
94218
|
+
3: 'Night scene'
|
|
94219
|
+
},
|
|
94220
|
+
SceneType: {
|
|
94221
|
+
1: 'Directly photographed'
|
|
94222
|
+
},
|
|
94223
|
+
CustomRendered: {
|
|
94224
|
+
0: 'Normal process',
|
|
94225
|
+
1: 'Custom process'
|
|
94226
|
+
},
|
|
94227
|
+
WhiteBalance: {
|
|
94228
|
+
0: 'Auto white balance',
|
|
94229
|
+
1: 'Manual white balance'
|
|
94230
|
+
},
|
|
94231
|
+
GainControl: {
|
|
94232
|
+
0: 'None',
|
|
94233
|
+
1: 'Low gain up',
|
|
94234
|
+
2: 'High gain up',
|
|
94235
|
+
3: 'Low gain down',
|
|
94236
|
+
4: 'High gain down'
|
|
94237
|
+
},
|
|
94238
|
+
Contrast: {
|
|
94239
|
+
0: 'Normal',
|
|
94240
|
+
1: 'Soft',
|
|
94241
|
+
2: 'Hard'
|
|
94242
|
+
},
|
|
94243
|
+
Saturation: {
|
|
94244
|
+
0: 'Normal',
|
|
94245
|
+
1: 'Low saturation',
|
|
94246
|
+
2: 'High saturation'
|
|
94247
|
+
},
|
|
94248
|
+
Sharpness: {
|
|
94249
|
+
0: 'Normal',
|
|
94250
|
+
1: 'Soft',
|
|
94251
|
+
2: 'Hard'
|
|
94252
|
+
},
|
|
94253
|
+
SubjectDistanceRange: {
|
|
94254
|
+
0: 'Unknown',
|
|
94255
|
+
1: 'Macro',
|
|
94256
|
+
2: 'Close view',
|
|
94257
|
+
3: 'Distant view'
|
|
94258
|
+
},
|
|
94259
|
+
FileSource: {
|
|
94260
|
+
3: 'DSC'
|
|
94261
|
+
},
|
|
94262
|
+
Components: {
|
|
94263
|
+
0: '',
|
|
94264
|
+
1: 'Y',
|
|
94265
|
+
2: 'Cb',
|
|
94266
|
+
3: 'Cr',
|
|
94267
|
+
4: 'R',
|
|
94268
|
+
5: 'G',
|
|
94269
|
+
6: 'B'
|
|
94270
|
+
}
|
|
94271
|
+
};
|
|
94272
|
+
function addEvent(element, event, handler) {
|
|
94273
|
+
if (element.addEventListener) {
|
|
94274
|
+
element.addEventListener(event, handler, false);
|
|
94275
|
+
} else if (element.attachEvent) {
|
|
94276
|
+
element.attachEvent('on' + event, handler);
|
|
94277
|
+
}
|
|
94278
|
+
}
|
|
94279
|
+
function imageHasData(img) {
|
|
94280
|
+
return !!img.exifdata;
|
|
94281
|
+
}
|
|
94282
|
+
function base64ToArrayBuffer(base64, contentType) {
|
|
94283
|
+
contentType = contentType || base64.match(/^data\:([^\;]+)\;base64,/im)[1] || ''; // e.g. 'data:image/jpeg;base64,...' => 'image/jpeg'
|
|
94284
|
+
base64 = base64.replace(/^data\:([^\;]+)\;base64,/gim, '');
|
|
94285
|
+
var binary = atob(base64);
|
|
94286
|
+
var len = binary.length;
|
|
94287
|
+
var buffer = new ArrayBuffer(len);
|
|
94288
|
+
var view = new Uint8Array(buffer);
|
|
94289
|
+
for (var i = 0; i < len; i++) {
|
|
94290
|
+
view[i] = binary.charCodeAt(i);
|
|
94291
|
+
}
|
|
94292
|
+
return buffer;
|
|
94293
|
+
}
|
|
94294
|
+
function objectURLToBlob(url, callback) {
|
|
94295
|
+
var http = new XMLHttpRequest();
|
|
94296
|
+
http.open('GET', url, true);
|
|
94297
|
+
http.responseType = 'blob';
|
|
94298
|
+
http.onload = function (e) {
|
|
94299
|
+
if (this.status == 200 || this.status === 0) {
|
|
94300
|
+
callback(this.response);
|
|
94301
|
+
}
|
|
94302
|
+
};
|
|
94303
|
+
http.send();
|
|
94304
|
+
}
|
|
94305
|
+
function getImageData(img, callback) {
|
|
94306
|
+
function handleBinaryFile(binFile) {
|
|
94307
|
+
var data = findEXIFinJPEG(binFile);
|
|
94308
|
+
// img.exifdata = data || {};
|
|
94309
|
+
// var iptcdata = findIPTCinJPEG(binFile);
|
|
94310
|
+
// img.iptcdata = iptcdata || {};
|
|
94311
|
+
// if (EXIF.isXmpEnabled) {
|
|
94312
|
+
// var xmpdata= findXMPinJPEG(binFile);
|
|
94313
|
+
// img.xmpdata = xmpdata || {};
|
|
94314
|
+
// }
|
|
94315
|
+
if (callback) {
|
|
94316
|
+
callback(data || {});
|
|
94317
|
+
}
|
|
94318
|
+
}
|
|
94319
|
+
if (img.src) {
|
|
94320
|
+
if (/^data\:/i.test(img.src)) {
|
|
94321
|
+
// Data URI
|
|
94322
|
+
var arrayBuffer = base64ToArrayBuffer(img.src);
|
|
94323
|
+
handleBinaryFile(arrayBuffer);
|
|
94324
|
+
} else if (/^blob\:/i.test(img.src)) {
|
|
94325
|
+
// Object URL
|
|
94326
|
+
var fileReader = new FileReader();
|
|
94327
|
+
fileReader.onload = function (e) {
|
|
94328
|
+
handleBinaryFile(e.target.result);
|
|
94329
|
+
};
|
|
94330
|
+
objectURLToBlob(img.src, function (blob) {
|
|
94331
|
+
fileReader.readAsArrayBuffer(blob);
|
|
94332
|
+
});
|
|
94333
|
+
} else {
|
|
94334
|
+
var http = new XMLHttpRequest();
|
|
94335
|
+
http.onload = function () {
|
|
94336
|
+
if (this.status == 200 || this.status === 0) {
|
|
94337
|
+
handleBinaryFile(http.response);
|
|
94338
|
+
} else {
|
|
94339
|
+
throw 'Could not load image';
|
|
94340
|
+
}
|
|
94341
|
+
http = null;
|
|
94342
|
+
};
|
|
94343
|
+
http.open('GET', img.src, true);
|
|
94344
|
+
http.responseType = 'arraybuffer';
|
|
94345
|
+
http.send(null);
|
|
94346
|
+
}
|
|
94347
|
+
} else if (self.FileReader && (img instanceof self.Blob || img instanceof self.File)) {
|
|
94348
|
+
var fileReader = new FileReader();
|
|
94349
|
+
fileReader.onload = function (e) {
|
|
94350
|
+
if (debug) {}
|
|
94351
|
+
handleBinaryFile(e.target.result);
|
|
94352
|
+
};
|
|
94353
|
+
fileReader.readAsArrayBuffer(img);
|
|
94354
|
+
}
|
|
94355
|
+
}
|
|
94356
|
+
function findEXIFinJPEG(file) {
|
|
94357
|
+
var dataView = new DataView(file);
|
|
94358
|
+
if (debug) {}
|
|
94359
|
+
if (dataView.getUint8(0) != 0xff || dataView.getUint8(1) != 0xd8) {
|
|
94360
|
+
if (debug) {}
|
|
94361
|
+
return false; // not a valid jpeg
|
|
94362
|
+
}
|
|
94363
|
+
|
|
94364
|
+
var offset = 2,
|
|
94365
|
+
length = file.byteLength,
|
|
94366
|
+
marker;
|
|
94367
|
+
while (offset < length) {
|
|
94368
|
+
if (dataView.getUint8(offset) != 0xff) {
|
|
94369
|
+
if (debug) {}
|
|
94370
|
+
return false; // not a valid marker, something is wrong
|
|
94371
|
+
}
|
|
94372
|
+
|
|
94373
|
+
marker = dataView.getUint8(offset + 1);
|
|
94374
|
+
if (debug) {}
|
|
94375
|
+
|
|
94376
|
+
// we could implement handling for other markers here,
|
|
94377
|
+
// but we're only looking for 0xFFE1 for EXIF data
|
|
94378
|
+
|
|
94379
|
+
if (marker == 225) {
|
|
94380
|
+
if (debug) {}
|
|
94381
|
+
return readEXIFData(dataView, offset + 4, dataView.getUint16(offset + 2) - 2);
|
|
94382
|
+
|
|
94383
|
+
// offset += 2 + file.getShortAt(offset+2, true);
|
|
94384
|
+
} else {
|
|
94385
|
+
offset += 2 + dataView.getUint16(offset + 2);
|
|
94386
|
+
}
|
|
94387
|
+
}
|
|
94388
|
+
}
|
|
94389
|
+
/**
|
|
94390
|
+
function findIPTCinJPEG(file) {
|
|
94391
|
+
var dataView = new DataView(file);
|
|
94392
|
+
if (debug) console.log("Got file of length " + file.byteLength);
|
|
94393
|
+
if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {
|
|
94394
|
+
if (debug) console.log("Not a valid JPEG");
|
|
94395
|
+
return false; // not a valid jpeg
|
|
94396
|
+
}
|
|
94397
|
+
var offset = 2,
|
|
94398
|
+
length = file.byteLength;
|
|
94399
|
+
var isFieldSegmentStart = function(dataView, offset){
|
|
94400
|
+
return (
|
|
94401
|
+
dataView.getUint8(offset) === 0x38 &&
|
|
94402
|
+
dataView.getUint8(offset+1) === 0x42 &&
|
|
94403
|
+
dataView.getUint8(offset+2) === 0x49 &&
|
|
94404
|
+
dataView.getUint8(offset+3) === 0x4D &&
|
|
94405
|
+
dataView.getUint8(offset+4) === 0x04 &&
|
|
94406
|
+
dataView.getUint8(offset+5) === 0x04
|
|
94407
|
+
);
|
|
94408
|
+
};
|
|
94409
|
+
while (offset < length) {
|
|
94410
|
+
if ( isFieldSegmentStart(dataView, offset )){
|
|
94411
|
+
// Get the length of the name header (which is padded to an even number of bytes)
|
|
94412
|
+
var nameHeaderLength = dataView.getUint8(offset+7);
|
|
94413
|
+
if(nameHeaderLength % 2 !== 0) nameHeaderLength += 1;
|
|
94414
|
+
// Check for pre photoshop 6 format
|
|
94415
|
+
if(nameHeaderLength === 0) {
|
|
94416
|
+
// Always 4
|
|
94417
|
+
nameHeaderLength = 4;
|
|
94418
|
+
}
|
|
94419
|
+
var startOffset = offset + 8 + nameHeaderLength;
|
|
94420
|
+
var sectionLength = dataView.getUint16(offset + 6 + nameHeaderLength);
|
|
94421
|
+
return readIPTCData(file, startOffset, sectionLength);
|
|
94422
|
+
break;
|
|
94423
|
+
}
|
|
94424
|
+
// Not the marker, continue searching
|
|
94425
|
+
offset++;
|
|
94426
|
+
}
|
|
94427
|
+
}
|
|
94428
|
+
var IptcFieldMap = {
|
|
94429
|
+
0x78 : 'caption',
|
|
94430
|
+
0x6E : 'credit',
|
|
94431
|
+
0x19 : 'keywords',
|
|
94432
|
+
0x37 : 'dateCreated',
|
|
94433
|
+
0x50 : 'byline',
|
|
94434
|
+
0x55 : 'bylineTitle',
|
|
94435
|
+
0x7A : 'captionWriter',
|
|
94436
|
+
0x69 : 'headline',
|
|
94437
|
+
0x74 : 'copyright',
|
|
94438
|
+
0x0F : 'category'
|
|
94439
|
+
};
|
|
94440
|
+
function readIPTCData(file, startOffset, sectionLength){
|
|
94441
|
+
var dataView = new DataView(file);
|
|
94442
|
+
var data = {};
|
|
94443
|
+
var fieldValue, fieldName, dataSize, segmentType, segmentSize;
|
|
94444
|
+
var segmentStartPos = startOffset;
|
|
94445
|
+
while(segmentStartPos < startOffset+sectionLength) {
|
|
94446
|
+
if(dataView.getUint8(segmentStartPos) === 0x1C && dataView.getUint8(segmentStartPos+1) === 0x02){
|
|
94447
|
+
segmentType = dataView.getUint8(segmentStartPos+2);
|
|
94448
|
+
if(segmentType in IptcFieldMap) {
|
|
94449
|
+
dataSize = dataView.getInt16(segmentStartPos+3);
|
|
94450
|
+
segmentSize = dataSize + 5;
|
|
94451
|
+
fieldName = IptcFieldMap[segmentType];
|
|
94452
|
+
fieldValue = getStringFromDB(dataView, segmentStartPos+5, dataSize);
|
|
94453
|
+
// Check if we already stored a value with this name
|
|
94454
|
+
if(data.hasOwnProperty(fieldName)) {
|
|
94455
|
+
// Value already stored with this name, create multivalue field
|
|
94456
|
+
if(data[fieldName] instanceof Array) {
|
|
94457
|
+
data[fieldName].push(fieldValue);
|
|
94458
|
+
}
|
|
94459
|
+
else {
|
|
94460
|
+
data[fieldName] = [data[fieldName], fieldValue];
|
|
94461
|
+
}
|
|
94462
|
+
}
|
|
94463
|
+
else {
|
|
94464
|
+
data[fieldName] = fieldValue;
|
|
94465
|
+
}
|
|
94466
|
+
}
|
|
94467
|
+
}
|
|
94468
|
+
segmentStartPos++;
|
|
94469
|
+
}
|
|
94470
|
+
return data;
|
|
94471
|
+
}
|
|
94472
|
+
*/
|
|
94473
|
+
|
|
94474
|
+
function readTags(file, tiffStart, dirStart, strings, bigEnd) {
|
|
94475
|
+
var entries = file.getUint16(dirStart, !bigEnd),
|
|
94476
|
+
tags = {},
|
|
94477
|
+
entryOffset,
|
|
94478
|
+
tag,
|
|
94479
|
+
i;
|
|
94480
|
+
for (i = 0; i < entries; i++) {
|
|
94481
|
+
entryOffset = dirStart + i * 12 + 2;
|
|
94482
|
+
tag = strings[file.getUint16(entryOffset, !bigEnd)];
|
|
94483
|
+
if (!tag && debug) {}
|
|
94484
|
+
if (tag) {
|
|
94485
|
+
tags[tag] = readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd);
|
|
94486
|
+
}
|
|
94487
|
+
}
|
|
94488
|
+
return tags;
|
|
94489
|
+
}
|
|
94490
|
+
function readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd) {
|
|
94491
|
+
var type = file.getUint16(entryOffset + 2, !bigEnd),
|
|
94492
|
+
numValues = file.getUint32(entryOffset + 4, !bigEnd),
|
|
94493
|
+
valueOffset = file.getUint32(entryOffset + 8, !bigEnd) + tiffStart,
|
|
94494
|
+
offset,
|
|
94495
|
+
vals,
|
|
94496
|
+
val,
|
|
94497
|
+
n,
|
|
94498
|
+
numerator,
|
|
94499
|
+
denominator;
|
|
94500
|
+
switch (type) {
|
|
94501
|
+
case 1: // byte, 8-bit unsigned int
|
|
94502
|
+
case 7:
|
|
94503
|
+
// undefined, 8-bit byte, value depending on field
|
|
94504
|
+
if (numValues == 1) {
|
|
94505
|
+
return file.getUint8(entryOffset + 8, !bigEnd);
|
|
94506
|
+
} else {
|
|
94507
|
+
offset = numValues > 4 ? valueOffset : entryOffset + 8;
|
|
94508
|
+
vals = [];
|
|
94509
|
+
for (n = 0; n < numValues; n++) {
|
|
94510
|
+
vals[n] = file.getUint8(offset + n);
|
|
94511
|
+
}
|
|
94512
|
+
return vals;
|
|
94513
|
+
}
|
|
94514
|
+
case 2:
|
|
94515
|
+
// ascii, 8-bit byte
|
|
94516
|
+
offset = numValues > 4 ? valueOffset : entryOffset + 8;
|
|
94517
|
+
return getStringFromDB(file, offset, numValues - 1);
|
|
94518
|
+
case 3:
|
|
94519
|
+
// short, 16 bit int
|
|
94520
|
+
if (numValues == 1) {
|
|
94521
|
+
return file.getUint16(entryOffset + 8, !bigEnd);
|
|
94522
|
+
} else {
|
|
94523
|
+
offset = numValues > 2 ? valueOffset : entryOffset + 8;
|
|
94524
|
+
vals = [];
|
|
94525
|
+
for (n = 0; n < numValues; n++) {
|
|
94526
|
+
vals[n] = file.getUint16(offset + 2 * n, !bigEnd);
|
|
94527
|
+
}
|
|
94528
|
+
return vals;
|
|
94529
|
+
}
|
|
94530
|
+
case 4:
|
|
94531
|
+
// long, 32 bit int
|
|
94532
|
+
if (numValues == 1) {
|
|
94533
|
+
return file.getUint32(entryOffset + 8, !bigEnd);
|
|
94534
|
+
} else {
|
|
94535
|
+
vals = [];
|
|
94536
|
+
for (n = 0; n < numValues; n++) {
|
|
94537
|
+
vals[n] = file.getUint32(valueOffset + 4 * n, !bigEnd);
|
|
94538
|
+
}
|
|
94539
|
+
return vals;
|
|
94540
|
+
}
|
|
94541
|
+
case 5:
|
|
94542
|
+
// rational = two long values, first is numerator, second is denominator
|
|
94543
|
+
if (numValues == 1) {
|
|
94544
|
+
numerator = file.getUint32(valueOffset, !bigEnd);
|
|
94545
|
+
denominator = file.getUint32(valueOffset + 4, !bigEnd);
|
|
94546
|
+
val = new Number(numerator / denominator);
|
|
94547
|
+
val.numerator = numerator;
|
|
94548
|
+
val.denominator = denominator;
|
|
94549
|
+
return val;
|
|
94550
|
+
} else {
|
|
94551
|
+
vals = [];
|
|
94552
|
+
for (n = 0; n < numValues; n++) {
|
|
94553
|
+
numerator = file.getUint32(valueOffset + 8 * n, !bigEnd);
|
|
94554
|
+
denominator = file.getUint32(valueOffset + 4 + 8 * n, !bigEnd);
|
|
94555
|
+
vals[n] = new Number(numerator / denominator);
|
|
94556
|
+
vals[n].numerator = numerator;
|
|
94557
|
+
vals[n].denominator = denominator;
|
|
94558
|
+
}
|
|
94559
|
+
return vals;
|
|
94560
|
+
}
|
|
94561
|
+
case 9:
|
|
94562
|
+
// slong, 32 bit signed int
|
|
94563
|
+
if (numValues == 1) {
|
|
94564
|
+
return file.getInt32(entryOffset + 8, !bigEnd);
|
|
94565
|
+
} else {
|
|
94566
|
+
vals = [];
|
|
94567
|
+
for (n = 0; n < numValues; n++) {
|
|
94568
|
+
vals[n] = file.getInt32(valueOffset + 4 * n, !bigEnd);
|
|
94569
|
+
}
|
|
94570
|
+
return vals;
|
|
94571
|
+
}
|
|
94572
|
+
case 10:
|
|
94573
|
+
// signed rational, two slongs, first is numerator, second is denominator
|
|
94574
|
+
if (numValues == 1) {
|
|
94575
|
+
return file.getInt32(valueOffset, !bigEnd) / file.getInt32(valueOffset + 4, !bigEnd);
|
|
94576
|
+
} else {
|
|
94577
|
+
vals = [];
|
|
94578
|
+
for (n = 0; n < numValues; n++) {
|
|
94579
|
+
vals[n] = file.getInt32(valueOffset + 8 * n, !bigEnd) / file.getInt32(valueOffset + 4 + 8 * n, !bigEnd);
|
|
94580
|
+
}
|
|
94581
|
+
return vals;
|
|
94582
|
+
}
|
|
94583
|
+
}
|
|
94584
|
+
}
|
|
94585
|
+
|
|
94586
|
+
/**
|
|
94587
|
+
* Given an IFD (Image File Directory) start offset
|
|
94588
|
+
* returns an offset to next IFD or 0 if it's the last IFD.
|
|
94589
|
+
*/
|
|
94590
|
+
function getNextIFDOffset(dataView, dirStart, bigEnd) {
|
|
94591
|
+
//the first 2bytes means the number of directory entries contains in this IFD
|
|
94592
|
+
var entries = dataView.getUint16(dirStart, !bigEnd);
|
|
94593
|
+
|
|
94594
|
+
// After last directory entry, there is a 4bytes of data,
|
|
94595
|
+
// it means an offset to next IFD.
|
|
94596
|
+
// If its value is '0x00000000', it means this is the last IFD and there is no linked IFD.
|
|
94597
|
+
|
|
94598
|
+
return dataView.getUint32(dirStart + 2 + entries * 12, !bigEnd); // each entry is 12 bytes long
|
|
94599
|
+
}
|
|
94600
|
+
|
|
94601
|
+
function readThumbnailImage(dataView, tiffStart, firstIFDOffset, bigEnd) {
|
|
94602
|
+
// get the IFD1 offset
|
|
94603
|
+
var IFD1OffsetPointer = getNextIFDOffset(dataView, tiffStart + firstIFDOffset, bigEnd);
|
|
94604
|
+
if (!IFD1OffsetPointer) {
|
|
94605
|
+
// console.log('******** IFD1Offset is empty, image thumb not found ********');
|
|
94606
|
+
return {};
|
|
94607
|
+
} else if (IFD1OffsetPointer > dataView.byteLength) {
|
|
94608
|
+
// this should not happen
|
|
94609
|
+
// console.log('******** IFD1Offset is outside the bounds of the DataView ********');
|
|
94610
|
+
return {};
|
|
94611
|
+
}
|
|
94612
|
+
// console.log('******* thumbnail IFD offset (IFD1) is: %s', IFD1OffsetPointer);
|
|
94613
|
+
|
|
94614
|
+
var thumbTags = readTags(dataView, tiffStart, tiffStart + IFD1OffsetPointer, IFD1Tags, bigEnd);
|
|
94615
|
+
|
|
94616
|
+
// EXIF 2.3 specification for JPEG format thumbnail
|
|
94617
|
+
|
|
94618
|
+
// If the value of Compression(0x0103) Tag in IFD1 is '6', thumbnail image format is JPEG.
|
|
94619
|
+
// Most of Exif image uses JPEG format for thumbnail. In that case, you can get offset of thumbnail
|
|
94620
|
+
// by JpegIFOffset(0x0201) Tag in IFD1, size of thumbnail by JpegIFByteCount(0x0202) Tag.
|
|
94621
|
+
// Data format is ordinary JPEG format, starts from 0xFFD8 and ends by 0xFFD9. It seems that
|
|
94622
|
+
// JPEG format and 160x120pixels of size are recommended thumbnail format for Exif2.1 or later.
|
|
94623
|
+
|
|
94624
|
+
if (thumbTags['Compression']) {
|
|
94625
|
+
// console.log('Thumbnail image found!');
|
|
94626
|
+
|
|
94627
|
+
switch (thumbTags['Compression']) {
|
|
94628
|
+
case 6:
|
|
94629
|
+
// console.log('Thumbnail image format is JPEG');
|
|
94630
|
+
if (thumbTags.JpegIFOffset && thumbTags.JpegIFByteCount) {
|
|
94631
|
+
// extract the thumbnail
|
|
94632
|
+
var tOffset = tiffStart + thumbTags.JpegIFOffset;
|
|
94633
|
+
var tLength = thumbTags.JpegIFByteCount;
|
|
94634
|
+
thumbTags['blob'] = new Blob([new Uint8Array(dataView.buffer, tOffset, tLength)], {
|
|
94635
|
+
type: 'image/jpeg'
|
|
94636
|
+
});
|
|
94637
|
+
}
|
|
94638
|
+
break;
|
|
94639
|
+
case 1:
|
|
94640
|
+
break;
|
|
94641
|
+
default:
|
|
94642
|
+
}
|
|
94643
|
+
} else if (thumbTags['PhotometricInterpretation'] == 2) {}
|
|
94644
|
+
return thumbTags;
|
|
94645
|
+
}
|
|
94646
|
+
function getStringFromDB(buffer, start, length) {
|
|
94647
|
+
var outstr = '';
|
|
94648
|
+
for (var n = start; n < start + length; n++) {
|
|
94649
|
+
outstr += String.fromCharCode(buffer.getUint8(n));
|
|
94650
|
+
}
|
|
94651
|
+
return outstr;
|
|
94652
|
+
}
|
|
94653
|
+
function readEXIFData(file, start) {
|
|
94654
|
+
if (getStringFromDB(file, start, 4) != 'Exif') {
|
|
94655
|
+
if (debug) {}
|
|
94656
|
+
return false;
|
|
94657
|
+
}
|
|
94658
|
+
var bigEnd,
|
|
94659
|
+
tags,
|
|
94660
|
+
tag,
|
|
94661
|
+
exifData,
|
|
94662
|
+
gpsData,
|
|
94663
|
+
tiffOffset = start + 6;
|
|
94664
|
+
|
|
94665
|
+
// test for TIFF validity and endianness
|
|
94666
|
+
if (file.getUint16(tiffOffset) == 0x4949) {
|
|
94667
|
+
bigEnd = false;
|
|
94668
|
+
} else if (file.getUint16(tiffOffset) == 0x4d4d) {
|
|
94669
|
+
bigEnd = true;
|
|
94670
|
+
} else {
|
|
94671
|
+
if (debug) {}
|
|
94672
|
+
return false;
|
|
94673
|
+
}
|
|
94674
|
+
if (file.getUint16(tiffOffset + 2, !bigEnd) != 0x002a) {
|
|
94675
|
+
if (debug) {}
|
|
94676
|
+
return false;
|
|
94677
|
+
}
|
|
94678
|
+
var firstIFDOffset = file.getUint32(tiffOffset + 4, !bigEnd);
|
|
94679
|
+
if (firstIFDOffset < 0x00000008) {
|
|
94680
|
+
if (debug) {}
|
|
94681
|
+
return false;
|
|
94682
|
+
}
|
|
94683
|
+
tags = readTags(file, tiffOffset, tiffOffset + firstIFDOffset, TiffTags, bigEnd);
|
|
94684
|
+
|
|
94685
|
+
/**
|
|
94686
|
+
if (tags.ExifIFDPointer) {
|
|
94687
|
+
exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd);
|
|
94688
|
+
console.log(exifData, "22222222222222");
|
|
94689
|
+
for (tag in exifData) {
|
|
94690
|
+
switch (tag) {
|
|
94691
|
+
case 'LightSource':
|
|
94692
|
+
case 'Flash':
|
|
94693
|
+
case 'MeteringMode':
|
|
94694
|
+
case 'ExposureProgram':
|
|
94695
|
+
case 'SensingMethod':
|
|
94696
|
+
case 'SceneCaptureType':
|
|
94697
|
+
case 'SceneType':
|
|
94698
|
+
case 'CustomRendered':
|
|
94699
|
+
case 'WhiteBalance':
|
|
94700
|
+
case 'GainControl':
|
|
94701
|
+
case 'Contrast':
|
|
94702
|
+
case 'Saturation':
|
|
94703
|
+
case 'Sharpness':
|
|
94704
|
+
case 'SubjectDistanceRange':
|
|
94705
|
+
case 'FileSource':
|
|
94706
|
+
exifData[tag] = StringValues[tag][exifData[tag]];
|
|
94707
|
+
break;
|
|
94708
|
+
case 'ExifVersion':
|
|
94709
|
+
case 'FlashpixVersion':
|
|
94710
|
+
exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3]);
|
|
94711
|
+
break;
|
|
94712
|
+
case 'ComponentsConfiguration':
|
|
94713
|
+
exifData[tag] =
|
|
94714
|
+
StringValues.Components[exifData[tag][0]] +
|
|
94715
|
+
StringValues.Components[exifData[tag][1]] +
|
|
94716
|
+
StringValues.Components[exifData[tag][2]] +
|
|
94717
|
+
StringValues.Components[exifData[tag][3]];
|
|
94718
|
+
break;
|
|
94719
|
+
}
|
|
94720
|
+
tags[tag] = exifData[tag];
|
|
94721
|
+
}
|
|
94722
|
+
}
|
|
94723
|
+
*/
|
|
94724
|
+
if (tags.GPSInfoIFDPointer) {
|
|
94725
|
+
gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd);
|
|
94726
|
+
for (tag in gpsData) {
|
|
94727
|
+
switch (tag) {
|
|
94728
|
+
case 'GPSVersionID':
|
|
94729
|
+
gpsData[tag] = gpsData[tag][0] + '.' + gpsData[tag][1] + '.' + gpsData[tag][2] + '.' + gpsData[tag][3];
|
|
94730
|
+
break;
|
|
94731
|
+
}
|
|
94732
|
+
tags[tag] = gpsData[tag];
|
|
94733
|
+
}
|
|
94734
|
+
}
|
|
94735
|
+
|
|
94736
|
+
// extract thumbnail
|
|
94737
|
+
tags['thumbnail'] = readThumbnailImage(file, tiffOffset, firstIFDOffset, bigEnd);
|
|
94738
|
+
return tags;
|
|
94739
|
+
}
|
|
94740
|
+
/**
|
|
94741
|
+
function findXMPinJPEG(file) {
|
|
94742
|
+
if (!('DOMParser' in self)) {
|
|
94743
|
+
// console.warn('XML parsing not supported without DOMParser');
|
|
94744
|
+
return;
|
|
94745
|
+
}
|
|
94746
|
+
var dataView = new DataView(file);
|
|
94747
|
+
if (debug) console.log('Got file of length ' + file.byteLength);
|
|
94748
|
+
if (dataView.getUint8(0) != 0xff || dataView.getUint8(1) != 0xd8) {
|
|
94749
|
+
if (debug) console.log('Not a valid JPEG');
|
|
94750
|
+
return false; // not a valid jpeg
|
|
94751
|
+
}
|
|
94752
|
+
var offset = 2,
|
|
94753
|
+
length = file.byteLength,
|
|
94754
|
+
dom = new DOMParser();
|
|
94755
|
+
while (offset < length - 4) {
|
|
94756
|
+
if (getStringFromDB(dataView, offset, 4) == 'http') {
|
|
94757
|
+
var startOffset = offset - 1;
|
|
94758
|
+
var sectionLength = dataView.getUint16(offset - 2) - 1;
|
|
94759
|
+
var xmpString = getStringFromDB(dataView, startOffset, sectionLength);
|
|
94760
|
+
var xmpEndIndex = xmpString.indexOf('xmpmeta>') + 8;
|
|
94761
|
+
xmpString = xmpString.substring(xmpString.indexOf('<x:xmpmeta'), xmpEndIndex);
|
|
94762
|
+
var indexOfXmp = xmpString.indexOf('x:xmpmeta') + 10;
|
|
94763
|
+
//Many custom written programs embed xmp/xml without any namespace. Following are some of them.
|
|
94764
|
+
//Without these namespaces, XML is thought to be invalid by parsers
|
|
94765
|
+
xmpString =
|
|
94766
|
+
xmpString.slice(0, indexOfXmp) +
|
|
94767
|
+
'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" ' +
|
|
94768
|
+
'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
|
|
94769
|
+
'xmlns:tiff="http://ns.adobe.com/tiff/1.0/" ' +
|
|
94770
|
+
'xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" ' +
|
|
94771
|
+
'xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" ' +
|
|
94772
|
+
'xmlns:exif="http://ns.adobe.com/exif/1.0/" ' +
|
|
94773
|
+
'xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" ' +
|
|
94774
|
+
'xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" ' +
|
|
94775
|
+
'xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" ' +
|
|
94776
|
+
'xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" ' +
|
|
94777
|
+
'xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" ' +
|
|
94778
|
+
xmpString.slice(indexOfXmp);
|
|
94779
|
+
var domDocument = dom.parseFromString(xmpString, 'text/xml');
|
|
94780
|
+
return xml2Object(domDocument);
|
|
94781
|
+
} else {
|
|
94782
|
+
offset++;
|
|
94783
|
+
}
|
|
94784
|
+
}
|
|
94785
|
+
}
|
|
94786
|
+
function xml2json(xml) {
|
|
94787
|
+
var json = {};
|
|
94788
|
+
if (xml.nodeType == 1) {
|
|
94789
|
+
// element node
|
|
94790
|
+
if (xml.attributes.length > 0) {
|
|
94791
|
+
json['@attributes'] = {};
|
|
94792
|
+
for (var j = 0; j < xml.attributes.length; j++) {
|
|
94793
|
+
var attribute = xml.attributes.item(j);
|
|
94794
|
+
json['@attributes'][attribute.nodeName] = attribute.nodeValue;
|
|
94795
|
+
}
|
|
94796
|
+
}
|
|
94797
|
+
} else if (xml.nodeType == 3) {
|
|
94798
|
+
// text node
|
|
94799
|
+
return xml.nodeValue;
|
|
94800
|
+
}
|
|
94801
|
+
// deal with children
|
|
94802
|
+
if (xml.hasChildNodes()) {
|
|
94803
|
+
for (var i = 0; i < xml.childNodes.length; i++) {
|
|
94804
|
+
var child = xml.childNodes.item(i);
|
|
94805
|
+
var nodeName = child.nodeName;
|
|
94806
|
+
if (json[nodeName] == null) {
|
|
94807
|
+
json[nodeName] = xml2json(child);
|
|
94808
|
+
} else {
|
|
94809
|
+
if (json[nodeName].push == null) {
|
|
94810
|
+
var old = json[nodeName];
|
|
94811
|
+
json[nodeName] = [];
|
|
94812
|
+
json[nodeName].push(old);
|
|
94813
|
+
}
|
|
94814
|
+
json[nodeName].push(xml2json(child));
|
|
94815
|
+
}
|
|
94816
|
+
}
|
|
94817
|
+
}
|
|
94818
|
+
return json;
|
|
94819
|
+
}
|
|
94820
|
+
function xml2Object(xml) {
|
|
94821
|
+
try {
|
|
94822
|
+
var obj = {};
|
|
94823
|
+
if (xml.children.length > 0) {
|
|
94824
|
+
for (var i = 0; i < xml.children.length; i++) {
|
|
94825
|
+
var item = xml.children.item(i);
|
|
94826
|
+
var attributes = item.attributes;
|
|
94827
|
+
for (var idx in attributes) {
|
|
94828
|
+
var itemAtt = attributes[idx];
|
|
94829
|
+
var dataKey = itemAtt.nodeName;
|
|
94830
|
+
var dataValue = itemAtt.nodeValue;
|
|
94831
|
+
if (dataKey !== undefined) {
|
|
94832
|
+
obj[dataKey] = dataValue;
|
|
94833
|
+
}
|
|
94834
|
+
}
|
|
94835
|
+
var nodeName = item.nodeName;
|
|
94836
|
+
if (typeof obj[nodeName] == 'undefined') {
|
|
94837
|
+
obj[nodeName] = xml2json(item);
|
|
94838
|
+
} else {
|
|
94839
|
+
if (typeof obj[nodeName].push == 'undefined') {
|
|
94840
|
+
var old = obj[nodeName];
|
|
94841
|
+
obj[nodeName] = [];
|
|
94842
|
+
obj[nodeName].push(old);
|
|
94843
|
+
}
|
|
94844
|
+
obj[nodeName].push(xml2json(item));
|
|
94845
|
+
}
|
|
94846
|
+
}
|
|
94847
|
+
} else {
|
|
94848
|
+
obj = xml.textContent;
|
|
94849
|
+
}
|
|
94850
|
+
return obj;
|
|
94851
|
+
} catch (e) {
|
|
94852
|
+
console.log(e.message);
|
|
94853
|
+
}
|
|
94854
|
+
}
|
|
94855
|
+
*/
|
|
94856
|
+
|
|
94857
|
+
EXIF.getData = function (img, callback) {
|
|
94858
|
+
if ((self.Image && img instanceof self.Image || self.HTMLImageElement && img instanceof self.HTMLImageElement) && !img.complete) return false;
|
|
94859
|
+
if (!imageHasData(img)) {
|
|
94860
|
+
getImageData(img, callback);
|
|
94861
|
+
} else {
|
|
94862
|
+
if (callback) {
|
|
94863
|
+
callback.call(img);
|
|
94864
|
+
}
|
|
94865
|
+
}
|
|
94866
|
+
return true;
|
|
94867
|
+
};
|
|
94868
|
+
/**
|
|
94869
|
+
EXIF.enableXmp = function () {
|
|
94870
|
+
EXIF.isXmpEnabled = true;
|
|
94871
|
+
};
|
|
94872
|
+
EXIF.disableXmp = function () {
|
|
94873
|
+
EXIF.isXmpEnabled = false;
|
|
94874
|
+
};
|
|
94875
|
+
|
|
94876
|
+
EXIF.getTag = function (img, tag) {
|
|
94877
|
+
if (!imageHasData(img)) return;
|
|
94878
|
+
return img.exifdata[tag];
|
|
94879
|
+
};
|
|
94880
|
+
EXIF.getIptcTag = function (img, tag) {
|
|
94881
|
+
if (!imageHasData(img)) return;
|
|
94882
|
+
return img.iptcdata[tag];
|
|
94883
|
+
};
|
|
94884
|
+
EXIF.getAllTags = function (img) {
|
|
94885
|
+
if (!imageHasData(img)) return {};
|
|
94886
|
+
var a,
|
|
94887
|
+
data = img.exifdata,
|
|
94888
|
+
tags = {};
|
|
94889
|
+
for (a in data) {
|
|
94890
|
+
if (data.hasOwnProperty(a)) {
|
|
94891
|
+
tags[a] = data[a];
|
|
94892
|
+
}
|
|
94893
|
+
}
|
|
94894
|
+
return tags;
|
|
94895
|
+
};
|
|
94896
|
+
EXIF.getAllIptcTags = function (img) {
|
|
94897
|
+
if (!imageHasData(img)) return {};
|
|
94898
|
+
var a,
|
|
94899
|
+
data = img.iptcdata,
|
|
94900
|
+
tags = {};
|
|
94901
|
+
for (a in data) {
|
|
94902
|
+
if (data.hasOwnProperty(a)) {
|
|
94903
|
+
tags[a] = data[a];
|
|
94904
|
+
}
|
|
94905
|
+
}
|
|
94906
|
+
return tags;
|
|
94907
|
+
};
|
|
94908
|
+
EXIF.pretty = function (img) {
|
|
94909
|
+
if (!imageHasData(img)) return '';
|
|
94910
|
+
var a,
|
|
94911
|
+
data = img.exifdata,
|
|
94912
|
+
strPretty = '';
|
|
94913
|
+
for (a in data) {
|
|
94914
|
+
if (data.hasOwnProperty(a)) {
|
|
94915
|
+
if (typeof data[a] == 'object') {
|
|
94916
|
+
if (data[a] instanceof Number) {
|
|
94917
|
+
strPretty += a + ' : ' + data[a] + ' [' + data[a].numerator + '/' + data[a].denominator + ']\r\n';
|
|
94918
|
+
} else {
|
|
94919
|
+
strPretty += a + ' : [' + data[a].length + ' values]\r\n';
|
|
94920
|
+
}
|
|
94921
|
+
} else {
|
|
94922
|
+
strPretty += a + ' : ' + data[a] + '\r\n';
|
|
94923
|
+
}
|
|
94924
|
+
}
|
|
94925
|
+
}
|
|
94926
|
+
return strPretty;
|
|
94927
|
+
};
|
|
94928
|
+
EXIF.readFromBinaryFile = function (file) {
|
|
94929
|
+
return findEXIFinJPEG(file);
|
|
94930
|
+
};
|
|
94931
|
+
*/
|
|
94932
|
+
|
|
94933
|
+
if (true) {
|
|
94934
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
|
94935
|
+
return EXIF;
|
|
94936
|
+
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
94937
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
94938
|
+
}
|
|
94939
|
+
}).call(this);
|
|
94940
|
+
|
|
94941
|
+
/***/ }),
|
|
94942
|
+
|
|
93721
94943
|
/***/ 77937:
|
|
93722
94944
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
93723
94945
|
|
|
@@ -97952,10 +99174,10 @@ if(image.colorSpace===color_spaces.INDEXED){var objId=this.internal.newObject();
|
|
|
97952
99174
|
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
|
|
97953
99175
|
if(element.nodeName==="IMG"&&element.hasAttribute("src")){var src=""+element.getAttribute("src");//is base64 encoded dataUrl, directly process it
|
|
97954
99176
|
if(src.indexOf("data:image/")===0){return atob(unescape(src).split("base64,").pop());}//it is probably an url, try to load it
|
|
97955
|
-
var tmpImageData=jsPDFAPI.loadFile(src,true);if(tmpImageData!==undefined){return tmpImageData;}}if(element.nodeName==="CANVAS"){if(element.width===0||element.height===0){throw new Error("Given canvas must have data. Canvas width: "+element.width+", height: "+element.height);}var mimeType;switch(format){case"PNG":mimeType="image/png";break;case"WEBP":mimeType="image/webp";break;case"JPEG":case"JPG":default:mimeType="image/jpeg";break;}return atob(element.toDataURL(mimeType,1.0).split("base64,").pop());}};var checkImagesForAlias=function checkImagesForAlias(alias){var images=this.internal.collections[namespace+"images"];if(images){for(var e in images){if(alias===images[e].alias){return images[e];}}}};var determineWidthAndHeight=function determineWidthAndHeight(width,height,image){if(!width&&!height){width=-96;height=-96;}if(width<0){width=-1*image.width*72/width/this.internal.scaleFactor;}if(height<0){height=-1*image.height*72/height/this.internal.scaleFactor;}if(width===0){width=height*image.width/image.height;}if(height===0){height=width*image.height/image.width;}return[width,height];};var writeImageToPDF=function writeImageToPDF(x,y,width,height,image,rotation){var dims=determineWidthAndHeight.call(this,width,height,image),coord=this.internal.getCoordinateString,vcoord=this.internal.getVerticalCoordinateString;var images=getImages.call(this);width=dims[0];height=dims[1];images[image.index]=image;if(rotation){rotation*=Math.PI/180;var c=Math.cos(rotation);var s=Math.sin(rotation);//like in pdf Reference do it 4 digits instead of 2
|
|
99177
|
+
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,7:180,2:270,4:90,1:180,3:180}[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
|
|
97956
99178
|
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
|
|
97957
|
-
if(rotation){// 自定义修改 修复图片旋转后位置错误问题 水平方向增加自身宽度 减去的 18px 来源未知 垂直方向减去自身高度
|
|
97958
|
-
x+=Number(coord(width))+
|
|
99179
|
+
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 来源未知 垂直方向减去自身高度
|
|
99180
|
+
x+=Number(coord(width))+20;y-=height;}console.log(width,height,x,y,'---------------------');this.internal.write([1,"0","0",1,coord(x),vcoord(y+height),"cm"].join(" "));//Translate
|
|
97959
99181
|
this.internal.write(rotationTransformationMatrix.join(" "));//Rotate
|
|
97960
99182
|
this.internal.write([coord(width),"0","0",coord(height),"0","0","cm"].join(" "));//Scale
|
|
97961
99183
|
}else{this.internal.write([coord(width),"0","0",coord(height),coord(x),vcoord(y+height),"cm"].join(" "));//Translate and Scale
|
|
@@ -98069,9 +99291,9 @@ var imageData,format,x,y,w,h,alias,compression,rotation,posX,posY;imageData=argu
|
|
|
98069
99291
|
var filter=this.internal.getFilters();if(compression===undefined&&filter.indexOf("FlateEncode")!==-1){compression="SLOW";}// 自定义修改 调整 addImage 方法的 compression值压缩图片
|
|
98070
99292
|
compression='SLOW';if(isNaN(x)||isNaN(y)){throw new Error("Invalid coordinates passed to jsPDF.addImage");}// if(posX) x += posX;
|
|
98071
99293
|
// if(posY) y += posY;
|
|
98072
|
-
initialize.call(this);var image=processImageData.call(this,imageData,format,alias,compression);writeImageToPDF.call(this,x,y,w,h,image,rotation);return this;};var processImageData=function processImageData(imageData,format,alias,compression){var result,dataAsBinaryString;if(typeof imageData==="string"&&getImageFileTypeByImageData(imageData)===UNKNOWN){imageData=unescape(imageData);var tmpImageData=convertBase64ToBinaryString(imageData,false);if(tmpImageData!==""){imageData=tmpImageData;}else{tmpImageData=jsPDFAPI.loadFile(imageData,true);if(tmpImageData!==undefined){imageData=tmpImageData;}}}if(isDOMElement(imageData)){imageData=getImageDataFromElement(imageData,format);}format=getImageFileTypeByImageData(imageData,format);if(!isImageTypeSupported(format)){throw new Error("addImage does not support files of type '"+format+"', please ensure that a plugin for '"+format+"' support is added.");}// now do the heavy lifting
|
|
99294
|
+
initialize.call(this);var image=processImageData.call(this,imageData,format,alias,compression);writeImageToPDF.call(this,x,y,w,h,image,rotation);return this;};var processImageData=function processImageData(imageData,format,alias,compression){var result,dataAsBinaryString;var exifdata=imageData.exifdata;if(typeof imageData==="string"&&getImageFileTypeByImageData(imageData)===UNKNOWN){imageData=unescape(imageData);var tmpImageData=convertBase64ToBinaryString(imageData,false);if(tmpImageData!==""){imageData=tmpImageData;}else{tmpImageData=jsPDFAPI.loadFile(imageData,true);if(tmpImageData!==undefined){imageData=tmpImageData;}}}if(isDOMElement(imageData)){imageData=getImageDataFromElement(imageData,format);}format=getImageFileTypeByImageData(imageData,format);if(!isImageTypeSupported(format)){throw new Error("addImage does not support files of type '"+format+"', please ensure that a plugin for '"+format+"' support is added.");}// now do the heavy lifting
|
|
98073
99295
|
if(notDefined(alias)){alias=generateAliasFromImageData(imageData);}result=checkImagesForAlias.call(this,alias);if(!result){if(supportsArrayBuffer()){// no need to convert if imageData is already uint8array
|
|
98074
|
-
if(!(imageData instanceof Uint8Array)&&format!=="RGBA"){dataAsBinaryString=imageData;imageData=binaryStringToUint8Array(imageData);}}result=this["process"+format.toUpperCase()](imageData,getImageIndex.call(this),alias,checkCompressValue(compression),dataAsBinaryString);}if(!result){throw new Error("An unknown error occurred whilst processing the image.");}return result;};/**
|
|
99296
|
+
if(!(imageData instanceof Uint8Array)&&format!=="RGBA"){dataAsBinaryString=imageData;imageData=binaryStringToUint8Array(imageData);}}result=this["process"+format.toUpperCase()](imageData,getImageIndex.call(this),alias,checkCompressValue(compression),dataAsBinaryString);}if(!result){throw new Error("An unknown error occurred whilst processing the image.");}result.exifdata=exifdata;return result;};/**
|
|
98075
99297
|
* @name convertBase64ToBinaryString
|
|
98076
99298
|
* @function
|
|
98077
99299
|
* @param {string} stringData
|
|
@@ -98864,7 +100086,7 @@ a=isNaN(a)?1:a;b=isNaN(b)?0:b;c=isNaN(c)?0:c;d=isNaN(d)?1:d;e=isNaN(e)?0:e;f=isN
|
|
|
98864
100086
|
* @param y {Number} The y coordinate where to place the image on the canvas
|
|
98865
100087
|
* @param width {Number} Optional. The width of the image to use (stretch or reduce the image)
|
|
98866
100088
|
* @param height {Number} Optional. The height of the image to use (stretch or reduce the image)
|
|
98867
|
-
*/Context2D.prototype.drawImage=function(img,sx,sy,swidth,sheight,x,y,width,height){var imageProperties=this.pdf.getImageProperties(img);var factorX=1;var factorY=1;var clipFactorX=1;var clipFactorY=1;if(typeof swidth!=="undefined"&&typeof width!=="undefined"){clipFactorX=width/swidth;clipFactorY=height/sheight;factorX=imageProperties.width/swidth*width/swidth;factorY=imageProperties.height/sheight*height/sheight;}//is sx and sy are set and x and y not, set x and y with values of sx and sy
|
|
100089
|
+
*/Context2D.prototype.drawImage=function(img,sx,sy,swidth,sheight,x,y,width,height){var imageProperties=this.pdf.getImageProperties(img);if(img.exifdata){imageProperties.exifdata=img.exifdata;}var factorX=1;var factorY=1;var clipFactorX=1;var clipFactorY=1;if(typeof swidth!=="undefined"&&typeof width!=="undefined"){clipFactorX=width/swidth;clipFactorY=height/sheight;factorX=imageProperties.width/swidth*width/swidth;factorY=imageProperties.height/sheight*height/sheight;}//is sx and sy are set and x and y not, set x and y with values of sx and sy
|
|
98868
100090
|
if(typeof x==="undefined"){x=sx;y=sy;sx=0;sy=0;}if(typeof swidth!=="undefined"&&typeof width==="undefined"){width=swidth;height=sheight;}if(typeof swidth==="undefined"&&typeof width==="undefined"){width=imageProperties.width;height=imageProperties.height;}var decomposedTransformationMatrix=this.ctx.transform.decompose();// console.log("transform.decompose",decomposedTransformationMatrix.scale);
|
|
98869
100091
|
// 自定义修改 修复图片旋转角度错误问题
|
|
98870
100092
|
var angle=rad2deg(decomposedTransformationMatrix.rotate.rotation);var matrix=new Matrix();matrix=matrix.multiply(decomposedTransformationMatrix.translate);matrix=matrix.multiply(decomposedTransformationMatrix.skew);matrix=matrix.multiply(decomposedTransformationMatrix.scale);if(!swidth){swidth=width;}if(!sheight){sheight=height;}var xRect;// 自定义修改 处理签名图片打印和普通图片打印
|
|
@@ -106710,7 +107932,8 @@ this.createjs=this.createjs||{};(function(){/**
|
|
|
106710
107932
|
* For example, used for drawing the cache (to prevent it from simply drawing an existing cache back
|
|
106711
107933
|
* into itself).
|
|
106712
107934
|
* @return {Boolean}
|
|
106713
|
-
**/p.draw=function(ctx,ignoreCache){if(this.DisplayObject_draw(ctx,ignoreCache)){return true;}var img=this.image,rect=this.sourceRect
|
|
107935
|
+
**/p.draw=function(ctx,ignoreCache){if(this.DisplayObject_draw(ctx,ignoreCache)){return true;}var img=this.image,rect=this.sourceRect;// if (img.getImage) { img = img.getImage(); }
|
|
107936
|
+
if(!img){return true;}if(rect){// some browsers choke on out of bound values, so we'll fix them:
|
|
106714
107937
|
var x1=rect.x,y1=rect.y,x2=x1+rect.width,y2=y1+rect.height,x=0,y=0,w=img.width,h=img.height;if(x1<0){x-=x1;x1=0;}if(x2>w){x2=w;}if(y1<0){y-=y1;y1=0;}if(y2>h){y2=h;}ctx.drawImage(img,x1,y1,x2-x1,y2-y1,x,y,x2-x1,y2-y1);}else{ctx.drawImage(img,0,0);}return true;};//Note, the doc sections below document using the specified APIs (from DisplayObject) from
|
|
106715
107938
|
//Bitmap. This is why they have no method implementations.
|
|
106716
107939
|
/**
|
|
@@ -198355,7 +199578,7 @@ var map = {
|
|
|
198355
199578
|
"./selectDialog/SelectDialog.vue": 59075,
|
|
198356
199579
|
"./sign/Sign.vue": 28715,
|
|
198357
199580
|
"./table/TableCellPoper.vue": 61917,
|
|
198358
|
-
"./table/TableCellProperty.vue":
|
|
199581
|
+
"./table/TableCellProperty.vue": 61973,
|
|
198359
199582
|
"./table/TableColProperty.vue": 2116,
|
|
198360
199583
|
"./table/TableForm.vue": 19064,
|
|
198361
199584
|
"./table/TableFormTree.vue": 39703,
|
|
@@ -237717,7 +238940,7 @@ var ParagraphNode = __webpack_require__(67945);
|
|
|
237717
238940
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/MarkNode.ts
|
|
237718
238941
|
var MarkNode = __webpack_require__(57727);
|
|
237719
238942
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
237720
|
-
/* harmony default export */ var version = ('3.0.
|
|
238943
|
+
/* harmony default export */ var version = ('3.0.83');
|
|
237721
238944
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
237722
238945
|
var PoperTipText = __webpack_require__(36081);
|
|
237723
238946
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|
|
@@ -245284,6 +246507,7 @@ var hoCreateHistory = {
|
|
|
245284
246507
|
|
|
245285
246508
|
|
|
245286
246509
|
|
|
246510
|
+
|
|
245287
246511
|
|
|
245288
246512
|
|
|
245289
246513
|
var VueController = /*#__PURE__*/function () {
|
|
@@ -249862,7 +251086,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
249862
251086
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
249863
251087
|
var ret = [];
|
|
249864
251088
|
var getAllNodes = function getAllNodes(nodes) {
|
|
249865
|
-
|
|
251089
|
+
var _loop2 = function _loop2(i) {
|
|
249866
251090
|
var node = nodes[i];
|
|
249867
251091
|
if (node instanceof TextInputFieldNode/* TextInputFieldNode */.re || node instanceof DownListNode/* DownListNode */.yF || node instanceof DateTimeNode/* DateTimeNode */.Z) {
|
|
249868
251092
|
var elementObj = {
|
|
@@ -249878,10 +251102,47 @@ var VueController = /*#__PURE__*/function () {
|
|
|
249878
251102
|
dataMetaIdentifier: node.dataMetaIdentifier,
|
|
249879
251103
|
customProperty: node.customProperty,
|
|
249880
251104
|
keyValue: '',
|
|
249881
|
-
value: ''
|
|
251105
|
+
value: '',
|
|
251106
|
+
verifyTipList: []
|
|
249882
251107
|
};
|
|
249883
251108
|
if (!(node instanceof TextInputFieldNode/* TextInputFieldNode */.re)) {
|
|
249884
251109
|
elementObj.controlType = node.type;
|
|
251110
|
+
} else {
|
|
251111
|
+
var verifyTipList = [];
|
|
251112
|
+
var includesKeyword = node.includesKeyword ? JSON.parse(node.includesKeyword) : [];
|
|
251113
|
+
var valueArea = node.valueArea ? JSON.parse(node.valueArea) : [];
|
|
251114
|
+
if (includesKeyword.length > 0) {
|
|
251115
|
+
includesKeyword.forEach(function (keyword) {
|
|
251116
|
+
if (node.text.includes(keyword.text)) {
|
|
251117
|
+
verifyTipList.push(keyword.tip);
|
|
251118
|
+
}
|
|
251119
|
+
});
|
|
251120
|
+
}
|
|
251121
|
+
if (valueArea.length > 0) {
|
|
251122
|
+
valueArea.forEach(function (value) {
|
|
251123
|
+
var min = value.min == '' ? NaN : Number(value.min);
|
|
251124
|
+
var max = value.max == '' ? NaN : Number(value.max);
|
|
251125
|
+
var nodeValue = node.text == '' ? NaN : Number(node.text);
|
|
251126
|
+
if (!isNaN(nodeValue)) {
|
|
251127
|
+
if (!isNaN(min) && !isNaN(max)) {
|
|
251128
|
+
if (nodeValue >= min && nodeValue <= max) {
|
|
251129
|
+
verifyTipList.push(value.tip);
|
|
251130
|
+
}
|
|
251131
|
+
}
|
|
251132
|
+
if (!isNaN(min) && isNaN(max)) {
|
|
251133
|
+
if (nodeValue < min) {
|
|
251134
|
+
verifyTipList.push(value.tip);
|
|
251135
|
+
}
|
|
251136
|
+
}
|
|
251137
|
+
if (isNaN(min) && !isNaN(max)) {
|
|
251138
|
+
if (nodeValue > max) {
|
|
251139
|
+
verifyTipList.push(value.tip);
|
|
251140
|
+
}
|
|
251141
|
+
}
|
|
251142
|
+
}
|
|
251143
|
+
});
|
|
251144
|
+
}
|
|
251145
|
+
elementObj.verifyTipList = verifyTipList;
|
|
249885
251146
|
}
|
|
249886
251147
|
if (node instanceof TextInputFieldNode/* TextInputFieldNode */.re && node.inputFieldType == 1 || node instanceof DownListNode/* DownListNode */.yF) {
|
|
249887
251148
|
elementObj.keyValue = node.keyValue;
|
|
@@ -249893,6 +251154,9 @@ var VueController = /*#__PURE__*/function () {
|
|
|
249893
251154
|
if (node instanceof BaseCombineNode/* BaseCombineNode */.V) {
|
|
249894
251155
|
getAllNodes(node.childNodes);
|
|
249895
251156
|
}
|
|
251157
|
+
};
|
|
251158
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
251159
|
+
_loop2(i);
|
|
249896
251160
|
}
|
|
249897
251161
|
};
|
|
249898
251162
|
if (area == undefined || area == 'header') {
|
|
@@ -249925,7 +251189,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
249925
251189
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
249926
251190
|
var allArr = [];
|
|
249927
251191
|
var getAllNodes = function getAllNodes(nodes, arr) {
|
|
249928
|
-
var
|
|
251192
|
+
var _loop3 = function _loop3(i) {
|
|
249929
251193
|
var node = nodes[i];
|
|
249930
251194
|
if (node instanceof DownListNode/* DownListNode */.yF && node.isReadOnly || node instanceof DateTimeNode/* DateTimeNode */.Z && node.isReadOnly || node instanceof TextInputFieldNode/* TextInputFieldNode */.re && node.inputFieldType == 0 && node.childNodes.filter(function (child) {
|
|
249931
251195
|
return child instanceof TextInputFieldNode/* TextInputFieldNode */.re;
|
|
@@ -249963,7 +251227,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
249963
251227
|
}
|
|
249964
251228
|
};
|
|
249965
251229
|
for (var i = 0; i < nodes.length; i++) {
|
|
249966
|
-
|
|
251230
|
+
_loop3(i);
|
|
249967
251231
|
}
|
|
249968
251232
|
};
|
|
249969
251233
|
var headerDocTree = hoEditorFactory.subDocManger.headerDocTree;
|
|
@@ -258080,6 +259344,7 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
258080
259344
|
old: false // 是否使用完善后的批注界面
|
|
258081
259345
|
});
|
|
258082
259346
|
(0,esm_defineProperty/* default */.Z)(this, "_commentParams", void 0);
|
|
259347
|
+
(0,esm_defineProperty/* default */.Z)(this, "_isDrawMustMarker", true);
|
|
258083
259348
|
this._hoEditorFactoryId = id;
|
|
258084
259349
|
}
|
|
258085
259350
|
(0,esm_createClass/* default */.Z)(HOEditorFactory, [{
|
|
@@ -258126,6 +259391,7 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
258126
259391
|
|
|
258127
259392
|
// 审阅参数设置
|
|
258128
259393
|
// 批注相关动态变更
|
|
259394
|
+
//是否绘制必填标记
|
|
258129
259395
|
/**
|
|
258130
259396
|
* Getter hoLocalStorage
|
|
258131
259397
|
* @return {HoLocalStorage}
|
|
@@ -258885,6 +260151,16 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
258885
260151
|
this._isEnabledGlobalColor = value;
|
|
258886
260152
|
}
|
|
258887
260153
|
}
|
|
260154
|
+
}, {
|
|
260155
|
+
key: "isDrawMustMarker",
|
|
260156
|
+
get: function get() {
|
|
260157
|
+
return this._isDrawMustMarker;
|
|
260158
|
+
},
|
|
260159
|
+
set: function set(value) {
|
|
260160
|
+
if (this._isDrawMustMarker !== value) {
|
|
260161
|
+
this._isDrawMustMarker = value;
|
|
260162
|
+
}
|
|
260163
|
+
}
|
|
258888
260164
|
}, {
|
|
258889
260165
|
key: "isSameColorWithEmptyVlaue",
|
|
258890
260166
|
get: function get() {
|