diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 1852c8715..f9cb6ed03 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -157,14 +157,13 @@ class Jlmap { } setUpdateScreen(opts) { + const scale = 0.3; this.$painter.updateTransform1( [ - { scaleRate: 0.3, offsetY: -100 }, - { scaleRate: 0.3, offsetY: -300 }, - { scaleRate: 0.3, offsetY: -500 }, - { scaleRate: 0.3, offsetY: -700 }, - { scaleRate: 0.3, offsetY: -900 }, - { scaleRate: 0.3, offsetY: -1100 } + { scaleRate: scale, offsetY: -100 }, + { scaleRate: scale, offsetY: -300 }, + { scaleRate: scale, offsetY: -500 }, + { scaleRate: scale, offsetY: -700 } ], {width: opts.width, height: opts.height}); } diff --git a/src/jmapNew/theme/ningbo_01/model.js b/src/jmapNew/theme/ningbo_01/model.js index b5f49ae6a..c696290aa 100644 --- a/src/jmapNew/theme/ningbo_01/model.js +++ b/src/jmapNew/theme/ningbo_01/model.js @@ -42,6 +42,15 @@ class Model { }; } + handleScreenProps(viewModel) { // 大屏隐藏元素 + const model = viewModel.model; + if (model._type == deviceType.OutFrame || + model._type == deviceType.Text || + model._type == deviceType.AutoTurnBack) { + return true; + } + } + initPublicProps(model) { if (model) { var modelInitial = this.public[model._type]; diff --git a/src/jmapNew/transformHandleScreen.js b/src/jmapNew/transformHandleScreen.js index 7d99e56ad..2fa289655 100644 --- a/src/jmapNew/transformHandleScreen.js +++ b/src/jmapNew/transformHandleScreen.js @@ -1,5 +1,7 @@ import {createTransform, createBoundingRect} from './utils/parser'; +import Vue from 'vue'; +import store from '@/store/index_APP_TARGET'; class TransformHandle { constructor(painter) { @@ -21,10 +23,15 @@ class TransformHandle { if (view) { for (let i = 0; i < this.transform.length; i++) { view.transform = this.transform[i]; - view.decomposeTransform(); + view.decomposeTransform(); // 修改 transform 后同步位置 + const propConvert = Vue.prototype.$theme.loadPropConvert(store.state.map.map.skinVO.code); + if (propConvert.handleScreenProps && propConvert.handleScreenProps(view)) { + view.hide(); + return; + } if (this.checkVisible(view)) { view.show(); return; } else { view.hide(); } } - view.dirty(); + view.dirty(); // 更新 } }