New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix decluttering opacity, zIndex and circles #15614
Fix decluttering opacity, zIndex and circles #15614
Conversation
📦 Preview the website for this branch here: https://deploy-preview-15614--ol-site.netlify.app/. |
67cff23
to
4ca4308
Compare
for (const key in deferredZIndexContexts) { | ||
deferredZIndexContexts[key].forEach((zIndexContext) => { | ||
const zs = Object.keys(deferredZIndexContexts).sort(ascending); | ||
for (let i = 0, ii = zs.length; i < ii; ++i) { | ||
deferredZIndexContexts[zs[i]].forEach((zIndexContext) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorting makes sure that styles with negative zIndex will be rendered before styles with positive zIndex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we care that a z-index of -1
will be sorted before -10
(and 10
before 2
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, thanks for spotting this. I just committed a fix. Postitive numbers were already sorted properly though, because the ascending()
sort function takes care of that.
4ca4308
to
821001b
Compare
Working on a fix for #15611 (point symbols disappearing on vector layers with opacity != 1) I created a new rendering test, which revealed two more issues:
Circle
geometries are not rendered when declutteringzIndex
are rendered after styles with positivezIndex
.All these are fixed now.
Fixes #15611.