Skip to content

Commit

Permalink
remove a couple commented out print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Aug 27, 2024
1 parent ed8a8b1 commit 5749b50
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions octarine/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,7 @@ def on_hover(self, v):

def _highlight_on_hover_event(self, event):
"""This is the event callback for highlighting objects on hover."""
# print(event.time_stamp, event.pick_info)
# If any buttons (including mouse) are pressed (e.g. during panning) ignore the event
# If any buttons are pressed (e.g. mouse left during panning) ignore the event
if event.buttons:
return

Expand All @@ -607,23 +606,19 @@ def _highlight_on_hover_event(self, event):
return

new_hover_id = [k for k, v in self.objects.items() if new_hover in v]
# print(f" New Hover: {new_hover_id}")
new_hover_id = new_hover_id[0] if new_hover_id else None

# See if we need to de-highlight the current hover object
if current_hover:
# If the new object is the same as the current one, we don't need to do anything
if current_hover == new_hover_id:
# print(" Hover hasn't changed")
return
if current_hover in self.objects:
# print(" Unhighlighting current hover")
self.unhighlight_objects(current_hover)
self._current_hover_object = None

# Highlight the new object
if new_hover_id:
# print(" Highlighting new hover")
self.highlight_objects(
new_hover_id, color=getattr(self, "_highlight_on_hover_color", 0.2)
)
Expand Down

0 comments on commit 5749b50

Please sign in to comment.