修改 代码接口名称
This commit is contained in:
parent
3c4fc9ef18
commit
530a1c473e
@ -152,6 +152,7 @@ class MouseController extends Eventful {
|
||||
}
|
||||
|
||||
checkEvent(e) {
|
||||
console.log(e.which);
|
||||
return new EventModel(e);
|
||||
// var oldEm = new EventModel(this.$zr.curEvent || { event: {} });
|
||||
// var newEm = new EventModel(e);
|
||||
|
@ -13,10 +13,10 @@ export default class ImageControl extends Group {
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.z = model.zIndex || 1;
|
||||
this._create();
|
||||
this.create();
|
||||
}
|
||||
|
||||
_create() {
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.image = new Image({
|
||||
zlevel: this.zlevel,
|
||||
|
@ -5,10 +5,10 @@ export default class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.down = true;
|
||||
this._create();
|
||||
this.down = false;
|
||||
this.create();
|
||||
}
|
||||
_create() {
|
||||
create() {
|
||||
this.text = new Text({
|
||||
_subType: 'Text',
|
||||
zlevel: this.device.zlevel,
|
||||
@ -34,8 +34,10 @@ export default class EMouse extends Group {
|
||||
}
|
||||
|
||||
mouseoutText(e) {
|
||||
if (!this.down) {
|
||||
this.text.hide();
|
||||
}
|
||||
}
|
||||
|
||||
mouseoverArc(e) {
|
||||
this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor);
|
||||
@ -44,9 +46,15 @@ export default class EMouse extends Group {
|
||||
this.device.control.setArcBorder(true);
|
||||
}
|
||||
mouseoutArc(e) {
|
||||
if (!this.down) {
|
||||
this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
}
|
||||
}
|
||||
mouseout(e) {
|
||||
this.mouseoutText(e);
|
||||
this.mouseoutArc(e);
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,9 @@ export default class EMouse extends Group {
|
||||
super();
|
||||
this.device = device;
|
||||
this.down = true;
|
||||
this._create();
|
||||
this.create();
|
||||
}
|
||||
_create() {
|
||||
create() {
|
||||
this.text = new Text({
|
||||
_subType: 'Text',
|
||||
zlevel: this.device.zlevel,
|
||||
@ -34,8 +34,10 @@ export default class EMouse extends Group {
|
||||
}
|
||||
|
||||
mouseoutText(e) {
|
||||
if (!this.down) {
|
||||
this.text.hide();
|
||||
}
|
||||
}
|
||||
|
||||
mouseoverArc(e) {
|
||||
this.device.control.setControlColor(this.device.style.LimitControl.mouseOverStyle.arcColor);
|
||||
@ -44,9 +46,15 @@ export default class EMouse extends Group {
|
||||
this.device.control.setArcBorder(true);
|
||||
}
|
||||
mouseoutArc(e) {
|
||||
if (!this.down) {
|
||||
this.device.control.setControlColor(this.device.style.LimitControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
}
|
||||
}
|
||||
mouseout(e) {
|
||||
this.mouseoutText(e);
|
||||
this.mouseoutArc(e);
|
||||
}
|
||||
}
|
||||
|
@ -100,6 +100,7 @@ class EMouse extends Group {
|
||||
}
|
||||
}
|
||||
mouseout() {
|
||||
if (!this.down) {
|
||||
this.sectionTextShadow && this.sectionTextShadow.hide();
|
||||
if (this.device.model.isSwitchSection && this.device.model.switch) {
|
||||
// 道岔区段
|
||||
@ -111,5 +112,6 @@ class EMouse extends Group {
|
||||
this.lineBorder && this.lineBorder.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export default EMouse;
|
||||
|
@ -20,7 +20,7 @@ export default class Switch extends Group {
|
||||
this.style = style;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 6;
|
||||
this._create();
|
||||
this.create();
|
||||
this._createLockRect(); // 创建单锁矩形框显示
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
@ -36,7 +36,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
_create() {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
|
||||
|
@ -6,9 +6,9 @@ export default class EMouse extends Group {
|
||||
super();
|
||||
this.device = device;
|
||||
this.down = true;
|
||||
this._create();
|
||||
this.create();
|
||||
}
|
||||
_create() {
|
||||
create() {
|
||||
this.text = new Text({
|
||||
_subType: 'Text',
|
||||
zlevel: this.device.zlevel,
|
||||
@ -34,8 +34,10 @@ export default class EMouse extends Group {
|
||||
}
|
||||
|
||||
mouseoutText(e) {
|
||||
if (!this.down) {
|
||||
this.text.hide();
|
||||
}
|
||||
}
|
||||
|
||||
mouseoverArc(e) {
|
||||
this.device.control.setControlColor(this.device.style.ZcControl.mouseOverStyle.arcColor);
|
||||
@ -44,9 +46,15 @@ export default class EMouse extends Group {
|
||||
this.device.control.setArcBorder(true);
|
||||
}
|
||||
mouseoutArc(e) {
|
||||
if (!this.down) {
|
||||
this.device.control.setControlColor(this.device.style.ZcControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
}
|
||||
}
|
||||
mouseout(e) {
|
||||
this.mouseoutText(e);
|
||||
this.mouseoutArc(e);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user