列车调整
This commit is contained in:
parent
a59e51eafd
commit
2fd3f071e1
|
@ -112,11 +112,11 @@ class TrainBody extends Container {
|
|||
this.bodyRact.clear();
|
||||
}
|
||||
getBodyWH() {
|
||||
const bodyAWH = this.codeAGraph.getLocalBounds();
|
||||
const bodyBWH = this.codeBGraph.getLocalBounds();
|
||||
const bodyAWH = this.codeAGraph.localBoundsToCanvasPoints();
|
||||
const bodyBWH = this.codeBGraph.localBoundsToCanvasPoints();
|
||||
return {
|
||||
width: bodyAWH.width + bodyBWH.width + this.train.constDatas.bodyPadding * 2,
|
||||
height: bodyAWH.height + this.train.constDatas.bodyPadding * 2,
|
||||
width: bodyAWH[1].x - bodyAWH[0].x + bodyBWH[1].x - bodyBWH[0].x,
|
||||
height: bodyAWH[2].y - bodyAWH[1].y,
|
||||
};
|
||||
}
|
||||
doRepaint() {
|
||||
|
|
|
@ -128,12 +128,11 @@ class TrainBody extends Container {
|
|||
}
|
||||
|
||||
getBodyWH(): bodyWH {
|
||||
const bodyAWH = this.codeAGraph.getLocalBounds();
|
||||
const bodyBWH = this.codeBGraph.getLocalBounds();
|
||||
const bodyAWH = this.codeAGraph.localBoundsToCanvasPoints();
|
||||
const bodyBWH = this.codeBGraph.localBoundsToCanvasPoints();
|
||||
return {
|
||||
width:
|
||||
bodyAWH.width + bodyBWH.width + this.train.constDatas.bodyPadding * 2,
|
||||
height: bodyAWH.height + this.train.constDatas.bodyPadding * 2,
|
||||
width: bodyAWH[1].x - bodyAWH[0].x + bodyBWH[1].x - bodyBWH[0].x,
|
||||
height: bodyAWH[2].y - bodyAWH[1].y,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue