|
@@ -55,7 +55,7 @@ export class DoorItem extends SGraphyItem {
|
|
this.data = data;
|
|
this.data = data;
|
|
if (this.data.OutLine.length) {
|
|
if (this.data.OutLine.length) {
|
|
this.pointArr = this.data.OutLine[0].map(t => {
|
|
this.pointArr = this.data.OutLine[0].map(t => {
|
|
- return new SPoint(t.X, t.Y);
|
|
|
|
|
|
+ return new SPoint(t.X, -t.Y);
|
|
});
|
|
});
|
|
|
|
|
|
let p1 = this.pointArr[0];
|
|
let p1 = this.pointArr[0];
|
|
@@ -68,7 +68,12 @@ export class DoorItem extends SGraphyItem {
|
|
Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2)
|
|
Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2)
|
|
);
|
|
);
|
|
// 门朝向角度
|
|
// 门朝向角度
|
|
- this.ang = this.data.FaceDirection.X > 0 ? fo : fo + Math.PI;
|
|
|
|
|
|
+ if (this.data.FaceDirection.X > 0) {
|
|
|
|
+ this.ang = fo;
|
|
|
|
+ } else {
|
|
|
|
+ this.ang = fo + Math.PI;
|
|
|
|
+ }
|
|
|
|
+ // this.ang = this.data.FaceDirection.X > 0 ? fo : fo + Math.PI;
|
|
// 旋转点
|
|
// 旋转点
|
|
if (this.data.HandDirection.X > this.data.HandDirection.Y) {
|
|
if (this.data.HandDirection.X > this.data.HandDirection.Y) {
|
|
if (this.data.HandDirection.X > 0) {
|
|
if (this.data.HandDirection.X > 0) {
|
|
@@ -96,12 +101,19 @@ export class DoorItem extends SGraphyItem {
|
|
if (this.visible) {
|
|
if (this.visible) {
|
|
painter.translate(this.p.x, this.p.y);
|
|
painter.translate(this.p.x, this.p.y);
|
|
painter.rotate(this.ang);
|
|
painter.rotate(this.ang);
|
|
- painter.pen.lineWidth = 50;
|
|
|
|
|
|
+ painter.pen.lineWidth = 100;
|
|
painter.pen.color = Opt.doorColor;
|
|
painter.pen.color = Opt.doorColor;
|
|
painter.drawLine(0, 0, this.r, 0);
|
|
painter.drawLine(0, 0, this.r, 0);
|
|
|
|
|
|
painter.pen.lineDash = [10, 10];
|
|
painter.pen.lineDash = [10, 10];
|
|
- painter.drawArc(0, 0, this.r, this.r, this.startAng, this.endAng);
|
|
|
|
|
|
+ painter.drawArc(
|
|
|
|
+ -this.r,
|
|
|
|
+ -this.r,
|
|
|
|
+ this.r * 2,
|
|
|
|
+ this.r * 2,
|
|
|
|
+ this.startAng,
|
|
|
|
+ this.endAng
|
|
|
|
+ );
|
|
}
|
|
}
|
|
} // Function onDraw()
|
|
} // Function onDraw()
|
|
} // Class DoorItem
|
|
} // Class DoorItem
|