From 1c12b88d6d5c90812a4085e681bca936c4d3bdc7 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 7 May 2020 13:35:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A4=A7=E5=B1=8F=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=98=BE=E7=A4=BA=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/map.js | 11 +++++------ src/jmapNew/theme/ningbo_01/model.js | 9 +++++++++ src/jmapNew/transformHandleScreen.js | 11 +++++++++-- 3 files changed, 23 insertions(+), 8 deletions(-) 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(); // 更新 } }