Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/jmapNew/painter.js
This commit is contained in:
joylink_zhangsai 2023-05-06 18:37:26 +08:00
commit 80178a80f6

View File

@ -2,7 +2,7 @@ import * as zrUtil from 'zrender/src/core/util';
// import * as vector from 'zrender/src/core/vector'; // import * as vector from 'zrender/src/core/vector';
import Group from 'zrender/src/container/Group'; import Group from 'zrender/src/container/Group';
import deviceType from './constant/deviceType'; import deviceType from './constant/deviceType';
import nccGraphType from './constant/nccGraphType'; import systemGraphType from './constant/systemGraphType';
import transitionDeviceStatus from './constant/stateTransition'; import transitionDeviceStatus from './constant/stateTransition';
// import shapefactory from './shape/factory'; // import shapefactory from './shape/factory';
import Graphic from './shape'; import Graphic from './shape';
@ -43,7 +43,7 @@ class Painter {
// 添加子级图层 // 添加子级图层
zrUtil.each([ zrUtil.each([
...Object.values(deviceType), ...Object.values(deviceType),
...Object.values(nccGraphType)], (type) => { ...Object.values(systemGraphType)], (type) => {
const level = new Group({ name: `__${type}__` }); const level = new Group({ name: `__${type}__` });
this.mapInstanceLevel[type] = level; this.mapInstanceLevel[type] = level;
this.parentLevel.add(level); this.parentLevel.add(level);
@ -155,17 +155,13 @@ class Painter {
trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance); trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance);
trainDevice.instance = null; trainDevice.instance = null;
trainDevice.zrOptions = this.$jmap.$options; trainDevice.zrOptions = this.$jmap.$options;
curModel.sectionModel && curModel.sectionModel.instance && this.add(trainDevice); curModel.sectionModel.instance && this.add(trainDevice);
}); });
if (this.screenFlag) { if (this.screenFlag) {
this.$transformHandleScreen.transformView(device.instance); this.$transformHandleScreen.transformView(device.instance);
} }
} }
updateNccTrain(device) {
this.delete(device);
this.add(device);
}
/** 画面更新 */ /** 画面更新 */
updatePicture(device) { updatePicture(device) {
if (device) { if (device) {