|
@@ -3,6 +3,7 @@ import { SGraphScene, SGraphLayoutType } from '@saga-web/graph/lib';
|
|
|
import { SFloorParser, SLineItem, SPolylineItem, SItemStatus, ItemOrder } from "@saga-web/big";
|
|
|
import { SGraphItem, SImageItem, STextItem, SGraphPointListInsert, SGraphPointListDelete, SGraphPointListUpdate, SGraphAddCommand } from "@saga-web/graph/lib";
|
|
|
import { SZoneLegendItem } from "@/lib/items/SZoneLegendItem";
|
|
|
+import { SImageLegendItem } from "@/lib/items/SImageLegendItem";
|
|
|
import { TipelineItem } from "@/lib/items/TipelineItem";
|
|
|
import { SImgTextItem } from "@/lib/items/SImgTextItem";
|
|
|
import { SImageMarkerItem } from "@/lib/items/SImageMarkerItem"
|
|
@@ -138,19 +139,7 @@ export class EditScence extends SGraphScene {
|
|
|
* 增加多边形item
|
|
|
*/
|
|
|
addPolygonItem(event: SMouseEvent): void {
|
|
|
- //创建item
|
|
|
- const Legend = {
|
|
|
- Name: "哈哈",
|
|
|
- GraphElementType: 'Zone',
|
|
|
- GraphElementId: '123',
|
|
|
- Pos: { x: 0, y: 0 },
|
|
|
- OutLine: [[new SPoint(event.x, event.y)]],
|
|
|
- Properties: {
|
|
|
- strokeColor: '#3d73c0',
|
|
|
- fillColor: '#eda986'
|
|
|
- },
|
|
|
- Num: 123
|
|
|
- }
|
|
|
+
|
|
|
const LegendData: Legend = {
|
|
|
ID: uuid(),
|
|
|
Name: this._legend.Name,
|
|
@@ -212,13 +201,14 @@ export class EditScence extends SGraphScene {
|
|
|
this.grabItem == null;
|
|
|
this.focusItem = item;
|
|
|
this.cmd = 'choice';
|
|
|
+ // this.Markers.push(item)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 增加文字item
|
|
|
*/
|
|
|
addTextItem(event: SMouseEvent): void {
|
|
|
- const item = new STextItem(null, '请在右侧属性栏输入文字!');
|
|
|
+ const item = new SImageLegendItem(null, '请在右侧属性栏输入文字!');
|
|
|
item.moveTo(event.x, event.y);
|
|
|
item.selectable = true;
|
|
|
item.moveable = true;
|
|
@@ -226,13 +216,14 @@ export class EditScence extends SGraphScene {
|
|
|
this.addItem(item);
|
|
|
this.grabItem == null
|
|
|
this.cmd = 'choice';
|
|
|
+ this.Markers.push(item)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 增加图标
|
|
|
*/
|
|
|
addIconItem(event: SMouseEvent): void {
|
|
|
- const item = new STextItem(null, '请在右侧属性栏输入文字!');
|
|
|
+ const item = new SImageLegendItem(null, '请在右侧属性栏输入文字!');
|
|
|
this.grabItem == null
|
|
|
this.cmd = 'choice';
|
|
|
item.selectable = true;
|