代码调整
This commit is contained in:
parent
745dbd6859
commit
10ed69f5ec
@ -309,8 +309,8 @@ class SkinCode extends defaultStyle {
|
||||
position: 1, // 扣车标识在站台上显示方向
|
||||
special:true,
|
||||
text: 'H', // 扣车显示内容
|
||||
insideOffset: { x: 85, y: -18 }, // 内站台扣车偏移量
|
||||
outsideOffset: { x:85, y: 22 }, // 外站台扣车偏移量
|
||||
insideOffset: { x: 15, y: -28 }, // 内站台扣车偏移量
|
||||
outsideOffset: { x:15, y: 22 }, // 外站台扣车偏移量
|
||||
centerTrainColor: '#ff0', // 中心扣车颜色
|
||||
andCenterTrainColor: '#ff0', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#ff0', // 车站扣除文字颜色
|
||||
@ -357,8 +357,8 @@ class SkinCode extends defaultStyle {
|
||||
// 站台 扣车/取消扣车,越站/取消越站 设置按钮
|
||||
stationPlatform:{
|
||||
z:1,
|
||||
insideOffset: { x: 50, y: -20 }, // 内站台按钮偏移量
|
||||
outsideOffset: { x: 50, y: 20}, // 外站台按钮偏移量
|
||||
insideOffset: { y: -20 }, // 内站台按钮偏移量
|
||||
outsideOffset: { y: 20}, // 外站台按钮偏移量
|
||||
detainColor:'#FFFF00', // 扣车颜色
|
||||
defaultColor:'#BFBFBF', // 默认颜色
|
||||
jumpColor:'#00FF00' // 跳停颜色
|
||||
|
@ -15,7 +15,8 @@ class EStationPlatform extends Group {
|
||||
|
||||
const buttonD = model.right ? 1 : -1;
|
||||
const platFormOffset = model.inside ? style.StationStand.stationPlatform.insideOffset : style.StationStand.stationPlatform.outsideOffset;
|
||||
const buttonX = model.position.x - buttonD * (platFormOffset.x - model.width / 2);
|
||||
const buttonX = model.position.x - buttonD * ( model.width / 2 - 20);
|
||||
// platFormOffset.x -
|
||||
const buttonY = model.position.y + buttonD * (platFormOffset.y + buttonD * model.height / 2);
|
||||
this.stationPlatform = new Polygon({
|
||||
zlevel: this.model.zlevel,
|
||||
@ -49,8 +50,8 @@ class EStationPlatform extends Group {
|
||||
this.stationPlatform && this.stationPlatform.setStyle({fill:color});
|
||||
}
|
||||
recover() {
|
||||
console.log(this.model.modelData, 22222222222);
|
||||
console.log(this.model.modelData.code, 111111111);
|
||||
// console.log(this.model.modelData, 22222222222);
|
||||
// console.log(this.model.modelData.code, 111111111);
|
||||
const style = this.model.style;
|
||||
this.setColor(style.StationStand.stationPlatform.defaultColor);
|
||||
}
|
||||
@ -58,7 +59,7 @@ class EStationPlatform extends Group {
|
||||
setState(model) {
|
||||
const style = this.model.style;
|
||||
if (model.stationHoldTrain || model.centerHoldTrain) {
|
||||
console.log(model.code, model.stationHoldTrain, model.centerHoldTrain);
|
||||
// console.log(model.code, model.stationHoldTrain, model.centerHoldTrain);
|
||||
this.setColor(style.StationStand.stationPlatform.detainColor);
|
||||
}
|
||||
if (model.assignSkip || model.allSkip) {
|
||||
|
@ -41,7 +41,7 @@ class EDetain extends Group {
|
||||
this.add(this.detain);
|
||||
|
||||
if (deviceParam.special) {
|
||||
this.detain.setStyle({'textPadding':[1, 3], 'textBorderColor':'#fff', 'textBorderWidth':1});
|
||||
this.detain.setStyle({x:model.position.x - detainD * (model.width / 2 + detainOffset.x), 'textPadding':[1, 3], 'textBorderColor':'#fff', 'textBorderWidth':1});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user