I am introducing myself to callbacks, and I have a simple example here that is giving a weird behavior to what I expected.
After launching the server, I select a point or many points, and the circles corrected update their radius. However, nothing happens to the line_width or color. However, if I select other points, those two changes take effect.
Why is that? I expected the three changes to happen at the same time.
@LorenzoPeve I think it would be more helpful if you actually describe what you want to have happen. When there are selections involved, there is more than just .glyph, there are additional .selection_glyph and .nonselection_glyph that control the appearance of selected and non-selected points respectively. Depending on what you actually want to accomplish, you would need to update those as well.
But more likely, you wouldn’t need to update anything in a callback. If all you want to do is control the appearance of selected vs non-selected points, that is typically a configuration, not requiring any callback code. See:
It’s not an unreasonable impulse, setting properties this way update date or plot elements, is just exactly what most callbacks do. This just happens to be one of a few areas where things are a bit more complicated (and why there are convenience APIs to help as described in the link).