diff --git a/src/jlmap3d/jl3dtrafficplan/jl3dsandboxtest.js b/src/jlmap3d/jl3dtrafficplan/jl3dsandboxtest.js index 59ff72094..6d1dfb080 100644 --- a/src/jlmap3d/jl3dtrafficplan/jl3dsandboxtest.js +++ b/src/jlmap3d/jl3dtrafficplan/jl3dsandboxtest.js @@ -54,6 +54,17 @@ export function Jl3dSandBoxTest(dom,textUi,skinCode,routegroup,token) { renderer.render( scene, camera ); controls.update(); + const dist = camera.position.y; + const vFOV = THREE.Math.degToRad(camera.fov); + const size = 1 * Math.tan(vFOV / 2) * dist; + const scaleFactor = 130; + const scale = size / scaleFactor; + for(let i=0;i { this.name.getArrowText().show(); }, onmouseout: () => { this.name.getArrowText().hide(); } }); - + const coverPoint1 = [sectionAPoint.x - 2 * directxA * (relocShelterLength * sectionBTriangle.getCosRate()), sectionAPoint.y - drictyyA * relocShelterLength * sectionBTriangle.getSinRate()]; + const coverPoint2 = [sectionAPoint.x, sectionAPoint.y]; + this.shapeBlockCover = new ESwBlock({ + zlevel: this.zlevel, + z: this.z, + style: style, + coverPoints: [coverPoint1, coverPoint2], + cursor: 'pointer', + triangle: this.triangle, + onmouseover: () => { this.name.getArrowText().show(); }, + onmouseout: () => { this.name.getArrowText().hide(); } + }); const arrowTextX = model.intersection.x + 10; const arrowTextY = model.intersection.y + 15; const nameTextX = model.namePosition.x + model.intersection.x + directx * (style.Section.line.width * 3 + style.Switch.text.offset.x) * this.triangle.getCotRate(); @@ -173,6 +185,7 @@ export default class Switch extends Group { this.add(this.shapeModelA); this.add(this.shapeModelB); this.add(this.shapeModelC); + this.add(this.shapeBlockCover); this.add(this.name); this.add(this.enabledName); style.Switch.text.show && model.nameShow ? this.name.show() : this.name.hide(); @@ -262,6 +275,7 @@ export default class Switch extends Group { this.shapeModelC.hide(); // 形状 C this.shapeModelA.hide(); // 形状 A this.shapeModelB.hide(); // 形状 B + this.shapeBlockCover.hide(); // 封锁覆盖 this.setHasTextBorder(0); this.shapeModelC.attr({ z: this.z + 3 @@ -469,6 +483,10 @@ export default class Switch extends Group { this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor, fill: this.style.Switch.rectLock.blockFillColor }); } } + if (this.style.Switch.coverBlock && this.style.Switch.coverBlock.show) { + this.shapeBlockCover.show(); + this.shapeBlockCover.setColor(this.style.Switch.coverBlock.coverBlockColor); + } } blockMonolock() { if (this.style.Switch.rectLock.block && this.style.Switch.rectLock.monolock) { diff --git a/src/jmapNew/theme/haerbin_01/menus/menuBar.vue b/src/jmapNew/theme/haerbin_01/menus/menuBar.vue index 774ee154c..c0f7cc247 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuBar.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuBar.vue @@ -255,13 +255,6 @@ export default { this.classB = this.tempClassB; } }, - '$store.state.training.prdType': function (val) { - if (val == '01' && this.centralizedStationList1.length) { - this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationList1[0].code); - } else { - this.$store.dispatch('map/setShowCentralizedStationCode', ''); - } - }, '$store.state.training.centerStationCode': function(code) { if (code) { this.stationCode = code; @@ -358,16 +351,12 @@ export default { }); this.colsNum = 24 / this.centralizedStationList1.length; if (centralizedStationList.length) { - if (this.$store.state.training.centerStationCode) { - this.stationCode = this.$store.state.training.centerStationCode; + if (this.$store.state.map.showCentralizedStationCode) { + this.stationCode = this.$store.state.map.showCentralizedStationCode; } else { this.stationCode = centralizedStationList[0].code; } } - - if (this.$store.state.training.prdType == '01') { - this.$store.dispatch('map/setShowCentralizedStationCode', this.stationCode); - } }, switchShowStation(stationCode) { this.stationCode = stationCode; diff --git a/src/jmapNew/theme/nanjing_02/menus/menuBar.vue b/src/jmapNew/theme/nanjing_02/menus/menuBar.vue index 24b3a1719..0cbf4e4de 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuBar.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuBar.vue @@ -253,13 +253,6 @@ export default { this.classB = this.tempClassB; } }, - '$store.state.training.prdType': function (val) { - if (val == '01' && this.centralizedStationList1.length) { - this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationList1[0].code); - } else { - this.$store.dispatch('map/setShowCentralizedStationCode', ''); - } - }, '$store.state.training.centerStationCode': function(code) { if (code) { this.stationCode = code; @@ -356,16 +349,12 @@ export default { }); this.colsNum = 24 / this.centralizedStationList1.length; if (centralizedStationList.length) { - if (this.$store.state.training.centerStationCode) { - this.stationCode = this.$store.state.training.centerStationCode; + if (this.$store.state.map.showCentralizedStationCode) { + this.stationCode = this.$store.state.map.showCentralizedStationCode; } else { this.stationCode = centralizedStationList[0].code; } } - - if (this.$store.state.training.prdType == '01') { - this.$store.dispatch('map/setShowCentralizedStationCode', this.stationCode); - } }, switchShowStation(stationCode) { this.stationCode = stationCode; diff --git a/src/jmapNew/theme/nanjing_02/menus/menuButton.vue b/src/jmapNew/theme/nanjing_02/menus/menuButton.vue index 3cce449c2..408a51327 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuButton.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuButton.vue @@ -1,7 +1,7 @@