|
@@ -1,6 +1,6 @@
|
|
|
import { SMouseEvent, SUndoStack } from "@saga-web/base";
|
|
|
import { SGraphScene, SGraphLayoutType, SAnchorItem } from '@saga-web/graph/lib';
|
|
|
-import { SFloorParser, SLineItem, SPolylineItem, SItemStatus, ItemOrder, STooltipItem, ItemColor,Transparency } from "@saga-web/big";
|
|
|
+import { SFloorParser, SLineItem, SPolylineItem, SItemStatus, ItemOrder, STooltipItem, ItemColor,Transparency, SPolygonItem } from "@saga-web/big";
|
|
|
import { SGraphItem, SLineStyle, SGraphPropertyCommand, SImageItem, STextItem, SGraphPointListInsert, SGraphPointListDelete, SGraphPointListUpdate, SGraphAddCommand } from "@saga-web/graph/lib";
|
|
|
import { SGraphAddListCommand } from "./SGraphAddListCommand"
|
|
|
import { SGraphDeleteCommand } from "./SGraphDeleteCommand"
|
|
@@ -55,7 +55,7 @@ export class EditScence extends SGraphScene {
|
|
|
}
|
|
|
};
|
|
|
/** 绘制区域时 是否为点选 */
|
|
|
- isSelecting: boolean = false;
|
|
|
+ isSelecting: boolean = true;
|
|
|
|
|
|
/** 是否开启吸附 */
|
|
|
isAbsorbing: boolean = false;
|
|
@@ -279,7 +279,9 @@ export class EditScence extends SGraphScene {
|
|
|
font: 0,
|
|
|
color: '',
|
|
|
TextPos: { X: 0, Y: 0 },
|
|
|
- InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[]
|
|
|
+ InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[],
|
|
|
+ InfoSystemId:this._legend.InfoSystemId ? this._legend.InfoSystemId :'',
|
|
|
+ InfoLocal:this._legend.InfoLocal.length ?this._legend.InfoLocal :[]
|
|
|
},
|
|
|
}
|
|
|
let Polylines = null;
|
|
@@ -335,7 +337,9 @@ export class EditScence extends SGraphScene {
|
|
|
color: '',
|
|
|
FID: item.data.SourceId,
|
|
|
TextPos: { X: item.data.Location.Points[0].X, Y: -item.data.Location.Points[0].Y },
|
|
|
- InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[]
|
|
|
+ InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[],
|
|
|
+ InfoSystemId:this._legend.InfoSystemId ? this._legend.InfoSystemId :'',
|
|
|
+ InfoLocal:this._legend.InfoLocal.length ?this._legend.InfoLocal :[]
|
|
|
},
|
|
|
}
|
|
|
let Polylines = null;
|
|
@@ -431,7 +435,6 @@ export class EditScence extends SGraphScene {
|
|
|
*/
|
|
|
addIconItem(event: SMouseEvent): void {
|
|
|
//获取信息工程化相关参数
|
|
|
- const InfoSystemId = this._legend.InfoSystemId ? this._legend.InfoSystemId : '';
|
|
|
const LegendData: Legend = {
|
|
|
ID: uuid(),
|
|
|
Name: this._legend.Name,
|
|
@@ -454,8 +457,9 @@ export class EditScence extends SGraphScene {
|
|
|
color: '', //字体颜色
|
|
|
FrameColor: this._legend.FrameColor,
|
|
|
GraphCategoryId: this._legend.GraphCategoryId,
|
|
|
- InfoSystemId: InfoSystemId, //信息工程话分类ID分类
|
|
|
- InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[]// 铺位可视化Typeid(用于编辑工程信息化时默认问题)
|
|
|
+ InfoSystemId:this._legend.InfoSystemId ? this._legend.InfoSystemId :'' ,
|
|
|
+ InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[],// 铺位可视化Typeid(用于编辑工程信息化时默认问题)
|
|
|
+ InfoLocal:this._legend.InfoLocal.length ?this._legend.InfoLocal :[]
|
|
|
},
|
|
|
}
|
|
|
const item = new SImageLegendItem(null, LegendData);
|
|
@@ -598,8 +602,11 @@ export class EditScence extends SGraphScene {
|
|
|
let p = this.focusItem.mapFromScene(x, y)
|
|
|
// newx - oldx = newleft - oldleft
|
|
|
// 要求的值(新的x坐标) - 旧的x坐标 = 新的左边界(用户输入的值) - 旧的左边界
|
|
|
- this.focusItem.x = p.x - this.focusItem.boundingRect().left + this.focusItem.x;
|
|
|
- this.focusItem.y = p.y - this.focusItem.boundingRect().top + this.focusItem.y;
|
|
|
+ this.focusItem.x = (p.x - this.focusItem.boundingRect().left)*this.focusItem.inverseScale + this.focusItem.x;
|
|
|
+ this.focusItem.y = (p.y - this.focusItem.boundingRect().top)*this.focusItem.inverseScale + this.focusItem.y;
|
|
|
+ if(this.focusItem instanceof SPolylineItem || this.focusItem instanceof SPolygonItem || this.focusItem instanceof SLineItem){
|
|
|
+ this.focusItem.moveToOrigin(this.focusItem.x, this.focusItem.y)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|