fl-web-component 1.4.7 → 1.4.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fl-web-component",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "scripts": {
5
5
  "tip1": "仅调试本组件不涉及业务组件,请执行dev",
6
6
  "dev": "vue-cli-service serve",
@@ -416,7 +416,14 @@ function drawText(recordDxf, entity, group, key, configParams) {
416
416
  }
417
417
  dim.attrs.rotation = 360-entity.rotation ;
418
418
  }else{
419
- dim.attrs.y= -parseFloat(y) - fontSize;
419
+ // 支持 DXF 垂直对齐(valign),仅在未旋转时按插入点对齐
420
+ if (entity.valign === 2) { // Middle
421
+ dim.attrs.y = -parseFloat(y) - fontSize / 2;
422
+ } else if (entity.valign === 3) { // Top
423
+ dim.attrs.y = -parseFloat(y);
424
+ } else { // Baseline / Bottom 或未设置,保持原逻辑
425
+ dim.attrs.y = -parseFloat(y) - fontSize;
426
+ }
420
427
  }
421
428
  if (entity.xScale) {
422
429
  dim.attrs.fontSize =(fontSize+0.35)* entity.xScale;
@@ -432,6 +439,7 @@ function drawText(recordDxf, entity, group, key, configParams) {
432
439
 
433
440
  }
434
441
  }
442
+
435
443
  //dim.attrs.x= dim.attrs.x-parseFloat(2);
436
444
  group.push({
437
445
  "type":'text',