|
@@ -61,7 +61,11 @@ export class SBaseArrowPolyEdit extends SBaseLineEdit {
|
|
|
* @param data 坐标集合|第一个点坐标
|
|
|
*/
|
|
|
constructor(parent: SGraphItem | null, data: Marker): void {
|
|
|
- super(parent, data);
|
|
|
+ super(parent, data);
|
|
|
+ // 箭头宽度
|
|
|
+ if (data?.style?.default?.arrowWidth) {
|
|
|
+ this.arrowWidth = data.style.default.arrowWidth;
|
|
|
+ }
|
|
|
this.pointChange();
|
|
|
}
|
|
|
|
|
@@ -109,7 +113,18 @@ export class SBaseArrowPolyEdit extends SBaseLineEdit {
|
|
|
];
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 返回对象储存的相关数据
|
|
|
+ *
|
|
|
+ * @return 对象数据
|
|
|
+ */
|
|
|
+ toData() {
|
|
|
+ const data = super.toData();
|
|
|
+ data.style.default.arrowWidth = this.arrowWidth;
|
|
|
+ return data
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 绘制
|
|
@@ -140,12 +155,10 @@ export class SBaseArrowPolyEdit extends SBaseLineEdit {
|
|
|
painter.drawPolygon(this.pointList);
|
|
|
painter.restore();
|
|
|
|
|
|
- if (
|
|
|
- this.status == SItemStatus.Edit ||
|
|
|
- this.status == SItemStatus.Create
|
|
|
- ) {
|
|
|
+ if (this.status == SItemStatus.Edit) {
|
|
|
+ painter.pen.lineWidth = lw;
|
|
|
this.line.forEach((p, i) => {
|
|
|
- painter.brush.color = this.fillColor;
|
|
|
+ painter.brush.color = SColor.White;
|
|
|
if (i == this.curIndex) {
|
|
|
painter.brush.color = this.activeFillColor;
|
|
|
}
|