修改代码

This commit is contained in:
ival 2019-08-05 16:21:43 +08:00
parent 1e5ad7e522
commit b8fb7fc210
4 changed files with 30 additions and 30 deletions

View File

@ -199,14 +199,14 @@ class SkinStyle extends defaultStyle {
closeColor: '#F61107' // 站台紧急关闭颜色
},
reentry: { // 站台折返策略
direction: 0, // 折返方向
position: 0, // 折返方向
offset: {x: -16, y: 18}, // 折返偏移量
noHumanColor: '#0F16DA', // 站台无人折返
autoChangeEndsColor: '#0BF400' // 站台自动换端
},
detainCar: { // 扣车
text: 'H', // 扣车显示内容
direction: 1, // 扣车方向
position: 1, // 扣车方向
offset: {x: -8, y: 13}, // 扣车偏移量
trainColor: '#E4EF50', // 车站扣车颜色
centerTrainColor: '#FFFFFF', // 中心扣车颜色
@ -214,12 +214,12 @@ class SkinStyle extends defaultStyle {
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
},
stopTime: { // 停站时间
direction: 1, // 运行时间方向
position: 1, // 运行时间方向
offset: {x: -8, y: 3}, // 运行时间偏移量
textColor: '#FFFFFF' // 停站时间字体颜色
},
level: { // 运行等级
direction: 1, // 运行等级方向
position: 1, // 运行等级方向
offset: {x: -8, y: 22}, // 运行等级偏移量
textColor: '#FFFFFF' // 停站等级字体颜色
},

View File

@ -199,14 +199,14 @@ class SkinStyle extends defaultStyle {
closeColor: '#F61107' // 站台紧急关闭颜色
},
reentry: { // 站台折返策略
direction: 0, // 折返方向
position: 0, // 折返方向
offset: {x: -16, y: 20}, // 折返偏移量
noHumanColor: '#0F16DA', // 站台无人折返
autoChangeEndsColor: '#0BF400' // 站台自动换端
},
detainCar: { // 扣车
text: '扣', // 扣车显示内容
direction: -1, // 扣车方向
position: -1, // 扣车方向
offset: {x: -8, y: -20}, // 扣车偏移量
trainColor: '#FFFF00', // 车站扣车颜色
centerTrainColor: '#C0C0C0', // 中心扣车颜色
@ -214,13 +214,13 @@ class SkinStyle extends defaultStyle {
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
},
stopTime: { // 停站时间
direction: 1, // 运行时间方向
position: 1, // 运行时间方向
offset: {x: -8, y: -4}, // 运行时间偏移量
textColor: '#C0C0C0' // 停站时间字体颜色
},
jump: {
text: '跳', // 停跳显示内容
direction: -1, // 停跳方向
position: -1, // 停跳方向
offset: {x: -8, y: 0},
textColor: '#0000FF', // 停跳文字颜色
arcColor: '#0000FF', // 停跳圆圈颜色
@ -228,7 +228,7 @@ class SkinStyle extends defaultStyle {
r: 8 // 圆半径大小
},
level: { // 运行等级
direction: 1, // 运行等级方向
position: 1, // 运行等级方向
offset: {x: -8, y: 30}, // 运行等级偏移量
textColor: '#FFF000' // 停站等级字体颜色
}

View File

@ -188,14 +188,14 @@ class SkinStyle extends defaultStyle {
closeColor: '#F61107' // 站台紧急关闭颜色
},
reentry: { // 站台折返策略
direction: 0, // 折返方向
position: 0, // 折返方向
offset: {x: -16, y: 20}, // 折返偏移量
noHumanColor: '#0F16DA', // 站台无人折返
autoChangeEndsColor: '#0BF400' // 站台自动换端
},
detainCar: { // 扣车
text: 'H', // 扣车显示内容
direction: -1, // 扣车方向
position: -1, // 扣车方向
offset: {x: -8, y: -6}, // 扣车偏移量
trainColor: '#E4EF50', // 车站扣车颜色
centerTrainColor: '#FFFFFF', // 中心扣车颜色
@ -203,12 +203,12 @@ class SkinStyle extends defaultStyle {
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
},
stopTime: { // 停站时间
direction: 1, // 运行时间方向
position: 1, // 运行时间方向
offset: {x: -8, y: 26}, // 运行时间偏移量
textColor: '#FFFFFF' // 停站时间字体颜色
},
level: { // 运行等级
direction: 1, // 运行等级方向
position: 1, // 运行等级方向
offset: {x: -8, y: 6}, // 运行等级偏移量
textColor: '#FFFFFF' // 停站等级字体颜色
}

View File

@ -73,10 +73,10 @@ class StationStand extends Group {
});
/** 站台折返策略*/
const reentryD = style.StationStand.reentry.direction ? model.height + 6: -style.StationStand.safetyDoor.distance - style.StationStand.safetyDoor.height;
const reentryD = style.StationStand.reentry.position ? model.height + 6: -style.StationStand.safetyDoor.distance - style.StationStand.safetyDoor.height;
const reentryH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + reentryD;
const reentryX = model.position.x - (style.StationStand.reentry.direction || drict) * (style.StationStand.reentry.offset.x - model.width / 2);
const reentryY = model.position.y + (style.StationStand.reentry.direction || drict) * (style.StationStand.reentry.offset.y) + drict * reentryH;
const reentryX = model.position.x - (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.x - model.width / 2);
const reentryY = model.position.y + (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.y) + drict * reentryH;
this.reentry = new EReentry({
zlevel: this.zlevel,
z: this.z + 1,
@ -91,10 +91,10 @@ class StationStand extends Group {
const distance = style.StationStand.safetyDoor.height*2 - style.StationStand.stand.headFontSize/2 - 2;
/** 站台扣车*/
const detainD = style.StationStand.detainCar.direction ? model.height - distance: -style.StationStand.safetyDoor.height;
const detainD = style.StationStand.detainCar.position ? model.height - distance: -style.StationStand.safetyDoor.height;
const detainH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + detainD;
const detainX = model.position.x - (style.StationStand.detainCar.direction || drict) * (style.StationStand.detainCar.offset.x - model.width / 2);
const detainY = model.position.y + (style.StationStand.detainCar.direction || drict) * (style.StationStand.detainCar.offset.y) + drict * detainH;
const detainX = model.position.x - (style.StationStand.detainCar.position || drict) * (style.StationStand.detainCar.offset.x - model.width / 2);
const detainY = model.position.y + (style.StationStand.detainCar.position || drict) * (style.StationStand.detainCar.offset.y) + drict * detainH;
this.detain = new EDetain({
zlevel: this.zlevel,
z: this.z,
@ -106,10 +106,10 @@ class StationStand extends Group {
});
/** 停站时间*/
const timeD = style.StationStand.stopTime.direction ? model.height - distance: -style.StationStand.safetyDoor.height;
const timeD = style.StationStand.stopTime.position ? model.height - distance: -style.StationStand.safetyDoor.height;
const timeH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + timeD;
const timeX = model.position.x - (style.StationStand.stopTime.direction || drict) * (style.StationStand.stopTime.offset.x - model.width / 2);
const timeY = model.position.y + (style.StationStand.stopTime.direction || drict) * (style.StationStand.stopTime.offset.y) + drict * timeH;
const timeX = model.position.x - (style.StationStand.stopTime.position || drict) * (style.StationStand.stopTime.offset.x - model.width / 2);
const timeY = model.position.y + (style.StationStand.stopTime.position || drict) * (style.StationStand.stopTime.offset.y) + drict * timeH;
this.time = new ETime({
zlevel: this.zlevel,
z: this.z + 1,
@ -120,10 +120,10 @@ class StationStand extends Group {
});
/** 运行等级*/
const levelD = style.StationStand.level.direction ? model.height - distance: -style.StationStand.safetyDoor.height;
const levelD = style.StationStand.level.position ? model.height - distance: -style.StationStand.safetyDoor.height;
const levelH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + levelD;
const levelX = model.position.x - (style.StationStand.level.direction || drict) * (style.StationStand.level.offset.x - model.width / 2);
const levelY = model.position.y + (style.StationStand.level.direction || drict) * (style.StationStand.level.offset.y) + drict * levelH;
const levelX = model.position.x - (style.StationStand.level.position || drict) * (style.StationStand.level.offset.x - model.width / 2);
const levelY = model.position.y + (style.StationStand.level.position || drict) * (style.StationStand.level.offset.y) + drict * levelH;
this.level = new ELevel({
zlevel: this.zlevel,
z: this.z + 1,
@ -135,12 +135,12 @@ class StationStand extends Group {
/** 列车停跳 */
if (style.StationStand.common.haveJumpShow) {
const jumpD = style.StationStand.jump.direction ? model.height - distance: -style.StationStand.safetyDoor.height;
const jumpD = style.StationStand.jump.position ? model.height - distance: -style.StationStand.safetyDoor.height;
const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD;
const jumpX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2);
const jumpY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y) + drict * jumpH;
const jumpCX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2);
const jumpCY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y - style.StationStand.common.textFontSize / 2) + drict * jumpH;
const jumpX = model.position.x - (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.x - model.width / 2);
const jumpY = model.position.y + (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.y) + drict * jumpH;
const jumpCX = model.position.x - (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.x - model.width / 2);
const jumpCY = model.position.y + (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.y - style.StationStand.common.textFontSize / 2) + drict * jumpH;
this.jump = new EJump({
zlevel: this.zlevel,
z: this.z + 1,