Merge branch 'dev' into test
This commit is contained in:
commit
210c460c69
@ -45,8 +45,8 @@ export default class elevator extends Group {
|
||||
z: model.z,
|
||||
draggable: false,
|
||||
point: {
|
||||
x: model.point.x+model.width/6*4.7,
|
||||
y: model.point.y+model.height/8*0.1
|
||||
x: model.width/6*4.7,
|
||||
y: model.height/8*0.1
|
||||
},
|
||||
width: model.width/6*0.8,
|
||||
status: this.getStatus('top'),
|
||||
@ -58,8 +58,8 @@ export default class elevator extends Group {
|
||||
z: model.z,
|
||||
draggable: false,
|
||||
point: {
|
||||
x: model.point.x+model.width/6*1.3,
|
||||
y: model.point.y+model.height/8*7.9
|
||||
x: model.width/6*1.3,
|
||||
y: model.height/8*7.9
|
||||
},
|
||||
width: model.width/6*0.8,
|
||||
status: this.getStatus('bottom'),
|
||||
|
@ -1,5 +1,4 @@
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import * as toolpath from 'zrender/src/tool/path';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
|
||||
export default class elevatorBack extends Group {
|
||||
@ -14,63 +13,22 @@ export default class elevatorBack extends Group {
|
||||
create() {
|
||||
// debugger;
|
||||
const model = this.model;
|
||||
this.arrowCircle = new Circle({
|
||||
const tempString='M'+model.width/6+' '+model.height/8*6+' L'+model.width/6*4+
|
||||
' 0 L'+model.width/6*5+' 0 A '+model.width/6+' '+model.width/6+' 0 0 1 '+
|
||||
model.width/6*5+' '+model.height/4+'L '+model.width/3+' '+model.height+' L'+model.width/6+
|
||||
' '+model.height+' '+'A'+model.width/6+' '+model.width/6+' 0 0 1 '+model.width/6+' '+model.height/8*6;
|
||||
this.elevatorBack = toolpath.createFromString(tempString, {
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
// path: 'M 0 0 Q -70 -50 0 -100 0 -100 L 150 -400 L 200 -400 Q 270 -350 200 -300 200 -300 L 50 0',
|
||||
draggable: false,
|
||||
// model.draggable ||
|
||||
shape: {
|
||||
cx: (model.point.x + model.width/6*5).toFixed(2),
|
||||
cy: (model.point.y + model.height/8).toFixed(2),
|
||||
r: (model.width/6).toFixed(2)
|
||||
},
|
||||
style: {
|
||||
x: model.point.x,
|
||||
y: model.point.y,
|
||||
brushType: 'fill',
|
||||
fill: this.model.fillColor || '#313131',
|
||||
lineWidth: 0
|
||||
}
|
||||
});
|
||||
|
||||
this.arrowPoly = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
draggable: false,
|
||||
shape: {
|
||||
points: [[(model.point.x+model.width/6).toFixed(2), (model.point.y + model.height).toFixed(2)], [(model.point.x+model.width/6*2).toFixed(2), model.point.y + model.height],
|
||||
[(model.point.x+model.width/6*5).toFixed(2), (model.point.y + model.height/8*2).toFixed(2)],
|
||||
[(model.point.x+model.width/6*5).toFixed(2), model.point.y],
|
||||
[(model.point.x+model.width/6*4).toFixed(2), model.point.y],
|
||||
[(model.point.x+model.width/6).toFixed(2), (model.point.y + model.height/8*6).toFixed(2)]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
brushType: 'fill',
|
||||
stroke: model.stroke || '#313131',
|
||||
lineWidth: 0,
|
||||
fill: model.fillColor || '#313131'
|
||||
}
|
||||
});
|
||||
|
||||
this.arrowCircleRight = new Circle({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
// path: 'M 0 0 Q -70 -50 0 -100 0 -100 L 150 -400 L 200 -400 Q 270 -350 200 -300 200 -300 L 50 0',
|
||||
draggable: false,
|
||||
shape: {
|
||||
cx: (model.point.x + model.width/6).toFixed(2),
|
||||
cy: (model.point.y + model.height/8*7).toFixed(2),
|
||||
r: (model.width/6).toFixed(2)
|
||||
},
|
||||
style: {
|
||||
fill: this.model.fillColor || '#313131',
|
||||
lineWidth: 0,
|
||||
brushType: 'fill'
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.arrowPoly);
|
||||
this.add(this.arrowCircle);
|
||||
this.add(this.arrowCircleRight);
|
||||
this.add(this.elevatorBack);
|
||||
}
|
||||
}
|
||||
|
@ -38,9 +38,8 @@ export default class Station extends Group {
|
||||
textFill: model.nameFontColor
|
||||
});
|
||||
this.add(this.stationText);
|
||||
}
|
||||
|
||||
if (style.Station.kmPostShow) {
|
||||
const path = window.location.href;
|
||||
if (style.Station.kmPostShow || path.includes('/map/draw')) {
|
||||
// 公里标是否显示
|
||||
let direction = 1;
|
||||
if (this.style.Station.kilometerPosition == 'up') {
|
||||
@ -63,6 +62,7 @@ export default class Station extends Group {
|
||||
this.add(this.mileageText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
setState(model) {
|
||||
|
Loading…
Reference in New Issue
Block a user