feat: add syncState support for extensionMark to sync interactive states#4548
Closed
kitee0325 wants to merge 1 commit intoVisActor:developfrom
Closed
feat: add syncState support for extensionMark to sync interactive states#4548kitee0325 wants to merge 1 commit intoVisActor:developfrom
kitee0325 wants to merge 1 commit intoVisActor:developfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
🔗 Related PR link
🐞 Bugserver case id
💡 Background and solution
When using
extensionMarkto add custom decorative marks (e.g., icons, badges) alongside primary series marks, users often want these extension marks to visually respond to interactive states (hover, select, etc.) just like the primary marks do.Previously, there was no built-in mechanism to synchronize interactive states between an
extensionMarkand its corresponding primary mark. Users had to manually implement state synchronization using low-level VRender APIs.Solution:
A new
syncStateoption (boolean, defaultfalse) is added toIExtensionMarkSpec. When enabled:afterRenderevent), the series bindsafterStateUpdatelisteners on primary mark graphics.context.key(shared data key).useStates().API:
📝 Changelog
syncStateoption toextensionMarkto automatically synchronize interactive states (hover, select, etc.) from the corresponding primary mark graphicextensionMark新增syncState配置项,支持自动同步主图元的交互状态(hover、select 等)☑️ Self-Check before Merge
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough