|
@@ -62,6 +62,15 @@ export class SpaceItem extends SGraphItem {
|
|
|
this._highLightFlag = value;
|
|
|
this.update();
|
|
|
} // Set highLightFlag
|
|
|
+ /** 是否显示名称 */
|
|
|
+ private _showBaseName: boolean = false;
|
|
|
+ get showBaseName(): boolean {
|
|
|
+ return this._showBaseName;
|
|
|
+ } // Get highLightFlag
|
|
|
+ set showBaseName(value: boolean) {
|
|
|
+ this._showBaseName = value;
|
|
|
+ this.update();
|
|
|
+ } // Set highLightFlag
|
|
|
|
|
|
/**
|
|
|
* 构造函数
|
|
@@ -190,15 +199,16 @@ export class SpaceItem extends SGraphItem {
|
|
|
}
|
|
|
painter.pen.lineWidth = 200;
|
|
|
painter.drawPath(this.path);
|
|
|
-
|
|
|
- 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) {
|
|
|
+ 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 SpaceItem
|