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,
|
z: model.z,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
point: {
|
point: {
|
||||||
x: model.point.x+model.width/6*4.7,
|
x: model.width/6*4.7,
|
||||||
y: model.point.y+model.height/8*0.1
|
y: model.height/8*0.1
|
||||||
},
|
},
|
||||||
width: model.width/6*0.8,
|
width: model.width/6*0.8,
|
||||||
status: this.getStatus('top'),
|
status: this.getStatus('top'),
|
||||||
@ -58,8 +58,8 @@ export default class elevator extends Group {
|
|||||||
z: model.z,
|
z: model.z,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
point: {
|
point: {
|
||||||
x: model.point.x+model.width/6*1.3,
|
x: model.width/6*1.3,
|
||||||
y: model.point.y+model.height/8*7.9
|
y: model.height/8*7.9
|
||||||
},
|
},
|
||||||
width: model.width/6*0.8,
|
width: model.width/6*0.8,
|
||||||
status: this.getStatus('bottom'),
|
status: this.getStatus('bottom'),
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
import * as toolpath from 'zrender/src/tool/path';
|
||||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
|
||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
|
|
||||||
export default class elevatorBack extends Group {
|
export default class elevatorBack extends Group {
|
||||||
@ -14,63 +13,22 @@ export default class elevatorBack extends Group {
|
|||||||
create() {
|
create() {
|
||||||
// debugger;
|
// debugger;
|
||||||
const model = this.model;
|
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,
|
zlevel: model.zlevel,
|
||||||
z: model.z,
|
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,
|
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: {
|
style: {
|
||||||
|
x: model.point.x,
|
||||||
|
y: model.point.y,
|
||||||
brushType: 'fill',
|
brushType: 'fill',
|
||||||
fill: this.model.fillColor || '#313131',
|
fill: this.model.fillColor || '#313131',
|
||||||
lineWidth: 0
|
lineWidth: 0
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.add(this.elevatorBack);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,9 +38,8 @@ export default class Station extends Group {
|
|||||||
textFill: model.nameFontColor
|
textFill: model.nameFontColor
|
||||||
});
|
});
|
||||||
this.add(this.stationText);
|
this.add(this.stationText);
|
||||||
}
|
const path = window.location.href;
|
||||||
|
if (style.Station.kmPostShow || path.includes('/map/draw')) {
|
||||||
if (style.Station.kmPostShow) {
|
|
||||||
// 公里标是否显示
|
// 公里标是否显示
|
||||||
let direction = 1;
|
let direction = 1;
|
||||||
if (this.style.Station.kilometerPosition == 'up') {
|
if (this.style.Station.kilometerPosition == 'up') {
|
||||||
@ -63,6 +62,7 @@ export default class Station extends Group {
|
|||||||
this.add(this.mileageText);
|
this.add(this.mileageText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
setState(model) {
|
setState(model) {
|
||||||
|
Loading…
Reference in New Issue
Block a user