2019-11-29 12:51:58 +08:00
|
|
|
export default class EMouse {
|
2020-04-23 17:11:51 +08:00
|
|
|
constructor(device) {
|
|
|
|
this.device = device;
|
|
|
|
}
|
2019-11-29 12:51:58 +08:00
|
|
|
|
2020-04-23 17:11:51 +08:00
|
|
|
mouseover(e) {
|
|
|
|
if (this.device.prdType) {
|
|
|
|
this.device.setVisible(true);
|
|
|
|
const instance = this.device.getInstanceByCode(this.device.model.sectionCode);
|
|
|
|
if (instance && instance.mouseEvent && instance.mouseEvent.mouseover) {
|
|
|
|
instance.mouseEvent.mouseEnter(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-29 12:51:58 +08:00
|
|
|
|
2020-04-23 17:11:51 +08:00
|
|
|
mouseout(e) {
|
|
|
|
if (this.device.prdType) {
|
|
|
|
this.device.setVisible(false || this.device.model.trainWindowShow);
|
|
|
|
const instance = this.device.getInstanceByCode(this.device.model.sectionCode);
|
|
|
|
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
|
|
|
|
instance.mouseEvent.mouseLeave(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-29 12:51:58 +08:00
|
|
|
|
2020-04-23 17:11:51 +08:00
|
|
|
mouseEnter(e) {
|
|
|
|
if (this.device.prdType) {
|
|
|
|
this.device.setVisible(true);
|
|
|
|
}
|
|
|
|
}
|
2019-11-29 12:51:58 +08:00
|
|
|
|
2020-04-23 17:11:51 +08:00
|
|
|
mouseLeave(e) {
|
|
|
|
if (this.device.prdType ) {
|
|
|
|
this.device.setVisible(false);
|
|
|
|
}
|
|
|
|
}
|
2019-11-29 12:51:58 +08:00
|
|
|
}
|