Update motor SVG assets and connections

This commit is contained in:
Sam El-Husseini
2017-12-27 14:48:15 -08:00
parent 8204995749
commit fb31b81f7e
7 changed files with 217 additions and 157 deletions

View File

@ -6,7 +6,7 @@ namespace pxsim.visuals {
export class MediumMotorView extends ModuleView implements LayoutElement {
private static ROTATING_ECLIPSE_ID = "Hole";
private static ROTATING_ECLIPSE_ID = "medmotor_Hole";
private hasPreviousAngle: boolean;
private previousAngle: number;
@ -30,9 +30,9 @@ namespace pxsim.visuals {
private setMotorAngle(angle: number) {
const holeEl = this.content.getElementById(this.normalizeId(MediumMotorView.ROTATING_ECLIPSE_ID))
const width = 47.9;
const height = 47.2;
const transform = `translate(-1.5 -1.49) rotate(${angle} ${width / 2} ${height / 2})`;
const width = 44.45;
const height = 44.45;
const transform = `translate(2 1.84) rotate(${angle} ${width / 2} ${height / 2})`;
holeEl.setAttribute("transform", transform);
}
}