diff --git a/src/jmapNew/shape/AutoTurnBack/EMouse.js b/src/jmapNew/shape/AutoTurnBack/EMouse.js index c52f85576..c0eb1a7ac 100644 --- a/src/jmapNew/shape/AutoTurnBack/EMouse.js +++ b/src/jmapNew/shape/AutoTurnBack/EMouse.js @@ -28,7 +28,9 @@ export default class EMouse extends Group { this.text.hide(); } mouseover(e) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.show(); } else { // this.device.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); @@ -38,7 +40,8 @@ export default class EMouse extends Group { mouseout(e) { if (!this.device.__down) { - if (e.target) { + if (e && + e.target) { this.text.hide(); } else { // this.device.setControlColor(this.device.style.LcControl.lamp.controlColor); diff --git a/src/jmapNew/shape/AutomacticRoute/EMouse.js b/src/jmapNew/shape/AutomacticRoute/EMouse.js index 9baf87096..2cf5d2e38 100644 --- a/src/jmapNew/shape/AutomacticRoute/EMouse.js +++ b/src/jmapNew/shape/AutomacticRoute/EMouse.js @@ -28,7 +28,9 @@ export default class EMouse extends Group { this.text.hide(); } mouseover(e) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.show(); } else { this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); @@ -40,7 +42,9 @@ export default class EMouse extends Group { mouseout(e) { if (!this.device.__down) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.hide(); } else { this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); diff --git a/src/jmapNew/shape/AxleReset/EMouse.js b/src/jmapNew/shape/AxleReset/EMouse.js index 499217d4c..26a5b406f 100644 --- a/src/jmapNew/shape/AxleReset/EMouse.js +++ b/src/jmapNew/shape/AxleReset/EMouse.js @@ -28,7 +28,9 @@ export default class EMouse extends Group { this.text.hide(); } mouseover(e) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.show(); } else { // this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); @@ -40,7 +42,9 @@ export default class EMouse extends Group { mouseout(e) { if (!this.device.__down) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.hide(); } else { // this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); diff --git a/src/jmapNew/shape/GuideLock/EMouse.js b/src/jmapNew/shape/GuideLock/EMouse.js index d76201671..4bdbe8731 100644 --- a/src/jmapNew/shape/GuideLock/EMouse.js +++ b/src/jmapNew/shape/GuideLock/EMouse.js @@ -28,7 +28,9 @@ export default class EMouse extends Group { this.text.hide(); } mouseover(e) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.show(); } else { // this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); @@ -38,7 +40,9 @@ export default class EMouse extends Group { mouseout(e) { if (!this.device.__down) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.hide(); } else { // this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); diff --git a/src/jmapNew/shape/LcControl/EMouse.js b/src/jmapNew/shape/LcControl/EMouse.js index 9baf87096..2cf5d2e38 100644 --- a/src/jmapNew/shape/LcControl/EMouse.js +++ b/src/jmapNew/shape/LcControl/EMouse.js @@ -28,7 +28,9 @@ export default class EMouse extends Group { this.text.hide(); } mouseover(e) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.show(); } else { this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); @@ -40,7 +42,9 @@ export default class EMouse extends Group { mouseout(e) { if (!this.device.__down) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.hide(); } else { this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor); diff --git a/src/jmapNew/shape/LimitControl/EMouse.js b/src/jmapNew/shape/LimitControl/EMouse.js index e86518d69..c4c451e4b 100644 --- a/src/jmapNew/shape/LimitControl/EMouse.js +++ b/src/jmapNew/shape/LimitControl/EMouse.js @@ -29,7 +29,9 @@ export default class EMouse extends Group { this.text.hide(); } mouseover(e) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.show(); } else { this.device.control.setControlColor(this.device.style.LimitControl.mouseOverStyle.arcColor); @@ -41,7 +43,9 @@ export default class EMouse extends Group { mouseout(e) { if (!this.device.__down) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.hide(); } else { this.device.control.setControlColor(this.device.style.LimitControl.lamp.controlColor); diff --git a/src/jmapNew/shape/SaidLamp/EMouse.js b/src/jmapNew/shape/SaidLamp/EMouse.js index e7789ef4d..4bd9eb897 100644 --- a/src/jmapNew/shape/SaidLamp/EMouse.js +++ b/src/jmapNew/shape/SaidLamp/EMouse.js @@ -28,7 +28,9 @@ export default class EMouse extends Group { this.text.hide(); } mouseover(e) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.show(); } else { this.device.control.setControlColor(this.device.deviceStyle.mouseOverStyle.arcColor); @@ -40,7 +42,9 @@ export default class EMouse extends Group { mouseout(e) { if (!this.device.__down) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.hide(); } else { this.device.control.setControlColor(this.device.deviceStyle.lamp.controlColor); diff --git a/src/jmapNew/shape/StationTurnBack/EMouse.js b/src/jmapNew/shape/StationTurnBack/EMouse.js index c52f85576..c0eb1a7ac 100644 --- a/src/jmapNew/shape/StationTurnBack/EMouse.js +++ b/src/jmapNew/shape/StationTurnBack/EMouse.js @@ -28,7 +28,9 @@ export default class EMouse extends Group { this.text.hide(); } mouseover(e) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.show(); } else { // this.device.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor); @@ -38,7 +40,8 @@ export default class EMouse extends Group { mouseout(e) { if (!this.device.__down) { - if (e.target) { + if (e && + e.target) { this.text.hide(); } else { // this.device.setControlColor(this.device.style.LcControl.lamp.controlColor); diff --git a/src/jmapNew/shape/ZcControl/EMouse.js b/src/jmapNew/shape/ZcControl/EMouse.js index be34c8112..bedc46d8a 100644 --- a/src/jmapNew/shape/ZcControl/EMouse.js +++ b/src/jmapNew/shape/ZcControl/EMouse.js @@ -29,7 +29,9 @@ export default class EMouse extends Group { this.text.hide(); } mouseover(e) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.show(); } else { this.device.control.setControlColor(this.device.style.ZcControl.mouseOverStyle.arcColor); @@ -41,7 +43,9 @@ export default class EMouse extends Group { mouseout(e) { if (!this.device.__down) { - if (e.target && e.target._subType == 'Text') { + if (e && + e.target && + e.target._subType == 'Text') { this.text.hide(); } else { this.device.control.setControlColor(this.device.style.ZcControl.lamp.controlColor);