|
@@ -120,6 +120,12 @@ export class SBasePipeUninTool extends SGraphEdit {
|
|
|
this.moveTo(data.pos.x, data.pos.y);
|
|
|
// 判断为几通管道
|
|
|
this.computeUninNumber(this.outLineTpye[data.style.uninToolType]);
|
|
|
+ this.zOrder = this.data.style.default.zorder ? this.data.style.default.zorder : this.zOrder;
|
|
|
+ // this.fillColor = this.data.style.default.fillColor ?new SColor(this.data.style.default.fillColor) : this.fillColor;
|
|
|
+ this.angle = this.data.style.default.angle ? this.data.style.default.angle :0
|
|
|
+ this.radius = this.data.style.default.radius ? this.data.style.default.radius : this.radius ;
|
|
|
+ this.lineWidth = this.data.style.default.lineWidth ? this.data.style.default.lineWidth : this.lineWidth ;
|
|
|
+
|
|
|
this.update()
|
|
|
}
|
|
|
|
|
@@ -184,7 +190,26 @@ export class SBasePipeUninTool extends SGraphEdit {
|
|
|
* @return 相关数据
|
|
|
*/
|
|
|
toData(): any {
|
|
|
- return super.toData()
|
|
|
+
|
|
|
+ if (!this.data) return;
|
|
|
+ if (this.data.size) {
|
|
|
+ this.data.size.width = this.width;
|
|
|
+ this.data.size.height = this.height;
|
|
|
+ } else {
|
|
|
+ this.data.size = {
|
|
|
+ width: this.width,
|
|
|
+ height: this.height
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.data.pos.x = this.pos.x;
|
|
|
+ this.data.pos.y = this.pos.y;
|
|
|
+ this.data.style.default.zorder = this.zOrder;
|
|
|
+ this.data.style.default.fillColor = this.fillColor.value;
|
|
|
+ this.data.style.default.angle = this.angle;
|
|
|
+ this.data.style.default.radius = this.radius;
|
|
|
+ this.data.style.default.lineWidth = this.lineWidth;
|
|
|
+ return this.data;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -209,6 +234,7 @@ export class SBasePipeUninTool extends SGraphEdit {
|
|
|
this.path.lineTo(last.x, last.y);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* Item 绘制操作
|
|
|
*
|
|
@@ -221,7 +247,7 @@ export class SBasePipeUninTool extends SGraphEdit {
|
|
|
const leftPoint = this.outLineLine[3];
|
|
|
const bottomPoint = this.outLineLine[5];
|
|
|
const pipeWidth = this.lineWidth;
|
|
|
- painter.pen.color = this.fillColor
|
|
|
+ painter.pen.color = this.fillColor;
|
|
|
painter.pen.lineWidth = this.lineWidth;
|
|
|
//设置旋转角度
|
|
|
if(this.angle != 0){
|