|
@@ -1,5 +1,5 @@
|
|
import { SMouseEvent, SUndoStack } from "@saga-web/base";
|
|
import { SMouseEvent, SUndoStack } from "@saga-web/base";
|
|
-import { SGraphScene } from '@saga-web/graph/lib';
|
|
|
|
|
|
+import { SGraphScene,SGraphLayoutType } from '@saga-web/graph/lib';
|
|
import { SPoint, SFont } from '@saga-web/draw/lib';
|
|
import { SPoint, SFont } from '@saga-web/draw/lib';
|
|
import { SFloorParser, SLineItem, SPolylineItem, SItemStatus, ItemOrder } from "@saga-web/big";
|
|
import { SFloorParser, SLineItem, SPolylineItem, SItemStatus, ItemOrder } from "@saga-web/big";
|
|
import { SGraphItem, SImageItem, STextItem, SGraphPointListInsert, SGraphPointListDelete, SGraphPointListUpdate, SGraphAddCommand } from "@saga-web/graph/lib";
|
|
import { SGraphItem, SImageItem, STextItem, SGraphPointListInsert, SGraphPointListDelete, SGraphPointListUpdate, SGraphAddCommand } from "@saga-web/graph/lib";
|
|
@@ -39,6 +39,7 @@ export class EditScence extends SGraphScene {
|
|
this.view.update();
|
|
this.view.update();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+
|
|
/** 当前选中焦点Item */
|
|
/** 当前选中焦点Item */
|
|
focusItem: SGraphItem | null = null;
|
|
focusItem: SGraphItem | null = null;
|
|
constructor() {
|
|
constructor() {
|
|
@@ -46,6 +47,7 @@ export class EditScence extends SGraphScene {
|
|
// // 选择绑定选额item事件
|
|
// // 选择绑定选额item事件
|
|
this.selectContainer.connect("listChange", this, this.listChange);
|
|
this.selectContainer.connect("listChange", this, this.listChange);
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 监听变化
|
|
* 监听变化
|
|
* @param obj 变化后的对象
|
|
* @param obj 变化后的对象
|
|
@@ -277,7 +279,6 @@ export class EditScence extends SGraphScene {
|
|
if (this.focusItem) {
|
|
if (this.focusItem) {
|
|
this.focusItem.x = x;
|
|
this.focusItem.x = x;
|
|
this.focusItem.y = y;
|
|
this.focusItem.y = y;
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -286,7 +287,7 @@ export class EditScence extends SGraphScene {
|
|
* 更改item 背景色坐标
|
|
* 更改item 背景色坐标
|
|
* @param color string 颜色color
|
|
* @param color string 颜色color
|
|
*/
|
|
*/
|
|
- updatedbackColor(color:string): void {
|
|
|
|
|
|
+ updatedbackColor(color: string): void {
|
|
if (this.focusItem) {
|
|
if (this.focusItem) {
|
|
this.focusItem.backgroundColor = color;
|
|
this.focusItem.backgroundColor = color;
|
|
}
|
|
}
|
|
@@ -295,15 +296,22 @@ export class EditScence extends SGraphScene {
|
|
/**
|
|
/**
|
|
* 删除指定item
|
|
* 删除指定item
|
|
*/
|
|
*/
|
|
- deleiteItemStatus(): void {
|
|
|
|
-
|
|
|
|
|
|
+ deleiteItem(): void {
|
|
|
|
+ if (this.focusItem) {
|
|
|
|
+ this.removeItem(this.focusItem);
|
|
|
|
+ this.focusItem = null;
|
|
|
|
+ }
|
|
|
|
+ if (this.view) {
|
|
|
|
+ this.view.update();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 对齐指定item
|
|
* 对齐指定item
|
|
|
|
+ * @param v
|
|
*/
|
|
*/
|
|
- alignItem(): void {
|
|
|
|
-
|
|
|
|
|
|
+ changeAlignItem(v: any): void {
|
|
|
|
+ this.selectContainer.layout(SGraphLayoutType.v);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|