|
@@ -143,9 +143,19 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
|
|
|
if (data.Properties.font) {
|
|
|
this.font = new SFont("sans-serif", data.Properties.font);
|
|
|
}
|
|
|
- // if( data.Properties.LineDash){
|
|
|
- // this.LineDash =this._legend.Properties.LineDash
|
|
|
- // }
|
|
|
+ switch (data.Properties.LineDash) {
|
|
|
+ case "solid":
|
|
|
+ this.lineStyle = SLineStyle.Solid;
|
|
|
+ break;
|
|
|
+ case "dotted":
|
|
|
+ this.lineStyle = SLineStyle.Dotted;
|
|
|
+ break;
|
|
|
+ case "dashed":
|
|
|
+ this.lineStyle = SLineStyle.Dashed;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ this.lineStyle = SLineStyle.Solid;
|
|
|
+ }
|
|
|
}
|
|
|
// 监听多边形创建完成事件,并动态计算文本位置
|
|
|
this.connect("finishCreated", this, () => {
|
|
@@ -166,6 +176,19 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
|
|
|
this.data.Properties.FillColor = this.fillColor.value;
|
|
|
this.data.Properties.StrokeColor = this.strokeColor.value;
|
|
|
this.data.Properties.LineWidth = this.lineWidth;
|
|
|
+ switch (this.lineStyle) {
|
|
|
+ case SLineStyle.Solid:
|
|
|
+ this.data.Properties.LineDash = "solid";
|
|
|
+ break;
|
|
|
+ case SLineStyle.Dotted:
|
|
|
+ this.data.Properties.LineDash = "dotted";
|
|
|
+ break;
|
|
|
+ case SLineStyle.Dashed:
|
|
|
+ this.data.Properties.LineDash = "dashed";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ this.data.Properties.LineDash = "solid";
|
|
|
+ }
|
|
|
this.data.OutLine = this.getPointList.map(pos => {
|
|
|
return {
|
|
|
X: pos.x,
|