38 lines
868 B
JavaScript
38 lines
868 B
JavaScript
export default class EMouse {
|
|
constructor(device) {
|
|
this.device = device;
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
|
|
mouseEnter(e) {
|
|
if (this.device.prdType) {
|
|
this.device.setVisible(true);
|
|
}
|
|
}
|
|
|
|
mouseLeave(e) {
|
|
if (this.device.prdType ) {
|
|
this.device.setVisible(false);
|
|
}
|
|
}
|
|
}
|