Skip to content

Commit

Permalink
[FIX] Figures of components with index 0 get rendered now (#793)
Browse files Browse the repository at this point in the history
* Add console log and accept components with index 0 for updating figures on reports

* Remove breakpoint

* Force Bokeh version to be lower than 3.0

* Fix typo

* Changed auto-save settings to line length of 99
  • Loading branch information
eurunuela authored Sep 14, 2021
1 parent a6b961d commit 423491f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tedana/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
)

REQUIRES = [
"bokeh",
"bokeh<2.3.0",
"mapca~=0.0.1",
"matplotlib",
"nibabel>=2.5.1",
Expand Down
9 changes: 7 additions & 2 deletions tedana/reporting/dynamic_figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
// Accessing the selected component ID
var data = source_comp_table.data;
var selected_idx = source_comp_table.selected.indices;
if(selected_idx > 0) {
console.log('Selected idx is ' + selected_idx)
if(selected_idx >= 0) {
// A component has been selected
// -----------------------------
var components = data['component']
Expand Down Expand Up @@ -295,7 +296,11 @@ def _tap_callback(comptable_cds, div_content, io_generator):
Javascript function that adds the tapping functionality
"""
return models.CustomJS(
args=dict(source_comp_table=comptable_cds, div=div_content, outdir=io_generator.out_dir),
args=dict(
source_comp_table=comptable_cds,
div=div_content,
outdir=io_generator.out_dir,
),
code=tap_callback_jscode,
)

Expand Down

0 comments on commit 423491f

Please sign in to comment.