|
@@ -1,8 +1,8 @@
|
|
import { SMouseEvent, SUndoStack } from "@saga-web/base";
|
|
import { SMouseEvent, SUndoStack } from "@saga-web/base";
|
|
import { SGraphScene } from '@saga-web/graph/lib';
|
|
import { SGraphScene } from '@saga-web/graph/lib';
|
|
import { SPoint, SFont } from '@saga-web/draw/lib';
|
|
import { SPoint, SFont } from '@saga-web/draw/lib';
|
|
-import { SFloorParser, SImageItem, STextItem, SLineItem, SPolylineItem, SItemStatus, ItemOrder } from "@saga-web/big";
|
|
|
|
-import { SGraphItem, SGraphPointListInsert, SGraphPointListDelete, SGraphPointListUpdate, SGraphAddCommand } 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 { SPolygonItem } from "./SPolygonItem";
|
|
import { SPolygonItem } from "./SPolygonItem";
|
|
import { TipelineItem } from "@/lib/TipelineItem";
|
|
import { TipelineItem } from "@/lib/TipelineItem";
|
|
import { SImgTextItem } from "@/lib/SImgTextItem"
|
|
import { SImgTextItem } from "@/lib/SImgTextItem"
|
|
@@ -80,10 +80,10 @@ export class EditScence extends SGraphScene {
|
|
emitChange(msg: any) {
|
|
emitChange(msg: any) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 增加线段item
|
|
* 增加线段item
|
|
*/
|
|
*/
|
|
-
|
|
|
|
addLine(event: SMouseEvent): boolean {
|
|
addLine(event: SMouseEvent): boolean {
|
|
const item = new SLineItem(null, new SPoint(event.x, event.y));
|
|
const item = new SLineItem(null, new SPoint(event.x, event.y));
|
|
this.addItem(item);
|
|
this.addItem(item);
|
|
@@ -117,7 +117,6 @@ export class EditScence extends SGraphScene {
|
|
/**
|
|
/**
|
|
* 增加多边形item
|
|
* 增加多边形item
|
|
*/
|
|
*/
|
|
-
|
|
|
|
addPolygonItem(event: SMouseEvent): void {
|
|
addPolygonItem(event: SMouseEvent): void {
|
|
//创建item
|
|
//创建item
|
|
const Polylines = new SPolygonItem(null);
|
|
const Polylines = new SPolygonItem(null);
|
|
@@ -231,6 +230,7 @@ export class EditScence extends SGraphScene {
|
|
// this.undoStack.push(new SGraphPropertyCommand(this, this.focusItem, "color", old, color));
|
|
// this.undoStack.push(new SGraphPropertyCommand(this, this.focusItem, "color", old, color));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 更改border颜色
|
|
* 更改border颜色
|
|
* @param color string 颜色
|
|
* @param color string 颜色
|
|
@@ -281,6 +281,17 @@ export class EditScence extends SGraphScene {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 更改item 背景色坐标
|
|
|
|
+ * @param color string 颜色color
|
|
|
|
+ */
|
|
|
|
+ updatedbackColor(color:string): void {
|
|
|
|
+ if (this.focusItem) {
|
|
|
|
+ this.focusItem.backgroundColor = color;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 删除指定item
|
|
* 删除指定item
|
|
*/
|
|
*/
|