Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
ca5b78784e
@ -173,10 +173,10 @@ class Jlmap {
|
||||
}
|
||||
}
|
||||
}
|
||||
// const scaleWidth = Math.floor((((opts.width - 200) * num) / rect.width) * 100) / 100;
|
||||
// const scaleHeight = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100;
|
||||
// const scale = Math.min(scaleWidth, scaleHeight);
|
||||
|
||||
const scaleWidth = Math.floor((((opts.width - 200) * num) / rect.width) * 100) / 100;
|
||||
const scaleHeight = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100;
|
||||
const scale = Math.min(scaleWidth, scaleHeight);
|
||||
// const scale = 0.3;
|
||||
// const spliceWidth = (rect.width + 100) / num * scale;
|
||||
// const dx = (opts.width - spliceWidth) / 2;
|
||||
|
||||
@ -186,20 +186,19 @@ class Jlmap {
|
||||
// }
|
||||
|
||||
const splitList = Vue.prototype.$theme.loadPropConvert(store.state.map.map.skinVO.code).screenSplit;
|
||||
const scale = 0.3;
|
||||
const maxWidth = rect.width + 30;
|
||||
const maxWidth = rect.width;
|
||||
splitList.push(maxWidth);
|
||||
for (let i = 0; i < splitList.length; i++) {
|
||||
let offsetX = '';
|
||||
if (i == 0) {
|
||||
offsetX = -(opts.width - splitList[i] * scale) / 2;
|
||||
offsetX = -(opts.width - splitList[0] * scale) / 2;
|
||||
} else {
|
||||
const dx = (opts.width - (splitList[i] - splitList[i - 1]) * scale) / 2; // 居中计算偏移值
|
||||
offsetX = splitList[i - 1] * scale - dx;
|
||||
}
|
||||
const param = { scaleRate: scale, offsetX: offsetX, offsetY: -100 - (offsetY * i) };
|
||||
arr.push(param);
|
||||
const rect = {x: 0, y: 0, width: Number(splitList[i]) + 10, height: opts.height};
|
||||
const rect = {x: 0, y: 0, width: Number(splitList[i]), height: opts.height};
|
||||
rectList.push(rect);
|
||||
}
|
||||
this.$painter.updateTransform1(arr, rectList);
|
||||
|
@ -3,7 +3,7 @@ import deviceType from '../../constant/deviceType';
|
||||
class Model {
|
||||
constructor() {
|
||||
this.screenLine = 3;
|
||||
this.screenSplit = ['5165', '10303'];
|
||||
this.screenSplit = ['5165', '10299'];
|
||||
// 公共字段部分默认初始值
|
||||
this['public'] = {};
|
||||
this['public'][deviceType.Signal] = {
|
||||
|
@ -34,8 +34,6 @@ class TransformHandle {
|
||||
}
|
||||
view.show(); return;
|
||||
}
|
||||
// console.log(view, rect);
|
||||
// if (this.checkVisible(view, rect)) { view.show(); return; } else { view.hide(); }
|
||||
}
|
||||
view.dirty(); // 更新
|
||||
}
|
||||
@ -59,7 +57,6 @@ class TransformHandle {
|
||||
list.forEach(item => {
|
||||
this.transform.push(createTransform(item));
|
||||
});
|
||||
console.log(this.transform, this.rectList, '------');
|
||||
this.transformAll();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user