Enh: Simplify controlling text of ImageInspectorOverlay#431
Conversation
…ntrol what is displayed.
|
Ready for feedback/review. cc @corranwebster @jwiggins |
jvkersch
left a comment
There was a problem hiding this comment.
LGTM, just one request to change the test file name.
Where exactly does this happen? |
Compare line 78 to line 71 of |
|
@jvkersch Thanks for reviewing my PR. I made the file name change and this is ready for a second look. |
Ah, thanks for pointing that out. That is almost certainly a bug... I agree with changing it to use |
ImageInspectorOverlay._new_value_updatedto add a new methodImageInspectorOverlay._build_text_from_eventto build the text to display, so it is easier to subclass and customize. Feedback on new method name welcome.Unrelated: the unit tests pointed out some tool behavior that doesn't make sense to me: if
hasattr(plot, "_cached_mapped_image")is False, the data value is collected with keycolor_valueinstead ofdata_value. Does that seem wrong to anyone else?