|
@@ -62,6 +62,14 @@ export class SSpaceItem extends SGraphItem {
|
|
|
this._highLightFlag = value;
|
|
|
this.update();
|
|
|
} // Set highLightFlag
|
|
|
+ private _showBaseName: boolean = false;
|
|
|
+ get showBaseName(): boolean {
|
|
|
+ return this._showBaseName;
|
|
|
+ } // Get showBaseName
|
|
|
+ set showBaseName(value: boolean) {
|
|
|
+ this._showBaseName = value;
|
|
|
+ this.update();
|
|
|
+ } // Set showBaseName
|
|
|
|
|
|
/**
|
|
|
* 构造函数
|
|
@@ -188,16 +196,18 @@ export class SSpaceItem extends SGraphItem {
|
|
|
painter.pen.lineWidth = painter.toPx(1);
|
|
|
painter.drawPath(this.path);
|
|
|
|
|
|
- if (this.data.Name && this.data.Name != "null") {
|
|
|
- painter.brush.color = SColor.Black;
|
|
|
- painter.font.size = painter.toPx(10);
|
|
|
- // painter.font.size = 500;
|
|
|
- painter.font.textAlign = STextAlign.Center;
|
|
|
- painter.drawText(
|
|
|
- this.data.Name,
|
|
|
- this.data.Location.Points[0].X,
|
|
|
- -this.data.Location.Points[0].Y
|
|
|
- );
|
|
|
+ if (this.showBaseName) {
|
|
|
+ if (this.data.Name && this.data.Name != "null") {
|
|
|
+ painter.brush.color = SColor.Black;
|
|
|
+ painter.font.size = painter.toPx(10);
|
|
|
+ // painter.font.size = 500;
|
|
|
+ painter.font.textAlign = STextAlign.Center;
|
|
|
+ painter.drawText(
|
|
|
+ this.data.Name,
|
|
|
+ this.data.Location.Points[0].X,
|
|
|
+ -this.data.Location.Points[0].Y
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
} // Function onDraw()
|
|
|
} // Class SSpaceItem
|