From 61100e358b22b81af98e28e07d2337424f7a21ee Mon Sep 17 00:00:00 2001 From: xile611 Date: Thu, 15 May 2025 12:08:24 +0800 Subject: [PATCH 1/2] fix: highlight elements should be reset when mouse enter tooltip --- packages/vgrammar-core/src/interactions/element-highlight.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/vgrammar-core/src/interactions/element-highlight.ts b/packages/vgrammar-core/src/interactions/element-highlight.ts index e921a63a7..542d5460f 100644 --- a/packages/vgrammar-core/src/interactions/element-highlight.ts +++ b/packages/vgrammar-core/src/interactions/element-highlight.ts @@ -117,6 +117,7 @@ export class ElementHighlight extends BaseInteraction { if (!this._statedElements || !this._statedElements.length) { return; } + const element = e.element; if (element) { @@ -127,6 +128,8 @@ export class ElementHighlight extends BaseInteraction { } else if (this._resetType === 'self' && hasActiveElement) { this.resetAll(); } + } else if (this._resetType === 'view') { + this.resetAll(); } }; } From 5025591a6de1f32630639c769c75620ed73f0500 Mon Sep 17 00:00:00 2001 From: xile611 Date: Thu, 15 May 2025 14:11:08 +0800 Subject: [PATCH 2/2] docs: update changlog of rush --- .../fix-element-highlight-reset_2025-05-15-06-11.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@visactor/vgrammar-core/fix-element-highlight-reset_2025-05-15-06-11.json diff --git a/common/changes/@visactor/vgrammar-core/fix-element-highlight-reset_2025-05-15-06-11.json b/common/changes/@visactor/vgrammar-core/fix-element-highlight-reset_2025-05-15-06-11.json new file mode 100644 index 000000000..fa4e2db2d --- /dev/null +++ b/common/changes/@visactor/vgrammar-core/fix-element-highlight-reset_2025-05-15-06-11.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: highlight elements should be reset when mouse enter tooltip\n\n", + "type": "none", + "packageName": "@visactor/vgrammar-core" + } + ], + "packageName": "@visactor/vgrammar-core", + "email": "dingling112@gmail.com" +} \ No newline at end of file