diff --git a/src/drawApp/graphics/IBPButtonInteraction.ts b/src/drawApp/graphics/IBPButtonInteraction.ts index a37b8c5..12af66b 100644 --- a/src/drawApp/graphics/IBPButtonInteraction.ts +++ b/src/drawApp/graphics/IBPButtonInteraction.ts @@ -207,22 +207,20 @@ export class IbpButtonInteraction extends GraphicInteractionPlugin { }); }; bypassResetConfig.handler = () => { - bypassConfig.handler = () => { - if (!simulationId || !mapId) { - return; - } - bypassOperation({ - simulationId, - mapId, - deviceId: ibpButton.id, - deviceCode: ibpButton.datas.code, - stationId, - operation: request.BypassOperationReq.Operation.bypass_reset, - btnType: request.BypassOperationReq.BtnType.ibp_btn, - }).catch((err) => { - errorNotify('操作失败', { message: err.origin.response.data.title }); - }); - }; + if (!simulationId || !mapId) { + return; + } + bypassOperation({ + simulationId, + mapId, + deviceId: ibpButton.id, + deviceCode: ibpButton.datas.code, + stationId, + operation: request.BypassOperationReq.Operation.bypass_reset, + btnType: request.BypassOperationReq.BtnType.ibp_btn, + }).catch((err) => { + errorNotify('操作失败', { message: err.origin.response.data.title }); + }); }; IbpButtonMenu.open(e.global); } diff --git a/src/drawApp/graphics/IbpKeyInteraction.ts b/src/drawApp/graphics/IbpKeyInteraction.ts index 3a94fe8..527de86 100644 --- a/src/drawApp/graphics/IbpKeyInteraction.ts +++ b/src/drawApp/graphics/IbpKeyInteraction.ts @@ -155,22 +155,20 @@ export class IbpKeyInteraction extends GraphicInteractionPlugin { }); }; bypassResetConfig.handler = () => { - bypassConfig.handler = () => { - if (!simulationId || !mapId) { - return; - } - bypassOperation({ - simulationId, - mapId, - deviceId: ibpKey.id, - deviceCode: ibpKey.datas.code, - stationId, - operation: request.BypassOperationReq.Operation.bypass_reset, - btnType: request.BypassOperationReq.BtnType.ibp_key, - }).catch((err) => { - errorNotify('操作失败', { message: err.origin.response.data.title }); - }); - }; + if (!simulationId || !mapId) { + return; + } + bypassOperation({ + simulationId, + mapId, + deviceId: ibpKey.id, + deviceCode: ibpKey.datas.code, + stationId, + operation: request.BypassOperationReq.Operation.bypass_reset, + btnType: request.BypassOperationReq.BtnType.ibp_key, + }).catch((err) => { + errorNotify('操作失败', { message: err.origin.response.data.title }); + }); }; IbpKeyMenu.open(e.global); } diff --git a/src/drawApp/graphics/PslButtonInteraction.ts b/src/drawApp/graphics/PslButtonInteraction.ts index f8943fb..d66cf77 100644 --- a/src/drawApp/graphics/PslButtonInteraction.ts +++ b/src/drawApp/graphics/PslButtonInteraction.ts @@ -233,22 +233,20 @@ export class PslButtonOperateInteraction extends GraphicInteractionPlugin { - bypassConfig.handler = () => { - if (!simulationId || !mapId) { - return; - } - bypassOperation({ - simulationId, - mapId, - deviceId: pslButton.id, - deviceCode: pslButton.datas.code, - gateBoxId, - operation: request.BypassOperationReq.Operation.bypass_reset, - btnType: request.BypassOperationReq.BtnType.pls_btn, - }).catch((err) => { - errorNotify('操作失败', { message: err.origin.response.data.title }); - }); - }; + if (!simulationId || !mapId) { + return; + } + bypassOperation({ + simulationId, + mapId, + deviceId: pslButton.id, + deviceCode: pslButton.datas.code, + gateBoxId, + operation: request.BypassOperationReq.Operation.bypass_reset, + btnType: request.BypassOperationReq.BtnType.pls_btn, + }).catch((err) => { + errorNotify('操作失败', { message: err.origin.response.data.title }); + }); }; PslButtonMenu.open(e.global); } diff --git a/src/graphics/pslButton/psl-button-spritesheet.png b/src/graphics/pslButton/psl-button-spritesheet.png index f8a527b..6fd02d4 100644 Binary files a/src/graphics/pslButton/psl-button-spritesheet.png and b/src/graphics/pslButton/psl-button-spritesheet.png differ