Skip to content

fix: update 3dtiles feature color value when selected and style changed - #87

Merged
airslice merged 2 commits into
alphafrom
fix/threed-tile-feature-color-update-incorrectly-when-selected
Aug 8, 2025
Merged

fix: update 3dtiles feature color value when selected and style changed#87
airslice merged 2 commits into
alphafrom
fix/threed-tile-feature-color-update-incorrectly-when-selected

Conversation

@airslice

@airslice airslice commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Overview

Previous code handled the 3dtiles feature color update when isFeatureSelected as:

  • If isFeatureSelected use selectedFeatureColor or raw.color and returned.

This works fine if the update is coming from select only, the color will switch between selectedFeatureColor and raw.color when select/unselect feature.

However there's another case, when override style while the feature is also selected. in this case the new color was ignored. raw.color has no chance to be updated to the expect one.

I fix the update order as:

  • Reset color to default, so that it could override all features to apply latest style
  • Apply color value from style
  • Apply color value from selection

Please ignore the changes around line 95-103 and 762-788, they're coming from auto format.

@airslice
airslice merged commit ff5bbf2 into alpha Aug 8, 2025
2 of 5 checks passed
@airslice
airslice deleted the fix/threed-tile-feature-color-update-incorrectly-when-selected branch August 8, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants