Skip to content

Commit

Permalink
Fix bugs introduced putting old TreeVis code back into play
Browse files Browse the repository at this point in the history
  • Loading branch information
metasemi committed Mar 28, 2023
1 parent 18d7ce5 commit 7a64576
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions model.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,8 @@ def root(self):

# return the node in tree_node_dict with id
def node(self, node_id):
# if type(node_id).__name__ != 'str':
# breakpoint()
return self.tree_node_dict.get(node_id, None)

# Get a nodes chapter by finding its chapter or its nearest parent's chapter
Expand Down
6 changes: 3 additions & 3 deletions view/tree_vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,9 @@ def draw_bookmark_star(self, node, box):
# Expand/Collapse
#################################

def select_node(self, node_id):
self.selected_node = node_id
self.controller.nav_select(node_id=node_id)
def select_node(self, node):
self.selected_node = node
self.controller.nav_select(node_id=node['id'])


def expand_node(self, node, change_selection=True, center_selection=True):
Expand Down

0 comments on commit 7a64576

Please sign in to comment.