NEZ-2239 fix: terminal 样式错误 以及地图resize 不生效

This commit is contained in:
zhangyu
2022-10-11 17:59:23 +08:00
parent 69aeee0d72
commit 4c8052e0bc
7 changed files with 49 additions and 25 deletions

View File

@@ -2234,10 +2234,15 @@ export default {
let domRect = document.getElementById('topology-canvas' + this.topologyIndex).getBoundingClientRect()
getTopology(this.topologyIndex).canvasPos = domRect
if (this.fromOverView) {
if (this.oldTopologyData && !this.oldTopologyData.pens) {
this.oldTopologyData.pens = []
try {
const obj = JSON.parse(this.oldTopologyData)
if (obj && !obj.pens) {
obj.pens = []
}
getTopology(this.topologyIndex).open(obj)
} catch (e) {
console.log(e)
}
getTopology(this.topologyIndex).open(this.oldTopologyData)
}
let flag = false