增加Inspector清理功能

This commit is contained in:
xu_yanfeng
2025-01-25 18:24:37 +08:00
parent 915f144986
commit 7ae3b5466a
3 changed files with 15 additions and 0 deletions

View File

@@ -28,6 +28,10 @@ export class Hint {
private inspector: Inspector = null;
constructor(inspector: Inspector) {
this.inspector = inspector;
document.addEventListener(DocumentEvent.InspectorClear, () => {
this.cleanHover();
this.cleanSelected();
});
document.addEventListener(DocumentEvent.GameInspectorBegan, (event: CustomEvent) => {
const el = this.getTargetElement();
if (!el) {