|
@@ -26,7 +26,7 @@
|
|
|
|
|
|
import { SGraphItem, SAnchorItem } from "@persagy-web/graph/lib";
|
|
|
import { Legend } from "@persagy-web/big-edit";
|
|
|
-import { ItemOrder } from "@persagy-web/big";
|
|
|
+import { Example } from "../index";
|
|
|
import { SBaseIconTextEdit, SBaseTextEdit } from "@persagy-web/edit";
|
|
|
import { svgTobase64, uuid } from "@persagy-web/big-edit/lib/until";
|
|
|
/**
|
|
@@ -36,12 +36,12 @@ import { svgTobase64, uuid } from "@persagy-web/big-edit/lib/until";
|
|
|
*/
|
|
|
export class SPlanEquipment extends SBaseIconTextEdit {
|
|
|
/** 设备图例 */
|
|
|
- private _legendData: Legend | null = null;
|
|
|
+ private _legendData: Example | null = null;
|
|
|
set legendData(val) {
|
|
|
this._legendData = val;
|
|
|
this.initData();
|
|
|
} // set legendData()
|
|
|
- get legendData(): Legend | null {
|
|
|
+ get legendData(): Example | null {
|
|
|
return this._legendData;
|
|
|
} // get legendData()
|
|
|
|
|
@@ -61,8 +61,6 @@ export class SPlanEquipment extends SBaseIconTextEdit {
|
|
|
private _formula: string = "";
|
|
|
set formula(val) {
|
|
|
this._formula = val;
|
|
|
- this.textItemList[0].text = val;
|
|
|
- this.update();
|
|
|
} // set formula()
|
|
|
get formula(): string {
|
|
|
return this._formula;
|
|
@@ -77,10 +75,12 @@ export class SPlanEquipment extends SBaseIconTextEdit {
|
|
|
* @param parent 指向父对象
|
|
|
* @param data 数据
|
|
|
*/
|
|
|
- constructor(parent: SGraphItem | null, data: Legend) {
|
|
|
+ constructor(parent: SGraphItem | null, data: Example) {
|
|
|
super(parent);
|
|
|
- this.zOrder = 9800;
|
|
|
+ this.zOrder = 9800;
|
|
|
this.isTransform = false;
|
|
|
+ this.sWidth = 32;
|
|
|
+ this.sHeight = 32;
|
|
|
const textItem = new SBaseTextEdit(this, null);
|
|
|
textItem.text = "";
|
|
|
textItem.font.size = 12;
|
|
@@ -123,6 +123,7 @@ export class SPlanEquipment extends SBaseIconTextEdit {
|
|
|
}
|
|
|
|
|
|
this.id = this.legendData.id ? this.legendData.id : "";
|
|
|
+ // this.textItemList[0].text = this.legendData.codeName ? this.legendData.codeName : "";
|
|
|
this.showAnchor = false;
|
|
|
this.anotherMsg = this.legendData.properties?.anotherMsg ? this.legendData.properties.anotherMsg : "";
|
|
|
this.x = this.legendData.pos.x;
|