diff --git a/src/jmap/shape/Train/index.js b/src/jmap/shape/Train/index.js index 01942a650..6739ef198 100644 --- a/src/jmap/shape/Train/index.js +++ b/src/jmap/shape/Train/index.js @@ -14,6 +14,7 @@ export default class Train extends Group { this.model = model; this.style = style; this.z = 40; + this.size = 0; this.section = null; this.fontSize = style.Train.nameFontSize || style.Train.trainTextFontSize; this.newScale = this.fontSize / style.Train.trainTextFontSize; @@ -285,8 +286,8 @@ export default class Train extends Group { // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 isChangeTrainWidth(model, style) { if (!style.Train.changeTrainWidth) { return; } - if (model.nameFormat) { - const arr = model.nameFormat.split(':'); + if (style.Train.trainNameFormat) { + const arr = style.Train.trainNameFormat.split(':'); arr.forEach(ele => { switch (ele) { case 'targetCode': {