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
nonselection_glyph seems to be drawn after selection_glyph #2116
Comments
@birdsarah is it possible you are drawing the patches twice somehow? I don't understand this because the main render method splits all the indices into two groups, the selected and non-selected, and calls individual glyph render functions separately for each (disjoint) set of indices here: It's certainly possible there is a real problem in BokehJS I would just be surprised not to see if affect every glyph in the same way. |
Hi @bryevdv I'm not understanding your question, but you have hit on the problem My understanding of the code you linked to:
is that:
Having tried changing that order locally. That is indeed the source of my error: With the order of do_render switched: In case it's useful, here's the relevant piece of code: borders = Patches(
xs='xs', ys='ys',
fill_color='color_for_active_year', fill_alpha=1,
line_color="#FFFFFF", line_width=1,
)
selected_borders = Patches(
xs='xs', ys='ys',
fill_color='color_for_active_year', fill_alpha=1,
line_color=ORANGE, line_width=5,
)
plot.add_glyph(source, borders, selection_glyph=selected_borders, nonselection_glyph=borders) |
Oh, I see. I misunderstood to mean that an entire non selected glyph was obscuring a selected one, not just the borders. That is a simple fix, but it should go in after our big BokehJS build PR which will hopefully be merged tomorrow. |
This was changed. |
Can you link where was changed? Thanks. |
fixed in #2143 |
Using patches to draw a map and want to do selection as it works on the map here: http://africawatermap.aptivate.org/
This doesn't seem to be possible as the non-selected glyphs are being drawn over the selected glyph. Couple of screenshots to highlight this.
selected and non-selected elements are full alpha, but selected has thick line
non-selected element keeps line alpha but has full alpha set to 0
non-selected element has line_alpha of 0 and fill_alpha of 0.2
non-selected element has line_alpha of 0 and fill_alpha of 1
The text was updated successfully, but these errors were encountered: