38 lines
973 B
JavaScript
38 lines
973 B
JavaScript
|
import Group from 'zrender/src/container/Group';
|
||
|
import ESafeDoor from './ESafeDoor';
|
||
|
|
||
|
export default class Line2 extends Group {
|
||
|
constructor(model, style) {
|
||
|
super();
|
||
|
this._code = model.code;
|
||
|
this._type = model._type;
|
||
|
this.zlevel = model.zlevel;
|
||
|
this.z = 1;
|
||
|
this.model = model;
|
||
|
this.style = style;
|
||
|
this.create();
|
||
|
this.setState(model);
|
||
|
}
|
||
|
|
||
|
create() {
|
||
|
/** 屏蔽门*/
|
||
|
const model = this.model;
|
||
|
const style = this.style;
|
||
|
this.safeDoor = new ESafeDoor({
|
||
|
zlevel: this.zlevel,
|
||
|
z: this.z,
|
||
|
style: style,
|
||
|
x: model.position.x,
|
||
|
y: model.position.y,
|
||
|
width: model.width || style.StationStand.safetyDoor.width,
|
||
|
height: model.height || style.StationStand.safetyDoor.height,
|
||
|
show: model.hasDoor
|
||
|
});
|
||
|
this.add(this.safeDoor);
|
||
|
}
|
||
|
|
||
|
setState(model) {
|
||
|
|
||
|
}
|
||
|
}
|