|
@@ -25,11 +25,11 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
|
|
|
this.textItem.text = v;
|
|
|
this.update();
|
|
|
}
|
|
|
- get color(): string {
|
|
|
+ get color(): SColor {
|
|
|
return this.textItem.color;
|
|
|
}
|
|
|
- set color(v: string) {
|
|
|
- this.textItem.color = v
|
|
|
+ set color(v: SColor) {
|
|
|
+ this.textItem.color = v;
|
|
|
}
|
|
|
get font(): SFont {
|
|
|
return this.textItem.font
|
|
@@ -111,7 +111,6 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
|
|
|
this.id = data.ID;
|
|
|
this.name = data.Name;
|
|
|
this.text = data.Name;
|
|
|
- this.font = new SFont("sans-serif", 2);
|
|
|
if (data) {
|
|
|
this.setPointList = [];
|
|
|
let setPointList: SPoint[];
|
|
@@ -133,13 +132,13 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
|
|
|
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))
|
|
|
+ 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);
|
|
|
}
|
|
|
if (data.Properties.color) {
|
|
|
- this.color = data.Properties.color
|
|
|
+ this.color = new SColor(data.Properties.color);
|
|
|
}
|
|
|
if (data.Properties.font) {
|
|
|
this.font = new SFont("sans-serif", data.Properties.font);
|
|
@@ -173,9 +172,9 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
|
|
|
Y: pos.y
|
|
|
}
|
|
|
});
|
|
|
- this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y };
|
|
|
- this.data.Properties.font = this.font.size;
|
|
|
- this.data.Properties.color = this.color;
|
|
|
+ this.data.Properties.TextPos = {X: this.textItem.x, Y: this.textItem.y};
|
|
|
+ this.data.Properties.font = this.font.size;
|
|
|
+ this.data.Properties.color = this.color.value;
|
|
|
return this.data;
|
|
|
}
|
|
|
|