浏览代码

添加item文字位置

haojianlong 4 年之前
父节点
当前提交
12f0624a13
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/components/mapClass/EditScence.ts

+ 2 - 1
src/components/mapClass/EditScence.ts

@@ -250,6 +250,7 @@ export class EditScence extends SGraphScene {
      * 点选创建区域
     */
     clickToAddArea(item: SSpaceItem): void {
+        console.log(item)
         if (this.cmd != 'Zone') {
             return
         }
@@ -273,7 +274,7 @@ export class EditScence extends SGraphScene {
                     LineWidth: this._legend.LineWidth,
                     font: 0,
                     color: '',
-                    TextPos: { X: 0, Y: 0 }
+                    TextPos: { X: item.data.Location.Points[0].X, Y: -item.data.Location.Points[0].Y }
                 },
             }
             let Polylines = null;