Skip to content
Prev Previous commit
Apply suggestions from code review
Co-authored-by: Caitlin Lewis <69729525+clewis7@users.noreply.github.com>
  • Loading branch information
kushalkolar and clewis7 authored May 22, 2025
commit 0da5e386d74d9871acfd66c3fbb528529a52356b
2 changes: 1 addition & 1 deletion examples/line_collection/line_stack.py
Comment thread
kushalkolar marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


def tooltip_info(ev):
"""a custom function to display the index of the graphic within the collection"""
"""A custom function to display the index of the graphic within the collection."""
index = ev.pick_info["vertex_index"] # index of the line datapoint being hovered

# get index of the hovered line within the line stack
Expand Down
3 changes: 1 addition & 2 deletions fastplotlib/tools/_tooltip.py
Comment thread
kushalkolar marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def outline_color(self):

@outline_color.setter
def outline_color(self, color: str | tuple | list | np.ndarray):
"""Get or set outline color using a str or RGB(A) array"""
self._line.material.color = color

@property
Expand Down Expand Up @@ -190,7 +189,7 @@ def _set_position(self, pos: tuple[float, float]):
self._line.geometry.positions.update_range()

def _event_handler(self, custom_tooltip: callable, ev: pygfx.PointerEvent):
"""handles the tooltip appear event, determines the text to be set in the tooltip"""
"""Handles the tooltip appear event, determines the text to be set in the tooltip"""
if custom_tooltip is not None:
info = custom_tooltip(ev)

Expand Down