|
@@ -66,9 +66,27 @@ export class ZoneItem extends SGraphyItem {
|
|
|
} // Get highLightFlag
|
|
|
set highLightFlag(value: boolean) {
|
|
|
this._highLightFlag = value;
|
|
|
+ this.update();
|
|
|
} // Set highLightFlag
|
|
|
/** 透明度 */
|
|
|
- transparency: number = 20;
|
|
|
+ _transparency: number = 20;
|
|
|
+ get transparency(): number {
|
|
|
+ return this._transparency;
|
|
|
+ } // Get transparency
|
|
|
+ set transparency(value: number) {
|
|
|
+ this._transparency = value;
|
|
|
+ this.update();
|
|
|
+ } // Set transparency
|
|
|
+ /** 受影响状态 */
|
|
|
+ _isInfected: boolean = false;
|
|
|
+ get isInfected(): boolean {
|
|
|
+ return this._isInfected;
|
|
|
+ } // Get isInfected
|
|
|
+ set isInfected(value: boolean) {
|
|
|
+ this._isInfected = value;
|
|
|
+ this.update();
|
|
|
+ } // Set isInfected
|
|
|
+ private infectedColor = Opt.zoneInfectedColor;
|
|
|
|
|
|
/**
|
|
|
* 构造函数
|
|
@@ -82,6 +100,7 @@ export class ZoneItem extends SGraphyItem {
|
|
|
this.zOrder = ItemOrder.zoneOrder;
|
|
|
this.highLightFlag = data.HighLightFlag || false;
|
|
|
this.transparency = data.Transparency || 20;
|
|
|
+ this.isInfected = data.Infected || false;
|
|
|
if (
|
|
|
this.data.OutLine.length &&
|
|
|
this.data.OutLine[0] &&
|
|
@@ -199,6 +218,8 @@ export class ZoneItem extends SGraphyItem {
|
|
|
painter.brush.color = this.selectColor;
|
|
|
} else if (this.highLightFlag) {
|
|
|
painter.brush.color = new SColor(this.data.Color);
|
|
|
+ } else if (this.isInfected) {
|
|
|
+ painter.brush.color = this.infectedColor;
|
|
|
} else {
|
|
|
painter.brush.color = new SColor(
|
|
|
`${this.data.Color}${Transparency[this.transparency]}`
|