调整哈尔滨鼠标事件

This commit is contained in:
zyy 2020-12-17 13:59:08 +08:00
parent 3ec50678c5
commit 54cf4b3f97

View File

@ -315,10 +315,17 @@ export default class Section extends Group {
} }
const path = window.location.href; const path = window.location.href;
if (path.includes('/map/draw')) { if (path.includes('/map/draw')) {
this.on('mouseout', () => { this.on('mouseout', () => { // 移出
!this.selectedType && !this.selected && this.line && this.line.setStyle({ stroke: this.style.Section.line.spareColor, lineWidth: this.style.Section.line.width }); !this.selectedType && !this.selected && this.line && this.line.setStyle({ stroke: this.style.Section.line.spareColor, lineWidth: this.style.Section.line.width });
if (this.style.Switch.sectionAction.flag && this.model.relSwitchCode) {
const switchModel = Vue.prototype.$jlmap.mapDevice[this.model.relSwitchCode];
const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode];
if (sectionC.code == this.model.code) {
sectionC && sectionC.instance && sectionC.instance.line.setStyle({ stroke: this.style.Switch.sectionAction.spareColor });
}
}
}); });
this.on('mouseover', () => { this.on('mouseover', () => { // 移入
!this.selectedType && this.line && this.line.setStyle({ stroke: '#fbfbfb', lineWidth: this.style.Section.line.width - 0.2 }); !this.selectedType && this.line && this.line.setStyle({ stroke: '#fbfbfb', lineWidth: this.style.Section.line.width - 0.2 });
}); });
} }