调整大屏预览显示过滤

This commit is contained in:
zyy 2020-05-07 13:35:25 +08:00
parent 4b53a2a1c5
commit 1c12b88d6d
3 changed files with 23 additions and 8 deletions

View File

@ -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});
}

View File

@ -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];

View File

@ -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(); // 更新
}
}