|
@@ -67,6 +67,21 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
|
|
|
this.update();
|
|
|
};
|
|
|
|
|
|
+ /** 是否激活 */
|
|
|
+ _isActive: boolean = false;
|
|
|
+ get isActive(): boolean {
|
|
|
+ return this._isActive;
|
|
|
+ } // Get isActive
|
|
|
+ set isActive(v: boolean) {
|
|
|
+ this._isActive = v;
|
|
|
+ if (v) {
|
|
|
+ this.cursor = "pointer";
|
|
|
+ } else {
|
|
|
+ this.cursor = "auto";
|
|
|
+ }
|
|
|
+ this.update();
|
|
|
+ } // Set isActive
|
|
|
+
|
|
|
/** 是否显示文字 */
|
|
|
_showText: boolean = true;
|
|
|
get showText(): boolean {
|
|
@@ -124,6 +139,9 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
|
|
|
this.setPointList = setPointList;
|
|
|
}
|
|
|
}
|
|
|
+ if (data.Properties.Zorder) {
|
|
|
+ this.zOrder = data.Properties.Zorder;
|
|
|
+ }
|
|
|
// 设置线宽
|
|
|
if (data.Properties.LineWidth) {
|
|
|
this.lineWidth = data.Properties.LineWidth;
|
|
@@ -143,6 +161,12 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
|
|
|
if (data.Properties.font) {
|
|
|
this.font = new SFont("sans-serif", data.Properties.font);
|
|
|
}
|
|
|
+ if (data.Properties && data.Properties.IsActive) {
|
|
|
+ this.isActive = data.Properties.IsActive;
|
|
|
+ }
|
|
|
+ if (data.AttachObjectIds && data.AttachObjectIds.length) {
|
|
|
+ this.isActive = true;
|
|
|
+ }
|
|
|
switch (data.Properties.LineDash) {
|
|
|
case "solid":
|
|
|
this.lineStyle = SLineStyle.Solid;
|
|
@@ -173,6 +197,7 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
|
|
|
toData(): any {
|
|
|
this.data.Pos = { X: this.x, Y: this.y };
|
|
|
this.data.Name = this.name;
|
|
|
+ this.data.Properties.Zorder = this.zOrder;
|
|
|
this.data.Properties.FillColor = this.fillColor.value;
|
|
|
this.data.Properties.StrokeColor = this.strokeColor.value;
|
|
|
this.data.Properties.LineWidth = this.lineWidth;
|
|
@@ -198,6 +223,7 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
|
|
|
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;
|
|
|
+ this.data.Properties.IsActive = this.isActive;
|
|
|
return this.data;
|
|
|
}
|
|
|
|