Skip to content

Commit

Permalink
Fixing issue with initial table load. Addresses #684
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsielicki committed Mar 28, 2017
1 parent adf68ab commit 9964ba0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions web-server/plugins/slycat-timeseries-model/js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,14 +685,17 @@ function setup_widgets()
dendrogram_options.dendrogram_sort_order = false;
}

$("#dendrogram-viewer").dendrogram(dendrogram_options);

// Log changes to the node selection ...
// Respond to note selection changes. This needs to be above the instantiation of the dendrogram
// because the table needs to know which node is selected in order for it to initialize. If this
// event handler is registered after the dendrogram is initialized, its first node-selection-changed
// event never makes it to the table and we end up with a blank table.
$("#dendrogram-viewer").bind("node-selection-changed", function(event, parameters)
{
selected_node_changed(parameters);
});

$("#dendrogram-viewer").dendrogram(dendrogram_options);

// Bookmark changes to expanded and collapsed nodes ...
$("#dendrogram-viewer").bind("expanded-collapsed-nodes-changed", function(event, nodes)
{
Expand Down

0 comments on commit 9964ba0

Please sign in to comment.