fl-web-component 2.0.0-beta.8 → 2.0.0-beta.9
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.
|
@@ -30975,7 +30975,7 @@ Factory_1.Factory.addGetterSetter(Node_1.Node, 'blue', 0, Validators_1.RGBCompon
|
|
|
30975
30975
|
/***/ "9224":
|
|
30976
30976
|
/***/ (function(module) {
|
|
30977
30977
|
|
|
30978
|
-
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.0-beta.
|
|
30978
|
+
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.0.0-beta.9\",\"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\":\"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\":{\"3d-tiles-renderer\":\"^0.4.14\",\"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-plugin-vue\":\"^6.2.2\",\"patch-package\":\"^6.4.7\",\"sass\":\"1.32.13\",\"sass-loader\":\"10.1.1\",\"vue-template-compiler\":\"^2.6.11\",\"worker-loader\":\"^3.0.8\"},\"eslintConfig\":{\"root\":true,\"env\":{\"node\":true},\"extends\":[\"plugin:vue/essential\",\"eslint:recommended\"],\"parserOptions\":{\"parser\":\"babel-eslint\"},\"rules\":{}},\"browserslist\":[\"> 1%\",\"last 2 versions\"]}");
|
|
30979
30979
|
|
|
30980
30980
|
/***/ }),
|
|
30981
30981
|
|
|
@@ -45816,7 +45816,7 @@ if (typeof window !== 'undefined') {
|
|
|
45816
45816
|
// Indicate to webpack that this file can be concatenated
|
|
45817
45817
|
/* harmony default export */ var setPublicPath = (null);
|
|
45818
45818
|
|
|
45819
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
45819
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"78dbbca7-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=5e18bf7c&scoped=true
|
|
45820
45820
|
var com_graphicsvue_type_template_id_5e18bf7c_scoped_true_render = function render() {
|
|
45821
45821
|
var _vm = this,
|
|
45822
45822
|
_c = _vm._self._c;
|
|
@@ -86906,7 +86906,7 @@ var component = normalizeComponent(
|
|
|
86906
86906
|
)
|
|
86907
86907
|
|
|
86908
86908
|
/* harmony default export */ var com_graphics = (component.exports);
|
|
86909
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
86909
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"78dbbca7-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=459d4d3b&scoped=true
|
|
86910
86910
|
var com_flcanvasvue_type_template_id_459d4d3b_scoped_true_render = function render() {
|
|
86911
86911
|
var _vm = this,
|
|
86912
86912
|
_c = _vm._self._c;
|
|
@@ -89573,20 +89573,17 @@ function entityFormatting_drawText(recordDxf, entity, group, key, configParams)
|
|
|
89573
89573
|
hex = '#000';
|
|
89574
89574
|
}
|
|
89575
89575
|
var text = entity.text;
|
|
89576
|
-
var fontSize =
|
|
89577
|
-
|
|
89578
|
-
|
|
89579
|
-
|
|
89580
|
-
fontSize = entity.textHeight + 0.35;
|
|
89581
|
-
}
|
|
89582
|
-
var startPoint = entity.startPoint;
|
|
89583
|
-
var x = startPoint.x;
|
|
89584
|
-
var y = startPoint.y;
|
|
89576
|
+
var fontSize = entity.textHeight;
|
|
89577
|
+
|
|
89578
|
+
// 与 AutoCAD TEXT 一致:绕插入点对齐锚点旋转;Y 轴翻转后角度用 360°-θ
|
|
89579
|
+
var insert = entity.endPoint && (entity.halign !== undefined || entity.valign !== undefined) ? entity.endPoint : entity.startPoint;
|
|
89585
89580
|
var dim = new Konva.Text({
|
|
89586
|
-
x:
|
|
89587
|
-
y:
|
|
89581
|
+
x: 0,
|
|
89582
|
+
y: 0,
|
|
89588
89583
|
text: text,
|
|
89589
89584
|
fontSize: fontSize,
|
|
89585
|
+
align: "left",
|
|
89586
|
+
verticalAlign: "top",
|
|
89590
89587
|
fill: hex,
|
|
89591
89588
|
customColor: configParams ? configParams.color : "",
|
|
89592
89589
|
name: key.replace(/\s*/g, ""),
|
|
@@ -89596,99 +89593,63 @@ function entityFormatting_drawText(recordDxf, entity, group, key, configParams)
|
|
|
89596
89593
|
stroke: hex,
|
|
89597
89594
|
strokeWidth: 0.1
|
|
89598
89595
|
});
|
|
89599
|
-
|
|
89600
|
-
|
|
89601
|
-
|
|
89602
|
-
|
|
89603
|
-
|
|
89604
|
-
|
|
89605
|
-
|
|
89606
|
-
|
|
89607
|
-
|
|
89608
|
-
|
|
89609
|
-
|
|
89610
|
-
|
|
89611
|
-
|
|
89612
|
-
|
|
89613
|
-
|
|
89614
|
-
|
|
89615
|
-
if (entity.rotation == 180 || parseInt(entity.rotation) == 180) {
|
|
89616
|
-
dim.attrs.y = -parseFloat(y) - fontSize;
|
|
89617
|
-
}
|
|
89618
|
-
if (entity.rotation == 360 || parseFloat(entity.rotation) == 360) {
|
|
89619
|
-
dim.attrs.y = -parseFloat(y) - fontSize;
|
|
89620
|
-
}
|
|
89621
|
-
if (parseInt(entity.rotation) == 30 || parseInt(entity.rotation) == 29) {
|
|
89622
|
-
//dim.attrs.x= parseFloat(x) -200;
|
|
89623
|
-
|
|
89624
|
-
//console.log("rect");
|
|
89625
|
-
//console.log(rect);
|
|
89626
|
-
dim.attrs.y = -parseFloat(y) - fontSize * 0.85;
|
|
89627
|
-
dim.attrs.x = parseFloat(x) - fontSize * 0.85;
|
|
89628
|
-
if (text.length > 9) {
|
|
89629
|
-
var _width = dim.getTextWidth();
|
|
89630
|
-
//let clientRect=dim.getClientRect()
|
|
89631
|
-
//let clientWidth=clientRect.width;
|
|
89632
|
-
dim.attrs.y = -parseFloat(y) + fontSize;
|
|
89633
|
-
if (entity.halign) {
|
|
89634
|
-
if (entity.halign == 1) {
|
|
89635
|
-
dim.attrs.x = dim.attrs.x - _width / 2;
|
|
89636
|
-
}
|
|
89637
|
-
}
|
|
89638
|
-
if (entity.valign === 3) {
|
|
89639
|
-
// Middle
|
|
89640
|
-
dim.attrs.x = dim.attrs.x + 1;
|
|
89641
|
-
dim.attrs.y = -parseFloat(y) + fontSize * 1.8;
|
|
89642
|
-
}
|
|
89643
|
-
} else {
|
|
89644
|
-
if (entity.valign === 3) {
|
|
89645
|
-
// Middle
|
|
89646
|
-
dim.attrs.x = dim.attrs.x + 1;
|
|
89647
|
-
dim.attrs.y = -parseFloat(y);
|
|
89648
|
-
}
|
|
89649
|
-
}
|
|
89650
|
-
}
|
|
89651
|
-
if (parseInt(entity.rotation) == 330 || parseInt(entity.rotation) == 329) {
|
|
89652
|
-
//dim.attrs.x= parseFloat(x) -200;
|
|
89653
|
-
|
|
89654
|
-
//console.log("rect");
|
|
89655
|
-
//console.log(rect);
|
|
89656
|
-
dim.attrs.y = -parseFloat(y) - fontSize;
|
|
89657
|
-
dim.attrs.x = parseFloat(x) + 0.5;
|
|
89658
|
-
}
|
|
89659
|
-
if (parseInt(entity.rotation) == 60 || parseInt(entity.rotation) == 60) {
|
|
89660
|
-
//dim.attrs.x= parseFloat(x) -200;
|
|
89661
|
-
|
|
89662
|
-
//console.log("rect");
|
|
89663
|
-
//console.log(rect);
|
|
89664
|
-
dim.attrs.y = -parseFloat(y);
|
|
89665
|
-
dim.attrs.x = parseFloat(x) - fontSize;
|
|
89596
|
+
if (entity.xScale) {
|
|
89597
|
+
dim.scaleX(entity.xScale);
|
|
89598
|
+
}
|
|
89599
|
+
var tw = dim.width();
|
|
89600
|
+
var th = dim.height();
|
|
89601
|
+
var lh = dim.lineHeight() || 1;
|
|
89602
|
+
// 用字体度量计算锚点,避免 valign=2(中线) 与 baseline 近似重合
|
|
89603
|
+
var ascent = fontSize * lh * 0.8;
|
|
89604
|
+
var descent = fontSize * lh * 0.2;
|
|
89605
|
+
try {
|
|
89606
|
+
var _metrics$fontBounding, _metrics$fontBounding2;
|
|
89607
|
+
var metrics = dim.measureSize(text || "M");
|
|
89608
|
+
var mAscent = (_metrics$fontBounding = metrics === null || metrics === void 0 ? void 0 : metrics.fontBoundingBoxAscent) !== null && _metrics$fontBounding !== void 0 ? _metrics$fontBounding : metrics === null || metrics === void 0 ? void 0 : metrics.actualBoundingBoxAscent;
|
|
89609
|
+
var mDescent = (_metrics$fontBounding2 = metrics === null || metrics === void 0 ? void 0 : metrics.fontBoundingBoxDescent) !== null && _metrics$fontBounding2 !== void 0 ? _metrics$fontBounding2 : metrics === null || metrics === void 0 ? void 0 : metrics.actualBoundingBoxDescent;
|
|
89610
|
+
if (typeof mAscent === "number" && mAscent > 0) {
|
|
89611
|
+
ascent = mAscent;
|
|
89666
89612
|
}
|
|
89667
|
-
|
|
89668
|
-
|
|
89669
|
-
|
|
89670
|
-
dim.attrs.rotation = 360 - entity.rotation;
|
|
89671
|
-
} else {
|
|
89672
|
-
// 支持 DXF 垂直对齐(valign),仅在未旋转时按插入点对齐
|
|
89673
|
-
if (entity.valign === 2) {
|
|
89674
|
-
// Middle
|
|
89675
|
-
dim.attrs.y = -parseFloat(y) - fontSize / 2;
|
|
89676
|
-
} else if (entity.valign === 3) {
|
|
89677
|
-
// Top
|
|
89678
|
-
dim.attrs.y = -parseFloat(y);
|
|
89679
|
-
} else {
|
|
89680
|
-
// Baseline / Bottom 或未设置,保持原逻辑
|
|
89681
|
-
dim.attrs.y = -parseFloat(y) - fontSize;
|
|
89613
|
+
if (typeof mDescent === "number" && mDescent >= 0) {
|
|
89614
|
+
descent = mDescent;
|
|
89682
89615
|
}
|
|
89683
|
-
}
|
|
89684
|
-
|
|
89685
|
-
|
|
89686
|
-
|
|
89687
|
-
|
|
89688
|
-
|
|
89616
|
+
} catch (e) {
|
|
89617
|
+
// ignore
|
|
89618
|
+
}
|
|
89619
|
+
var baselineOffset = ascent;
|
|
89620
|
+
var halign = entity.halign != null ? Number(entity.halign) : 0;
|
|
89621
|
+
var valign = entity.valign != null ? Number(entity.valign) : 0;
|
|
89622
|
+
var anchorX = 0;
|
|
89623
|
+
if (halign === 1 || halign === 4) {
|
|
89624
|
+
anchorX = tw / 2;
|
|
89625
|
+
} else if (halign === 2) {
|
|
89626
|
+
anchorX = tw;
|
|
89627
|
+
}
|
|
89628
|
+
var anchorY = baselineOffset;
|
|
89629
|
+
if (valign === 3) {
|
|
89630
|
+
anchorY = 0;
|
|
89631
|
+
} else if (valign === 2) {
|
|
89632
|
+
// DXF Middle: 使用字形上下边界中心,而不是 Konva 文本框中心
|
|
89633
|
+
anchorY = (ascent + descent) / 2;
|
|
89634
|
+
} else if (valign === 1) {
|
|
89635
|
+
anchorY = ascent + descent;
|
|
89636
|
+
}
|
|
89637
|
+
dim.x(-anchorX);
|
|
89638
|
+
dim.y(-anchorY);
|
|
89639
|
+
var rotation = Number(entity.rotation || 0);
|
|
89640
|
+
var g = new Konva.Group({
|
|
89641
|
+
x: parseFloat(insert.x),
|
|
89642
|
+
y: -parseFloat(insert.y),
|
|
89643
|
+
rotation: 360 - rotation,
|
|
89644
|
+
name: key.replace(/\s*/g, ""),
|
|
89645
|
+
entityId: key,
|
|
89646
|
+
visible: configParams ? configParams.visible : true,
|
|
89647
|
+
customColor: configParams ? configParams.color : ""
|
|
89648
|
+
});
|
|
89649
|
+
g.add(dim);
|
|
89689
89650
|
group.push({
|
|
89690
89651
|
"type": 'text',
|
|
89691
|
-
'obj':
|
|
89652
|
+
'obj': g
|
|
89692
89653
|
});
|
|
89693
89654
|
// group.add(dim);
|
|
89694
89655
|
}
|
|
@@ -90732,7 +90693,7 @@ var com_flcanvas_component = normalizeComponent(
|
|
|
90732
90693
|
)
|
|
90733
90694
|
|
|
90734
90695
|
/* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
|
|
90735
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
90696
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"78dbbca7-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=f547d5c6&scoped=true
|
|
90736
90697
|
var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
|
|
90737
90698
|
var _vm = this,
|
|
90738
90699
|
_c = _vm._self._c;
|
|
@@ -90840,7 +90801,7 @@ var per_control_component = normalizeComponent(
|
|
|
90840
90801
|
)
|
|
90841
90802
|
|
|
90842
90803
|
/* harmony default export */ var per_control = (per_control_component.exports);
|
|
90843
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
90804
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"78dbbca7-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=6e1600cc&scoped=true
|
|
90844
90805
|
var pidvue_type_template_id_6e1600cc_scoped_true_render = function render() {
|
|
90845
90806
|
var _vm = this,
|
|
90846
90807
|
_c = _vm._self._c;
|
|
@@ -90887,7 +90848,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
|
|
|
90887
90848
|
var html2canvas = __webpack_require__("c0e9");
|
|
90888
90849
|
var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
|
|
90889
90850
|
|
|
90890
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
90851
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"78dbbca7-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=5f081c10&scoped=true
|
|
90891
90852
|
var ann_toolvue_type_template_id_5f081c10_scoped_true_render = function render() {
|
|
90892
90853
|
var _vm = this,
|
|
90893
90854
|
_c = _vm._self._c;
|
|
@@ -91858,7 +91819,7 @@ var pid_component = normalizeComponent(
|
|
|
91858
91819
|
)
|
|
91859
91820
|
|
|
91860
91821
|
/* harmony default export */ var pid = (pid_component.exports);
|
|
91861
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
91822
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"78dbbca7-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-tiles/index.vue?vue&type=template&id=5504c19e&scoped=true
|
|
91862
91823
|
var com_tilesvue_type_template_id_5504c19e_scoped_true_render = function render() {
|
|
91863
91824
|
var _vm = this,
|
|
91864
91825
|
_c = _vm._self._c;
|