|
@@ -98,6 +98,7 @@ export class SZoneLegendItem extends SPolygonItem {
|
|
|
this.data = data;
|
|
|
this.id = data.ID;
|
|
|
this.name = data.Name;
|
|
|
+ this.text = data.Name;
|
|
|
this.font = new SFont("sans-serif", 2);
|
|
|
if (data) {
|
|
|
this.setPointList = [];
|
|
@@ -112,18 +113,15 @@ export class SZoneLegendItem extends SPolygonItem {
|
|
|
this.setPointList = setPointList;
|
|
|
}
|
|
|
}
|
|
|
- if (data.Properties.Text) {
|
|
|
- this.text = data.Properties.Text;
|
|
|
- }
|
|
|
// 设置线宽
|
|
|
if (data.Properties.LineWidth) {
|
|
|
this.lineWidth = data.Properties.LineWidth
|
|
|
}
|
|
|
- if (data.Properties.strokeColor) {
|
|
|
- this.strokeColor = data.Properties.strokeColor.includes('#') ? new SColor(data.Properties.strokeColor) : new SColor(hexify(data.Properties.strokeColor));
|
|
|
+ if (data.Properties.StrokeColor) {
|
|
|
+ this.strokeColor = data.Properties.StrokeColor.includes('#') ? new SColor(data.Properties.StrokeColor) : new SColor(hexify(data.Properties.StrokeColor));
|
|
|
}
|
|
|
- if (data.Properties.fillColor) {
|
|
|
- this.fillColor = data.Properties.fillColor.includes('#') ? new SColor(data.Properties.fillColor) : new SColor(hexify(data.Properties.fillColor))
|
|
|
+ if (data.Properties.FillColor) {
|
|
|
+ this.fillColor = data.Properties.FillColor.includes('#') ? new SColor(data.Properties.FillColor) : new SColor(hexify(data.Properties.FillColor))
|
|
|
}
|
|
|
if (data.Properties.TextPos) {
|
|
|
this.textItem.moveTo(data.Properties.TextPos.x, data.Properties.TextPos.y);
|
|
@@ -147,9 +145,9 @@ export class SZoneLegendItem extends SPolygonItem {
|
|
|
|
|
|
toData(): any {
|
|
|
this.data.Pos = {X: this.x, Y: this.y};
|
|
|
- this.data.Properties.Text = this.text;
|
|
|
- this.data.Properties.fillColor = this.fillColor.value;
|
|
|
- this.data.Properties.strokeColor = this.strokeColor.value;
|
|
|
+ this.data.Name = this.text;
|
|
|
+ this.data.Properties.FillColor = this.FillColor.value;
|
|
|
+ this.data.Properties.StrokeColor = this.strokeColor.value;
|
|
|
this.data.Properties.lineWidth = this.lineWidth;
|
|
|
this.data.OutLine = this.getPointList.map(pos => {
|
|
|
return {
|