mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
backward compatible fix
This commit is contained in:
@@ -160,6 +160,9 @@ public abstract class AbstractTubeSymbol extends AbstractComponent<String> {
|
||||
|
||||
@EditableProperty
|
||||
public Orientation getOrientation() {
|
||||
if (orientation == null)
|
||||
orientation = Orientation.DEFAULT;
|
||||
|
||||
return orientation;
|
||||
}
|
||||
|
||||
@@ -175,11 +178,11 @@ public abstract class AbstractTubeSymbol extends AbstractComponent<String> {
|
||||
body = null;
|
||||
getBody();
|
||||
|
||||
if (this.orientation == Orientation.DEFAULT)
|
||||
if (getOrientation() == Orientation.DEFAULT)
|
||||
return;
|
||||
|
||||
Point first = this.controlPoints[0];
|
||||
double angle = Double.parseDouble(this.orientation.name().replace("_", ""));
|
||||
double angle = Double.parseDouble(getOrientation().name().replace("_", ""));
|
||||
AffineTransform rotate = AffineTransform.getRotateInstance(Math.toRadians(angle), first.x, first.y);
|
||||
for (int i = 1; i < this.controlPoints.length; i++) {
|
||||
rotate.transform(this.controlPoints[i], this.controlPoints[i]);
|
||||
|
||||
Reference in New Issue
Block a user