fl-web-component 2.1.11 → 2.1.12
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/dist/fl-web-component.common.js +119 -576
- package/dist/fl-web-component.common.js.map +1 -1
- package/dist/fl-web-component.css +1 -1
- package/package.json +1 -1
- package/packages/components/com-flcanvas/components/entityFormatting.js +11 -261
- package/packages/components/com-flcanvas/index.vue +71 -33
|
@@ -23038,13 +23038,6 @@ module.exports = deepmerge_1;
|
|
|
23038
23038
|
|
|
23039
23039
|
/***/ }),
|
|
23040
23040
|
|
|
23041
|
-
/***/ "3d9e":
|
|
23042
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
23043
|
-
|
|
23044
|
-
// extracted by mini-css-extract-plugin
|
|
23045
|
-
|
|
23046
|
-
/***/ }),
|
|
23047
|
-
|
|
23048
23041
|
/***/ "3f6b":
|
|
23049
23042
|
/***/ (function(module, exports, __webpack_require__) {
|
|
23050
23043
|
|
|
@@ -48459,6 +48452,13 @@ module.exports = Object.create || function create(O, Properties) {
|
|
|
48459
48452
|
|
|
48460
48453
|
/***/ }),
|
|
48461
48454
|
|
|
48455
|
+
/***/ "6f92":
|
|
48456
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
48457
|
+
|
|
48458
|
+
// extracted by mini-css-extract-plugin
|
|
48459
|
+
|
|
48460
|
+
/***/ }),
|
|
48461
|
+
|
|
48462
48462
|
/***/ "7037":
|
|
48463
48463
|
/***/ (function(module, exports) {
|
|
48464
48464
|
|
|
@@ -66004,7 +66004,7 @@ module.exports = document && document.documentElement;
|
|
|
66004
66004
|
/***/ "9224":
|
|
66005
66005
|
/***/ (function(module) {
|
|
66006
66006
|
|
|
66007
|
-
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.1.
|
|
66007
|
+
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.1.12\",\"scripts\":{\"postinstall\":\"patch-package\",\"tip1\":\"仅调试本组件不涉及业务组件,请执行dev\",\"dev\":\"vue-cli-service serve\",\"lint\":\"eslint \\\"{src,packages}/**/*.{vue,js}\\\" --fix\",\"prettier\":\"prettier --write \\\"packages/**/*.{js,css,less,scss,vue,html}\\\"\",\"=\":\"=============================================================\",\"tip2\":\"同时调试本组件与业务组件,请执行watch,生产模式监听请执行watch:prod\",\"watch\":\"vue-cli-service build --watch --mode development --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"watch:prod\":\"vue-cli-service build --watch --mode production --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build\":\"npm run lint && vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build:test\":\"vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"publish:base\":\"npm run build && npm publish --registry https://registry.npmjs.org/\",\"publish:beta:base\":\"npm run build && npm publish --tag beta --registry https://registry.npmjs.org/\",\"==\":\"=============================================================\",\"tip3\":\"发版注意: 【测试版执行publish:beta】【修改bug执行publish:fix】【新增功能执行publish:feat】【新特性执行publish:perf】\",\"publish:beta\":\"npm version prerelease --preid=beta && npm run publish:beta:base\",\"publish:fix\":\"npm version patch && npm run publish:base\",\"publish:feat\":\"npm version minor && npm run publish:base\",\"publish:perf\":\"npm version major && npm run publish:base\"},\"files\":[\"dist\",\"packages\",\"src\"],\"main\":\"dist/fl-web-component.common.js\",\"dependencies\":{\"camera-controls\":\"2.9.0\",\"core-js\":\"^3.42.0\",\"dxf-parser\":\"^1.1.2\",\"element-ui\":\"2.15.14\",\"fflate\":\"^0.8.2\",\"html2canvas\":\"^1.4.1\",\"jspdf\":\"^3.0.1\",\"konva\":\"^9.3.12\",\"lodash\":\"^4.17.21\",\"meshline\":\"^3.3.1\",\"regenerator-runtime\":\"^0.14.1\",\"svg-pan-zoom\":\"^3.6.2\",\"three\":\"^0.176.0\",\"three.path\":\"^1.0.1\",\"vue\":\"^2.6.11\"},\"devDependencies\":{\"@babel/core\":\"^7.12.16\",\"@babel/plugin-proposal-nullish-coalescing-operator\":\"^7.18.6\",\"@babel/plugin-proposal-optional-chaining\":\"^7.21.0\",\"@babel/preset-env\":\"^7.0.0\",\"@babel/runtime-corejs3\":\"^7.27.1\",\"@vue/cli-plugin-babel\":\"~4.4.0\",\"@vue/cli-plugin-eslint\":\"~4.4.0\",\"@vue/cli-service\":\"~4.4.0\",\"babel-eslint\":\"^10.1.0\",\"babel-loader\":\"^8.0.0\",\"copy-webpack-plugin\":\"^4.0.1\",\"eslint\":\"^6.7.2\",\"eslint-config-prettier\":\"^6.15.0\",\"eslint-plugin-prettier\":\"^3.4.1\",\"eslint-plugin-vue\":\"^6.2.2\",\"patch-package\":\"^6.4.7\",\"prettier\":\"^2.8.8\",\"sass\":\"1.32.13\",\"sass-loader\":\"10.1.1\",\"vue-template-compiler\":\"^2.6.11\",\"worker-loader\":\"^3.0.8\"},\"browserslist\":[\"> 1%\",\"last 2 versions\"]}");
|
|
66008
66008
|
|
|
66009
66009
|
/***/ }),
|
|
66010
66010
|
|
|
@@ -69056,17 +69056,6 @@ module.exports = function () {
|
|
|
69056
69056
|
/* unused harmony reexport * */
|
|
69057
69057
|
|
|
69058
69058
|
|
|
69059
|
-
/***/ }),
|
|
69060
|
-
|
|
69061
|
-
/***/ "b789":
|
|
69062
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
69063
|
-
|
|
69064
|
-
"use strict";
|
|
69065
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_177cbfe4_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3d9e");
|
|
69066
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_177cbfe4_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_177cbfe4_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
69067
|
-
/* unused harmony reexport * */
|
|
69068
|
-
|
|
69069
|
-
|
|
69070
69059
|
/***/ }),
|
|
69071
69060
|
|
|
69072
69061
|
/***/ "b9c7":
|
|
@@ -77847,6 +77836,17 @@ module.exports = /******/function (modules) {
|
|
|
77847
77836
|
/******/
|
|
77848
77837
|
});
|
|
77849
77838
|
|
|
77839
|
+
/***/ }),
|
|
77840
|
+
|
|
77841
|
+
/***/ "c2dd":
|
|
77842
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
77843
|
+
|
|
77844
|
+
"use strict";
|
|
77845
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_aa5e04ac_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6f92");
|
|
77846
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_aa5e04ac_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_aa5e04ac_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
77847
|
+
/* unused harmony reexport * */
|
|
77848
|
+
|
|
77849
|
+
|
|
77850
77850
|
/***/ }),
|
|
77851
77851
|
|
|
77852
77852
|
/***/ "c527":
|
|
@@ -88142,7 +88142,7 @@ if (typeof window !== 'undefined') {
|
|
|
88142
88142
|
// Indicate to webpack that this file can be concatenated
|
|
88143
88143
|
/* harmony default export */ var setPublicPath = (null);
|
|
88144
88144
|
|
|
88145
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
88145
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"61188ed9-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/index.vue?vue&type=template&id=3ef03e39&scoped=true
|
|
88146
88146
|
var com_graphicsvue_type_template_id_3ef03e39_scoped_true_render = function render() {
|
|
88147
88147
|
var _vm = this,
|
|
88148
88148
|
_c = _vm._self._c;
|
|
@@ -139837,8 +139837,8 @@ var component = normalizeComponent(
|
|
|
139837
139837
|
)
|
|
139838
139838
|
|
|
139839
139839
|
/* harmony default export */ var com_graphics = (component.exports);
|
|
139840
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
139841
|
-
var
|
|
139840
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"61188ed9-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-flcanvas/index.vue?vue&type=template&id=aa5e04ac&scoped=true
|
|
139841
|
+
var com_flcanvasvue_type_template_id_aa5e04ac_scoped_true_render = function render() {
|
|
139842
139842
|
var _vm = this,
|
|
139843
139843
|
_c = _vm._self._c;
|
|
139844
139844
|
return _c('div', {
|
|
@@ -139851,9 +139851,9 @@ var com_flcanvasvue_type_template_id_177cbfe4_scoped_true_render = function rend
|
|
|
139851
139851
|
}
|
|
139852
139852
|
});
|
|
139853
139853
|
};
|
|
139854
|
-
var
|
|
139854
|
+
var com_flcanvasvue_type_template_id_aa5e04ac_scoped_true_staticRenderFns = [];
|
|
139855
139855
|
|
|
139856
|
-
// CONCATENATED MODULE: ./packages/components/com-flcanvas/index.vue?vue&type=template&id=
|
|
139856
|
+
// CONCATENATED MODULE: ./packages/components/com-flcanvas/index.vue?vue&type=template&id=aa5e04ac&scoped=true
|
|
139857
139857
|
|
|
139858
139858
|
// EXTERNAL MODULE: ./node_modules/konva/lib/index.js
|
|
139859
139859
|
var lib = __webpack_require__("362d");
|
|
@@ -144876,6 +144876,10 @@ function entityFormatting_unsupportedIterableToArray(r, a) { if (r) { if ("strin
|
|
|
144876
144876
|
function entityFormatting_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
144877
144877
|
|
|
144878
144878
|
|
|
144879
|
+
var entityFormatting_minX = Infinity,
|
|
144880
|
+
entityFormatting_minY = Infinity,
|
|
144881
|
+
maxX = -Infinity,
|
|
144882
|
+
maxY = -Infinity;
|
|
144879
144883
|
//rgb转换
|
|
144880
144884
|
function decimalToRGBHex(decimalValue) {
|
|
144881
144885
|
// Ensure the input is a valid integer
|
|
@@ -145255,7 +145259,8 @@ function entityFormatting_drawText(recordDxf, entity, group, key, configParams)
|
|
|
145255
145259
|
visible: configParams ? configParams.visible : true,
|
|
145256
145260
|
stroke: hex,
|
|
145257
145261
|
strokeWidth: 0.1,
|
|
145258
|
-
shapeType: 'text'
|
|
145262
|
+
shapeType: 'text',
|
|
145263
|
+
strokeScaleEnabled: false
|
|
145259
145264
|
});
|
|
145260
145265
|
if (entity.xScale) {
|
|
145261
145266
|
dim.scaleX(entity.xScale);
|
|
@@ -145318,7 +145323,6 @@ function entityFormatting_drawText(recordDxf, entity, group, key, configParams)
|
|
|
145318
145323
|
});
|
|
145319
145324
|
// group.add(dim);
|
|
145320
145325
|
}
|
|
145321
|
-
function drawHatch(recordDxf, entity, group, key, configParams) {}
|
|
145322
145326
|
function drawLwLine(recordDxf, entity, group, key, configParams, lineTypes) {
|
|
145323
145327
|
var color = entity.color;
|
|
145324
145328
|
var rgb = decimalToRGBHex(color);
|
|
@@ -145331,6 +145335,7 @@ function drawLwLine(recordDxf, entity, group, key, configParams, lineTypes) {
|
|
|
145331
145335
|
for (var i = 0; i < entity.vertices.length; i++) {
|
|
145332
145336
|
list.push(entity.vertices[i].x);
|
|
145333
145337
|
list.push(-parseFloat(entity.vertices[i].y));
|
|
145338
|
+
computeBoundingBox(entity.vertices[i].x, entity.vertices[i].y);
|
|
145334
145339
|
}
|
|
145335
145340
|
var width = 0.2;
|
|
145336
145341
|
if (entity.width) {
|
|
@@ -145608,518 +145613,12 @@ function _GenerateBulgeVertices(vertices, startVtx, endVtx, bulge) {
|
|
|
145608
145613
|
vertices.push(new Vector2(endVtx.x, endVtx.y));
|
|
145609
145614
|
return vertices;
|
|
145610
145615
|
}
|
|
145611
|
-
|
|
145612
|
-
|
|
145613
|
-
|
|
145614
|
-
|
|
145615
|
-
|
|
145616
|
-
|
|
145617
|
-
'0,255,0',
|
|
145618
|
-
//4
|
|
145619
|
-
'0,255,255',
|
|
145620
|
-
//5
|
|
145621
|
-
'0,0,255',
|
|
145622
|
-
//6
|
|
145623
|
-
'255,0,255',
|
|
145624
|
-
//7
|
|
145625
|
-
'255,255,255',
|
|
145626
|
-
//8
|
|
145627
|
-
'128,128,128',
|
|
145628
|
-
//9
|
|
145629
|
-
'192,192,192',
|
|
145630
|
-
//10
|
|
145631
|
-
'255,0,0',
|
|
145632
|
-
//11
|
|
145633
|
-
'255,120,112',
|
|
145634
|
-
//12
|
|
145635
|
-
'192,0,0',
|
|
145636
|
-
//13
|
|
145637
|
-
'207,103,96',
|
|
145638
|
-
//14
|
|
145639
|
-
'144,0,0',
|
|
145640
|
-
//15
|
|
145641
|
-
'144,72,79',
|
|
145642
|
-
//16
|
|
145643
|
-
'127,0,0',
|
|
145644
|
-
//17
|
|
145645
|
-
'112,56,48',
|
|
145646
|
-
//18
|
|
145647
|
-
'79,0,0',
|
|
145648
|
-
//19
|
|
145649
|
-
'79,39,32',
|
|
145650
|
-
//20
|
|
145651
|
-
'255,56,0',
|
|
145652
|
-
//21
|
|
145653
|
-
'255,159,127',
|
|
145654
|
-
//22
|
|
145655
|
-
'192,48,0',
|
|
145656
|
-
//23
|
|
145657
|
-
'207,127,96',
|
|
145658
|
-
//24
|
|
145659
|
-
'144,32,0',
|
|
145660
|
-
//25
|
|
145661
|
-
'144,88,64',
|
|
145662
|
-
// 26
|
|
145663
|
-
'112,24,0',
|
|
145664
|
-
//27
|
|
145665
|
-
'127,72,63',
|
|
145666
|
-
//28
|
|
145667
|
-
'79,16,0',
|
|
145668
|
-
//29
|
|
145669
|
-
'64,40,31',
|
|
145670
|
-
//30
|
|
145671
|
-
'255,127,0',
|
|
145672
|
-
//31
|
|
145673
|
-
'255,191,127',
|
|
145674
|
-
//32
|
|
145675
|
-
'207,103,0',
|
|
145676
|
-
//33
|
|
145677
|
-
'192,151,96',
|
|
145678
|
-
//34
|
|
145679
|
-
'159,72,0',
|
|
145680
|
-
//35
|
|
145681
|
-
'144,112,79',
|
|
145682
|
-
//36
|
|
145683
|
-
'127,63,0',
|
|
145684
|
-
//37
|
|
145685
|
-
'127,95,63',
|
|
145686
|
-
//38
|
|
145687
|
-
'64,32,0',
|
|
145688
|
-
//39
|
|
145689
|
-
'64,55,31',
|
|
145690
|
-
//40
|
|
145691
|
-
'255,191,0',
|
|
145692
|
-
// 41
|
|
145693
|
-
'255,216,127',
|
|
145694
|
-
//42
|
|
145695
|
-
'207,152,0',
|
|
145696
|
-
//43
|
|
145697
|
-
'192,175,96',
|
|
145698
|
-
//44
|
|
145699
|
-
'144,112,0',
|
|
145700
|
-
//45
|
|
145701
|
-
'144,128,64',
|
|
145702
|
-
//46
|
|
145703
|
-
'112,88,0',
|
|
145704
|
-
//47
|
|
145705
|
-
'127,111,63',
|
|
145706
|
-
//48
|
|
145707
|
-
'64,55,0',
|
|
145708
|
-
//49
|
|
145709
|
-
'64,63,31',
|
|
145710
|
-
//50
|
|
145711
|
-
'255,255,0',
|
|
145712
|
-
//51
|
|
145713
|
-
'255,255,112',
|
|
145714
|
-
//52
|
|
145715
|
-
'207,200,0',
|
|
145716
|
-
//53
|
|
145717
|
-
'192,200,96',
|
|
145718
|
-
//54
|
|
145719
|
-
'144,151,0',
|
|
145720
|
-
//55
|
|
145721
|
-
'144,151,64',
|
|
145722
|
-
//56
|
|
145723
|
-
'144,152,0',
|
|
145724
|
-
//57
|
|
145725
|
-
'127,120,63',
|
|
145726
|
-
//58
|
|
145727
|
-
'79,72,0',
|
|
145728
|
-
//59
|
|
145729
|
-
'79,72,32',
|
|
145730
|
-
//60
|
|
145731
|
-
'191,255,0',
|
|
145732
|
-
//61
|
|
145733
|
-
'208,255,112',
|
|
145734
|
-
//62
|
|
145735
|
-
'144,200,0',
|
|
145736
|
-
//63
|
|
145737
|
-
'176,200,96',
|
|
145738
|
-
//64
|
|
145739
|
-
'111,151,0',
|
|
145740
|
-
//65
|
|
145741
|
-
'128,151,79',
|
|
145742
|
-
//66
|
|
145743
|
-
'95,127,0',
|
|
145744
|
-
//67
|
|
145745
|
-
'111,127,63',
|
|
145746
|
-
//68
|
|
145747
|
-
'48,72,0',
|
|
145748
|
-
//69
|
|
145749
|
-
'63,72,31',
|
|
145750
|
-
//70
|
|
145751
|
-
'127,255,0',
|
|
145752
|
-
//71
|
|
145753
|
-
'191,255,127',
|
|
145754
|
-
//72
|
|
145755
|
-
'95,200,0',
|
|
145756
|
-
//73
|
|
145757
|
-
'159,200,96',
|
|
145758
|
-
//74
|
|
145759
|
-
'64,151,0',
|
|
145760
|
-
//75
|
|
145761
|
-
'111,151,64',
|
|
145762
|
-
//76
|
|
145763
|
-
'63,120,0',
|
|
145764
|
-
//77
|
|
145765
|
-
'95,127,63',
|
|
145766
|
-
//78
|
|
145767
|
-
'31,72,0',
|
|
145768
|
-
//79
|
|
145769
|
-
'48,72,32',
|
|
145770
|
-
//80
|
|
145771
|
-
'63,255,0',
|
|
145772
|
-
//81
|
|
145773
|
-
'159,255,127',
|
|
145774
|
-
//82
|
|
145775
|
-
'47,200,0',
|
|
145776
|
-
//83
|
|
145777
|
-
'127,200,96',
|
|
145778
|
-
//84
|
|
145779
|
-
'31,151,0',
|
|
145780
|
-
//85
|
|
145781
|
-
'80,151,64',
|
|
145782
|
-
//86
|
|
145783
|
-
'31,127,0',
|
|
145784
|
-
//87
|
|
145785
|
-
'79,127,63',
|
|
145786
|
-
//88
|
|
145787
|
-
'15,72,0',
|
|
145788
|
-
//89
|
|
145789
|
-
'47,72,32',
|
|
145790
|
-
//90
|
|
145791
|
-
'0,255,0',
|
|
145792
|
-
//91
|
|
145793
|
-
'127,255,127',
|
|
145794
|
-
//92
|
|
145795
|
-
'0,200,0',
|
|
145796
|
-
//93
|
|
145797
|
-
'95,200,95',
|
|
145798
|
-
//94
|
|
145799
|
-
'0,151,0',
|
|
145800
|
-
//95
|
|
145801
|
-
'79,151,79',
|
|
145802
|
-
//96
|
|
145803
|
-
'0,127,0',
|
|
145804
|
-
//97
|
|
145805
|
-
'63,127,63',
|
|
145806
|
-
//98
|
|
145807
|
-
'0,72,0',
|
|
145808
|
-
//99
|
|
145809
|
-
'32,72,32',
|
|
145810
|
-
//100
|
|
145811
|
-
'0,255,63',
|
|
145812
|
-
//101
|
|
145813
|
-
'127,255,159',
|
|
145814
|
-
//102
|
|
145815
|
-
'0,200,47',
|
|
145816
|
-
//103
|
|
145817
|
-
'95,200,112',
|
|
145818
|
-
//104
|
|
145819
|
-
'0,151,32',
|
|
145820
|
-
//105
|
|
145821
|
-
'64,151,95',
|
|
145822
|
-
//106
|
|
145823
|
-
'0,120,31',
|
|
145824
|
-
//107
|
|
145825
|
-
'63,127,79',
|
|
145826
|
-
//108
|
|
145827
|
-
'0,72,15',
|
|
145828
|
-
//109
|
|
145829
|
-
'32,72,47',
|
|
145830
|
-
//110
|
|
145831
|
-
'0,255,127',
|
|
145832
|
-
//111
|
|
145833
|
-
'127,255,191',
|
|
145834
|
-
//112
|
|
145835
|
-
'0,200,96',
|
|
145836
|
-
//113
|
|
145837
|
-
'95,200,144',
|
|
145838
|
-
//114
|
|
145839
|
-
'0,151,64',
|
|
145840
|
-
//115
|
|
145841
|
-
'79,151,111',
|
|
145842
|
-
//116
|
|
145843
|
-
'0,127,63',
|
|
145844
|
-
//117
|
|
145845
|
-
'63,127,95',
|
|
145846
|
-
//118
|
|
145847
|
-
'0,72,32',
|
|
145848
|
-
//119
|
|
145849
|
-
'31,72,48',
|
|
145850
|
-
//120
|
|
145851
|
-
'0,255,191',
|
|
145852
|
-
//121
|
|
145853
|
-
'127,255,223',
|
|
145854
|
-
//122
|
|
145855
|
-
'0,200,144',
|
|
145856
|
-
//123
|
|
145857
|
-
'95,200,175',
|
|
145858
|
-
//124
|
|
145859
|
-
'0,151,111',
|
|
145860
|
-
//125
|
|
145861
|
-
'79,151,128',
|
|
145862
|
-
//126
|
|
145863
|
-
'0,120,95',
|
|
145864
|
-
//127
|
|
145865
|
-
'63,127,111',
|
|
145866
|
-
//128
|
|
145867
|
-
'0,72,48',
|
|
145868
|
-
//129
|
|
145869
|
-
'32,72,63',
|
|
145870
|
-
//130
|
|
145871
|
-
'0,255,255',
|
|
145872
|
-
//131
|
|
145873
|
-
'127,255,255',
|
|
145874
|
-
//132
|
|
145875
|
-
'0,200,207',
|
|
145876
|
-
//133
|
|
145877
|
-
'96,200,207',
|
|
145878
|
-
//134
|
|
145879
|
-
'0,151,144',
|
|
145880
|
-
//135
|
|
145881
|
-
'64,151,144',
|
|
145882
|
-
//136
|
|
145883
|
-
'0,127,127',
|
|
145884
|
-
//137
|
|
145885
|
-
'63,127,127',
|
|
145886
|
-
//138
|
|
145887
|
-
'0,72,79',
|
|
145888
|
-
//139
|
|
145889
|
-
'32,72,79',
|
|
145890
|
-
//140
|
|
145891
|
-
'0,191,255',
|
|
145892
|
-
//141
|
|
145893
|
-
'127,223,255',
|
|
145894
|
-
//142
|
|
145895
|
-
'0,152,207',
|
|
145896
|
-
//143
|
|
145897
|
-
'96,176,207',
|
|
145898
|
-
//144
|
|
145899
|
-
'0,111,144',
|
|
145900
|
-
//145
|
|
145901
|
-
'64,128,144',
|
|
145902
|
-
//146
|
|
145903
|
-
'0,95,127',
|
|
145904
|
-
//147
|
|
145905
|
-
'63,111,127',
|
|
145906
|
-
//148
|
|
145907
|
-
'0,55,64',
|
|
145908
|
-
//149
|
|
145909
|
-
'31,63,64',
|
|
145910
|
-
//150
|
|
145911
|
-
'0,127,255',
|
|
145912
|
-
//151
|
|
145913
|
-
'112,184,255',
|
|
145914
|
-
//152
|
|
145915
|
-
'0,96,192',
|
|
145916
|
-
//153
|
|
145917
|
-
'96,151,207',
|
|
145918
|
-
//154
|
|
145919
|
-
'0,72,159',
|
|
145920
|
-
//155
|
|
145921
|
-
'79,112,144',
|
|
145922
|
-
//156
|
|
145923
|
-
'0,63,127',
|
|
145924
|
-
//157
|
|
145925
|
-
'63,95,127',
|
|
145926
|
-
//158
|
|
145927
|
-
'0,39,79',
|
|
145928
|
-
//159
|
|
145929
|
-
'32,56,79',
|
|
145930
|
-
//160
|
|
145931
|
-
'0,63,255',
|
|
145932
|
-
//161
|
|
145933
|
-
'127,159,255',
|
|
145934
|
-
//162
|
|
145935
|
-
'0,48,207',
|
|
145936
|
-
//163
|
|
145937
|
-
'96,127,207',
|
|
145938
|
-
//164
|
|
145939
|
-
'0,39,159',
|
|
145940
|
-
//165
|
|
145941
|
-
'64,95,144',
|
|
145942
|
-
//166
|
|
145943
|
-
'0,24,127',
|
|
145944
|
-
//167
|
|
145945
|
-
'63,79,127',
|
|
145946
|
-
//168
|
|
145947
|
-
'0,15,64',
|
|
145948
|
-
//169
|
|
145949
|
-
'32,47,79',
|
|
145950
|
-
//170
|
|
145951
|
-
'0,0,255',
|
|
145952
|
-
//171
|
|
145953
|
-
'127,127,255',
|
|
145954
|
-
//172
|
|
145955
|
-
'0,0,207',
|
|
145956
|
-
//173
|
|
145957
|
-
'95,96,192',
|
|
145958
|
-
//174
|
|
145959
|
-
'0,0,144',
|
|
145960
|
-
//175
|
|
145961
|
-
'79,72,159',
|
|
145962
|
-
//176
|
|
145963
|
-
'0,0,127',
|
|
145964
|
-
//177
|
|
145965
|
-
'63,63,127',
|
|
145966
|
-
//178
|
|
145967
|
-
'0,0,64',
|
|
145968
|
-
//179
|
|
145969
|
-
'32,39,79',
|
|
145970
|
-
//180
|
|
145971
|
-
'63,0,255',
|
|
145972
|
-
//181
|
|
145973
|
-
'159,127,255',
|
|
145974
|
-
//182
|
|
145975
|
-
'47,0,192',
|
|
145976
|
-
//183
|
|
145977
|
-
'127,103,207',
|
|
145978
|
-
//184
|
|
145979
|
-
'32,0,144',
|
|
145980
|
-
//185
|
|
145981
|
-
'80,72,144',
|
|
145982
|
-
//186
|
|
145983
|
-
'31,0,127',
|
|
145984
|
-
//187
|
|
145985
|
-
'79,63,127',
|
|
145986
|
-
//188
|
|
145987
|
-
'15,0,79',
|
|
145988
|
-
//189
|
|
145989
|
-
'47,39,79',
|
|
145990
|
-
//190
|
|
145991
|
-
'127,0,255',
|
|
145992
|
-
//191
|
|
145993
|
-
'191,127,255',
|
|
145994
|
-
//192
|
|
145995
|
-
'96,0,207',
|
|
145996
|
-
//193
|
|
145997
|
-
'144,103,207',
|
|
145998
|
-
//194
|
|
145999
|
-
'79,0,144',
|
|
146000
|
-
//195
|
|
146001
|
-
'111,72,144',
|
|
146002
|
-
//196
|
|
146003
|
-
'63,0,127',
|
|
146004
|
-
//197
|
|
146005
|
-
'95,63,127',
|
|
146006
|
-
//198
|
|
146007
|
-
'31,0,64',
|
|
146008
|
-
//199
|
|
146009
|
-
'48,39,79',
|
|
146010
|
-
//200
|
|
146011
|
-
'191,0,255',
|
|
146012
|
-
//201
|
|
146013
|
-
'223,127,255',
|
|
146014
|
-
//202
|
|
146015
|
-
'144,0,207',
|
|
146016
|
-
//203
|
|
146017
|
-
'175,96,192',
|
|
146018
|
-
//204
|
|
146019
|
-
'111,0,144',
|
|
146020
|
-
//205
|
|
146021
|
-
'128,72,159',
|
|
146022
|
-
//206
|
|
146023
|
-
'95,0,127',
|
|
146024
|
-
//207
|
|
146025
|
-
'96,56,112',
|
|
146026
|
-
//208
|
|
146027
|
-
'48,0,64',
|
|
146028
|
-
//209
|
|
146029
|
-
'64,39,79',
|
|
146030
|
-
//210
|
|
146031
|
-
'255,0,255',
|
|
146032
|
-
//211
|
|
146033
|
-
'255,127,255',
|
|
146034
|
-
//212
|
|
146035
|
-
'192,0,192',
|
|
146036
|
-
//213
|
|
146037
|
-
'192,96,192',
|
|
146038
|
-
//214
|
|
146039
|
-
'144,0,144',
|
|
146040
|
-
//215
|
|
146041
|
-
'144,72,144',
|
|
146042
|
-
//216
|
|
146043
|
-
'127,0,127',
|
|
146044
|
-
//217
|
|
146045
|
-
'127,63,127',
|
|
146046
|
-
//218
|
|
146047
|
-
'79,0,79',
|
|
146048
|
-
//219
|
|
146049
|
-
'64,32,64',
|
|
146050
|
-
//220
|
|
146051
|
-
'255,0,191',
|
|
146052
|
-
//221
|
|
146053
|
-
'255,127,223',
|
|
146054
|
-
//222
|
|
146055
|
-
'192,0,144',
|
|
146056
|
-
//223
|
|
146057
|
-
'192,96,175',
|
|
146058
|
-
//224
|
|
146059
|
-
'144,0,111',
|
|
146060
|
-
//225
|
|
146061
|
-
'144,72,128',
|
|
146062
|
-
//226
|
|
146063
|
-
'127,0,95',
|
|
146064
|
-
//227
|
|
146065
|
-
'127,56,111',
|
|
146066
|
-
//228
|
|
146067
|
-
'64,0,48',
|
|
146068
|
-
//229
|
|
146069
|
-
'79,39,63',
|
|
146070
|
-
//230
|
|
146071
|
-
'255,0,127',
|
|
146072
|
-
//231
|
|
146073
|
-
'255,127,191',
|
|
146074
|
-
//232
|
|
146075
|
-
'192,0,95',
|
|
146076
|
-
//233
|
|
146077
|
-
'192,96,144',
|
|
146078
|
-
//234
|
|
146079
|
-
'159,0,79',
|
|
146080
|
-
//235
|
|
146081
|
-
'144,72,111',
|
|
146082
|
-
//236
|
|
146083
|
-
'127,0,63',
|
|
146084
|
-
//237
|
|
146085
|
-
'127,63,95',
|
|
146086
|
-
//238
|
|
146087
|
-
'64,0,31',
|
|
146088
|
-
//239
|
|
146089
|
-
'64,32,48',
|
|
146090
|
-
//240
|
|
146091
|
-
'255,0,63',
|
|
146092
|
-
//241
|
|
146093
|
-
'255,127,159',
|
|
146094
|
-
//242
|
|
146095
|
-
'207,0,48',
|
|
146096
|
-
//243
|
|
146097
|
-
'207,103,127',
|
|
146098
|
-
//244
|
|
146099
|
-
'144,0,32',
|
|
146100
|
-
//245
|
|
146101
|
-
'144,72,95',
|
|
146102
|
-
//246
|
|
146103
|
-
'127,0,31',
|
|
146104
|
-
//247
|
|
146105
|
-
'127,63,79',
|
|
146106
|
-
//248
|
|
146107
|
-
'79,0,15',
|
|
146108
|
-
//249
|
|
146109
|
-
'64,32,47',
|
|
146110
|
-
//250
|
|
146111
|
-
'47,47,47',
|
|
146112
|
-
//251
|
|
146113
|
-
'80,88,80',
|
|
146114
|
-
//252
|
|
146115
|
-
'128,128,128',
|
|
146116
|
-
//253
|
|
146117
|
-
'175,175,175',
|
|
146118
|
-
//254
|
|
146119
|
-
'208,215,208',
|
|
146120
|
-
//255
|
|
146121
|
-
'255,255,255' //256
|
|
146122
|
-
];
|
|
145616
|
+
function computeBoundingBox(x, y) {
|
|
145617
|
+
if (x < entityFormatting_minX) entityFormatting_minX = x;
|
|
145618
|
+
if (x > maxX) maxX = x;
|
|
145619
|
+
if (y < entityFormatting_minY) entityFormatting_minY = y;
|
|
145620
|
+
if (y > maxY) maxY = y;
|
|
145621
|
+
}
|
|
146123
145622
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-flcanvas/index.vue?vue&type=script&lang=js
|
|
146124
145623
|
function com_flcanvasvue_type_script_lang_js_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = com_flcanvasvue_type_script_lang_js_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
146125
145624
|
function com_flcanvasvue_type_script_lang_js_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return com_flcanvasvue_type_script_lang_js_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? com_flcanvasvue_type_script_lang_js_arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -146174,6 +145673,7 @@ function downloadPDF(base64, fileName) {
|
|
|
146174
145673
|
this.konvaStage = null;
|
|
146175
145674
|
this.konvaLayer = null;
|
|
146176
145675
|
this.recordLayerConfig = {};
|
|
145676
|
+
this.drawingGroup = null;
|
|
146177
145677
|
this.activedSvgPan = {
|
|
146178
145678
|
x: 0,
|
|
146179
145679
|
y: 0,
|
|
@@ -146292,6 +145792,28 @@ function downloadPDF(base64, fileName) {
|
|
|
146292
145792
|
methods: {
|
|
146293
145793
|
// 图纸居中展示
|
|
146294
145794
|
centerDraw: function centerDraw() {
|
|
145795
|
+
// let canvasWidth = this.konvaStage.width();
|
|
145796
|
+
// let canvasHeight = this.konvaStage.height();
|
|
145797
|
+
// const groupBounds = this.drawingGroup.getClientRect({ skipTransform: true });
|
|
145798
|
+
// const bboxWidth = groupBounds.width || 1;
|
|
145799
|
+
// const bboxHeight = groupBounds.height || 1;
|
|
145800
|
+
|
|
145801
|
+
// // 计算缩放和平移
|
|
145802
|
+
// const padding = 0.5;
|
|
145803
|
+
// const scale = Math.min(
|
|
145804
|
+
// (canvasWidth - padding * 2) / bboxWidth,
|
|
145805
|
+
// (canvasHeight - padding * 2) / bboxHeight
|
|
145806
|
+
// );
|
|
145807
|
+
// const offsetX = (canvasWidth - bboxWidth * scale) / 2 - groupBounds.x * scale;
|
|
145808
|
+
// const offsetY = (canvasHeight - bboxHeight * scale) / 2 - groupBounds.y * scale;
|
|
145809
|
+
|
|
145810
|
+
// // 应用变换
|
|
145811
|
+
// this.drawingGroup.x(offsetX);
|
|
145812
|
+
// this.drawingGroup.y(offsetY);
|
|
145813
|
+
// this.drawingGroup.scaleX(scale);
|
|
145814
|
+
// this.drawingGroup.scaleY(scale);
|
|
145815
|
+
// this.konvaStage.batchDraw()
|
|
145816
|
+
// return
|
|
146295
145817
|
if (this.bounds) {
|
|
146296
145818
|
var _this$calculateScaleA = this.calculateScaleAndPosition(this.bounds, this.konvaStage.width(), this.konvaStage.height(), 0.05 // 5% 边距
|
|
146297
145819
|
),
|
|
@@ -146313,6 +145835,7 @@ function downloadPDF(base64, fileName) {
|
|
|
146313
145835
|
calculateScaleAndPosition: function calculateScaleAndPosition(contentBounds, stageWidth, stageHeight) {
|
|
146314
145836
|
var padding = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.1;
|
|
146315
145837
|
// 1. 计算内容的实际宽高
|
|
145838
|
+
console.log(stageWidth, stageHeight);
|
|
146316
145839
|
var contentWidth = contentBounds.maxX - contentBounds.minX;
|
|
146317
145840
|
var contentHeight = contentBounds.maxY - contentBounds.minY;
|
|
146318
145841
|
|
|
@@ -146356,6 +145879,23 @@ function downloadPDF(base64, fileName) {
|
|
|
146356
145879
|
y: y
|
|
146357
145880
|
};
|
|
146358
145881
|
},
|
|
145882
|
+
calTransform: function calTransform(bbox, canvasWidth, canvasHeight) {
|
|
145883
|
+
var padding = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
145884
|
+
var drawingWidth = bbox.maxX - bbox.minX || 1;
|
|
145885
|
+
var drawingHeight = bbox.maxY - bbox.minY || 1;
|
|
145886
|
+
var availableWidth = canvasWidth - padding * 2;
|
|
145887
|
+
var availableHeight = canvasHeight - padding * 2;
|
|
145888
|
+
var scale = Math.min(availableWidth / drawingWidth, availableHeight / drawingHeight);
|
|
145889
|
+
var scaledWidth = drawingWidth * scale;
|
|
145890
|
+
var scaledHeight = drawingHeight * scale;
|
|
145891
|
+
var offsetX = (canvasWidth - scaledWidth) / 2 - bbox.minX * scale;
|
|
145892
|
+
var offsetY = (canvasHeight - scaledHeight) / 2 - bbox.minY * scale;
|
|
145893
|
+
return {
|
|
145894
|
+
offsetX: offsetX,
|
|
145895
|
+
offsetY: offsetY,
|
|
145896
|
+
scale: scale
|
|
145897
|
+
};
|
|
145898
|
+
},
|
|
146359
145899
|
updateBounds: function updateBounds(v) {
|
|
146360
145900
|
if (this.bounds === null) {
|
|
146361
145901
|
this.bounds = {
|
|
@@ -146400,9 +145940,7 @@ function downloadPDF(base64, fileName) {
|
|
|
146400
145940
|
},
|
|
146401
145941
|
//思路是计算居中包围盒,然后排除脏数据。
|
|
146402
145942
|
loadDxf: function loadDxf(data) {
|
|
146403
|
-
var
|
|
146404
|
-
_this$$refs$svgDraw2,
|
|
146405
|
-
_this3 = this;
|
|
145943
|
+
var _this3 = this;
|
|
146406
145944
|
this.bounds = null;
|
|
146407
145945
|
this.konvaLayer.destroyChildren();
|
|
146408
145946
|
var flag = this.formatDrawData(data, 'updateBounds');
|
|
@@ -146414,17 +145952,22 @@ function downloadPDF(base64, fileName) {
|
|
|
146414
145952
|
}
|
|
146415
145953
|
|
|
146416
145954
|
//缩放视口
|
|
146417
|
-
|
|
146418
|
-
|
|
146419
|
-
|
|
146420
|
-
if (ratio > 2) {
|
|
146421
|
-
|
|
146422
|
-
|
|
146423
|
-
}
|
|
146424
|
-
|
|
145955
|
+
// let scale = 1;
|
|
145956
|
+
// const boundingRect = this.konvaLayer.getClientRect();
|
|
145957
|
+
// let ratio = Number((this.$refs.svgDraw?.clientWidth / boundingRect.width).toFixed(1));
|
|
145958
|
+
// if (ratio > 2) {
|
|
145959
|
+
// scale = Number((boundingRect.width / boundingRect.height).toFixed(1));
|
|
145960
|
+
// scale = scale < 2 ? 2 : scale;
|
|
145961
|
+
// }
|
|
145962
|
+
console.log(this.konvaLayer);
|
|
145963
|
+
// const boundingScale = this.konvaLayer.getClientRect();
|
|
146425
145964
|
//平移视口
|
|
146426
|
-
|
|
146427
|
-
|
|
145965
|
+
// const x =
|
|
145966
|
+
// this.$refs.svgDraw?.clientWidth / 2 -
|
|
145967
|
+
// (Math.ceil(boundingScale.width) / 2 + boundingScale.x / 2);
|
|
145968
|
+
// const y =
|
|
145969
|
+
// this.$refs.svgDraw.clientHeight / 2 -
|
|
145970
|
+
// (Math.ceil(boundingScale.height) / 2 + boundingScale.y);
|
|
146428
145971
|
|
|
146429
145972
|
// this.konvaStage.scale({
|
|
146430
145973
|
// x: 2,
|
|
@@ -146476,18 +146019,10 @@ function downloadPDF(base64, fileName) {
|
|
|
146476
146019
|
var _this = this;
|
|
146477
146020
|
var parser2 = new dxf_parser_DxfParser_DxfParser();
|
|
146478
146021
|
var dxf2 = parser2.parseSync(data);
|
|
146479
|
-
// const parser = new DxfParser();
|
|
146480
|
-
// let dxf = parser.parse(data);
|
|
146481
|
-
// 在这里处理数据为空的时候
|
|
146482
|
-
// if (dxf.entities.length === 0) {
|
|
146483
|
-
// this.$emit('error', {
|
|
146484
|
-
// type: 'entityEmpty'
|
|
146485
|
-
// })
|
|
146486
|
-
// return
|
|
146487
|
-
// }
|
|
146488
146022
|
if (dxf2.entities.length === 0) {
|
|
146489
146023
|
return false;
|
|
146490
146024
|
}
|
|
146025
|
+
var entities = formatEntity(dxf2.entities);
|
|
146491
146026
|
var hatchEntitys = dxf2.entities.filter(function (item) {
|
|
146492
146027
|
return item.type === 'HATCH';
|
|
146493
146028
|
});
|
|
@@ -146571,6 +146106,7 @@ function downloadPDF(base64, fileName) {
|
|
|
146571
146106
|
name: name,
|
|
146572
146107
|
entityId: _entity.layer,
|
|
146573
146108
|
strokeWidth: 0.2,
|
|
146109
|
+
strokeScaleEnabled: false,
|
|
146574
146110
|
closed: true,
|
|
146575
146111
|
fill: color,
|
|
146576
146112
|
stroke: color,
|
|
@@ -146579,6 +146115,7 @@ function downloadPDF(base64, fileName) {
|
|
|
146579
146115
|
shapeType: 'hatch'
|
|
146580
146116
|
});
|
|
146581
146117
|
this.konvaLayer.add(line);
|
|
146118
|
+
// this.drawingGroup.add(line);
|
|
146582
146119
|
}
|
|
146583
146120
|
} else {
|
|
146584
146121
|
var _boundaryLoops = entity.boundaryLoops;
|
|
@@ -146616,8 +146153,10 @@ function downloadPDF(base64, fileName) {
|
|
|
146616
146153
|
stroke: color,
|
|
146617
146154
|
customColor: color,
|
|
146618
146155
|
visible: visible,
|
|
146619
|
-
shapeType: 'hatch'
|
|
146156
|
+
shapeType: 'hatch',
|
|
146157
|
+
strokeScaleEnabled: false
|
|
146620
146158
|
});
|
|
146159
|
+
// this.drawingGroup.add(line)
|
|
146621
146160
|
this.konvaLayer.add(_line);
|
|
146622
146161
|
}
|
|
146623
146162
|
}
|
|
@@ -146626,7 +146165,7 @@ function downloadPDF(base64, fileName) {
|
|
|
146626
146165
|
// }
|
|
146627
146166
|
}
|
|
146628
146167
|
//加载图纸
|
|
146629
|
-
|
|
146168
|
+
|
|
146630
146169
|
for (var key in entities) {
|
|
146631
146170
|
if (entities[key]) {
|
|
146632
146171
|
var group = [];
|
|
@@ -146662,7 +146201,9 @@ function downloadPDF(base64, fileName) {
|
|
|
146662
146201
|
entityId: key,
|
|
146663
146202
|
stroke: colorKey,
|
|
146664
146203
|
customColor: _configParams ? _configParams.color : colorKey,
|
|
146665
|
-
|
|
146204
|
+
strokeScaleEnabled: false,
|
|
146205
|
+
// 加上这句是当坐标点巨大时也能正常显示
|
|
146206
|
+
// visible: configParams ? configParams.visible : true,
|
|
146666
146207
|
sceneFunc: function sceneFunc(context, shape) {
|
|
146667
146208
|
context.beginPath();
|
|
146668
146209
|
for (var _i5 = 0; _i5 < entityColorGroup.length; _i5++) {
|
|
@@ -146706,11 +146247,11 @@ function downloadPDF(base64, fileName) {
|
|
|
146706
146247
|
context.lineTo(x, y);
|
|
146707
146248
|
}
|
|
146708
146249
|
}
|
|
146709
|
-
|
|
146710
|
-
|
|
146711
|
-
|
|
146712
|
-
|
|
146713
|
-
}
|
|
146250
|
+
}
|
|
146251
|
+
if (closed) {
|
|
146252
|
+
/// if (j === points.length - 1) {
|
|
146253
|
+
context.lineTo(points[0], points[1]);
|
|
146254
|
+
// }
|
|
146714
146255
|
}
|
|
146715
146256
|
if (_entity3.lineType === 'DASH') {
|
|
146716
146257
|
context.setLineDash(_entity3.dash);
|
|
@@ -146724,6 +146265,7 @@ function downloadPDF(base64, fileName) {
|
|
|
146724
146265
|
});
|
|
146725
146266
|
if (_this4.konvaLayer) {
|
|
146726
146267
|
_this4.konvaLayer.add(customShape);
|
|
146268
|
+
// this.drawingGroup.add(customShape)
|
|
146727
146269
|
// 直接在这里调用draw 能拿到最新数据 不执行的话 就会导致最后执行 导致bounds的数据出错
|
|
146728
146270
|
_this4.konvaLayer.draw();
|
|
146729
146271
|
}
|
|
@@ -146735,6 +146277,7 @@ function downloadPDF(base64, fileName) {
|
|
|
146735
146277
|
}
|
|
146736
146278
|
}
|
|
146737
146279
|
}
|
|
146280
|
+
// 计算
|
|
146738
146281
|
return true;
|
|
146739
146282
|
},
|
|
146740
146283
|
toPdfs: function toPdfs(list) {
|
|
@@ -146887,8 +146430,8 @@ function downloadPDF(base64, fileName) {
|
|
|
146887
146430
|
});
|
|
146888
146431
|
// CONCATENATED MODULE: ./packages/components/com-flcanvas/index.vue?vue&type=script&lang=js
|
|
146889
146432
|
/* harmony default export */ var components_com_flcanvasvue_type_script_lang_js = (com_flcanvasvue_type_script_lang_js);
|
|
146890
|
-
// EXTERNAL MODULE: ./packages/components/com-flcanvas/index.vue?vue&type=style&index=0&id=
|
|
146891
|
-
var
|
|
146433
|
+
// EXTERNAL MODULE: ./packages/components/com-flcanvas/index.vue?vue&type=style&index=0&id=aa5e04ac&prod&lang=scss&scoped=true
|
|
146434
|
+
var com_flcanvasvue_type_style_index_0_id_aa5e04ac_prod_lang_scss_scoped_true = __webpack_require__("c2dd");
|
|
146892
146435
|
|
|
146893
146436
|
// CONCATENATED MODULE: ./packages/components/com-flcanvas/index.vue
|
|
146894
146437
|
|
|
@@ -146901,17 +146444,17 @@ var com_flcanvasvue_type_style_index_0_id_177cbfe4_prod_lang_scss_scoped_true =
|
|
|
146901
146444
|
|
|
146902
146445
|
var com_flcanvas_component = normalizeComponent(
|
|
146903
146446
|
components_com_flcanvasvue_type_script_lang_js,
|
|
146904
|
-
|
|
146905
|
-
|
|
146447
|
+
com_flcanvasvue_type_template_id_aa5e04ac_scoped_true_render,
|
|
146448
|
+
com_flcanvasvue_type_template_id_aa5e04ac_scoped_true_staticRenderFns,
|
|
146906
146449
|
false,
|
|
146907
146450
|
null,
|
|
146908
|
-
"
|
|
146451
|
+
"aa5e04ac",
|
|
146909
146452
|
null
|
|
146910
146453
|
|
|
146911
146454
|
)
|
|
146912
146455
|
|
|
146913
146456
|
/* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
|
|
146914
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
146457
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"61188ed9-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/per-control.vue?vue&type=template&id=3fceaac3&scoped=true
|
|
146915
146458
|
var per_controlvue_type_template_id_3fceaac3_scoped_true_render = function render() {
|
|
146916
146459
|
var _vm = this,
|
|
146917
146460
|
_c = _vm._self._c;
|
|
@@ -147025,7 +146568,7 @@ var per_control_component = normalizeComponent(
|
|
|
147025
146568
|
)
|
|
147026
146569
|
|
|
147027
146570
|
/* harmony default export */ var per_control = (per_control_component.exports);
|
|
147028
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
146571
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"61188ed9-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/pid.vue?vue&type=template&id=2572c0e2&scoped=true
|
|
147029
146572
|
var pidvue_type_template_id_2572c0e2_scoped_true_render = function render() {
|
|
147030
146573
|
var _vm = this,
|
|
147031
146574
|
_c = _vm._self._c;
|
|
@@ -147072,7 +146615,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
|
|
|
147072
146615
|
var html2canvas = __webpack_require__("c0e9");
|
|
147073
146616
|
var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
|
|
147074
146617
|
|
|
147075
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
146618
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"61188ed9-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/component/ann-tool.vue?vue&type=template&id=4b17bce0&scoped=true
|
|
147076
146619
|
var ann_toolvue_type_template_id_4b17bce0_scoped_true_render = function render() {
|
|
147077
146620
|
var _vm = this,
|
|
147078
146621
|
_c = _vm._self._c;
|