|
@@ -99,7 +99,7 @@ export class SBaseEquipment extends SBaseIconTextEdit {
|
|
|
}
|
|
|
// 存储信息点
|
|
|
if (this.legendData.properties && this.legendData.properties.infoPointList) {
|
|
|
- const infoPointList = this.legendData.properties.infoPointList
|
|
|
+ const infoPointList = this.legendData.properties.infoPointList;
|
|
|
if (infoPointList.length) {
|
|
|
this.infoPointList = infoPointList;
|
|
|
this.infoPointList.forEach((obj, i) => {
|
|
@@ -116,7 +116,7 @@ export class SBaseEquipment extends SBaseIconTextEdit {
|
|
|
this.showAnchor = false;
|
|
|
const url = this.legendData.style.default.base64Url ? this.legendData.style.default.base64Url : this.legendData.style.default.url
|
|
|
svgTobase64(url).then((res) => {
|
|
|
- this.img.url = res?res:'';
|
|
|
+ this.img.url = res ? res : '';
|
|
|
}).catch((res) => {
|
|
|
this.img.url = res;
|
|
|
})
|
|
@@ -173,13 +173,14 @@ export class SBaseEquipment extends SBaseIconTextEdit {
|
|
|
item.font.size = val.font ? val.font : 12;
|
|
|
item.isTransform = false;
|
|
|
item.showSelect = false;
|
|
|
- item.color = val.strokeColor ? new SColor(val.strokeColor) : new SColor('#000000');
|
|
|
+ item.color = val.color ? new SColor(val.color) : new SColor('#000000');
|
|
|
item.connect('textSelect', this, this.textSelectChange)
|
|
|
this.textItemList.push(item)
|
|
|
} else {
|
|
|
this.textItemList.splice(index, 1)
|
|
|
this.scene?.removeItem(this.textItemList[index]);
|
|
|
}
|
|
|
+ console.log('setTextItem', this.textItemList)
|
|
|
// do something
|
|
|
}// Function setTextItem()
|
|
|
|
|
@@ -221,12 +222,15 @@ export class SBaseEquipment extends SBaseIconTextEdit {
|
|
|
let obj = Object.assign(item.propertyData, {
|
|
|
pos: { x: item.x, y: item.y },
|
|
|
font: item.font.size,
|
|
|
- strokeColor: item.strokeColor.value
|
|
|
+ color: item.color.value
|
|
|
})
|
|
|
+ delete obj.currentEquipMsg
|
|
|
infoPoinList.push(obj)
|
|
|
- })
|
|
|
+ });
|
|
|
this.legendData.properties.infoPointList = infoPoinList;
|
|
|
this.legendData.style.default.base64Url = "";
|
|
|
+ this.legendData
|
|
|
+ console.log('infoPoinList', this.legendData)
|
|
|
return this.legendData
|
|
|
}
|
|
|
} // Function toData
|