CesiumGS / CesiumGS/cesium

Labels with a callbackproperty of `show` will be in reversed order when the camera zoomed

Open
#13,071 5 comments 0 reactions 0 assignees View on GitHub
type - bug
Dominant language
JavaScript
Stars
15.8k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

### What happened?

Labels' order will be reversed when their visibility property changed.

### Reproduction steps

1. Add several labels with a callback `show` property depending on the camera height.
2. Zoom the camera and focus on the labels' order.
3.
...

### Sandcastle example

https://sandcastle.cesium.com/#c=bVJhb9owEP0rp2gfwmDOWAdVQ0DbYN2QWkAtqzQpEjXJQaw6dmQ7MFrlv89JCC3a/OXsd++dz+/M0kwqA++BahijZnkKGyVTCJ2oOoXOIBShiKTQBnYM96hgCAL3RzZ5qDC34Y+lMJQJVKHTqpQbqcDlaIBZXXdgQzCEno3tdgteQgHHqgSFYYahJjSO3SoBkEltMSn85rYxVcbuqLggZZsT3CpE7X647JFu/3O337/swMUVuep9Khe0gbU6dSlO18h9OBYGMPjH+PBYwe9eWPHYaTI6kftvNHraKpmL2AejcjwlY6bpmuMEM5MsUZsJ04aKCH2Y5enaPmMxv58upw/fV9PZ9XQ2Xf4+SRNk28Tc4QYVVorjm36e42R88/V2sVrOVz/u5r9mk7O+/LfWjynna9voQskMlTm4bguGo9cnAtRjqy+29h+djmiKipLG3NJTuVU0S1hEau7gtYRCkyvR1LCz636s1olSdGBDucbG6KKKRTn9IhROxwm0OXAclegXVn+3XHGXEM9gmnFqB+qt8+gJDYm0LnWB10iCmO2AxcP/fC+IONXaZjY55/fsGUNnFHiWfybjksZMbOc7VJweSkrSHd3UICEk8OzxX5WR0jqr3lT8Cw

### Environment

Browser:
CesiumJS Version: 1.134+
Operating System:

Contributor guide

Open the contributing guide

Research direction

Use the linked Sandcastle example to reproduce the label-order reversal while zooming the camera. Trace how label visibility callbacks using the `show` property are evaluated and how visible labels are ordered; done means repeated camera zooms preserve the labels' original order.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.