代码调整

This commit is contained in:
dong 2023-09-28 17:49:43 +08:00
parent 8590226c29
commit 8129c1222b

View File

@ -216,7 +216,7 @@ export class Turnout extends JlGraphic {
} }
initTurnoutTurning() { initTurnoutTurning() {
// 道岔转动 // 道岔转动
const name = `${this.datas.id}turnout_turning`; const name = 'turnout_turning';
let turnoutTurning = this.animation(name); let turnoutTurning = this.animation(name);
if (!turnoutTurning) { if (!turnoutTurning) {
turnoutTurning = GraphicAnimation.init({ turnoutTurning = GraphicAnimation.init({
@ -232,7 +232,7 @@ export class Turnout extends JlGraphic {
turnoutTurning.resume(); turnoutTurning.resume();
} }
stopTurnoutTurning() { stopTurnoutTurning() {
const name = `${this.datas.id}turnout_turning`; const name = 'turnout_turning';
const turnoutTurning = this.animation(name); const turnoutTurning = this.animation(name);
if (turnoutTurning) { if (turnoutTurning) {
turnoutTurning.pause(); turnoutTurning.pause();