Skip to content

Commit

Permalink
Merge pull request #1521 from bhilbert4/interactive-preview-image-bok…
Browse files Browse the repository at this point in the history
…eh3-fix

Interactive preview image - updates for Bokeh 3
  • Loading branch information
mfixstsci committed Mar 18, 2024
2 parents 03a687e + 2e32ea9 commit 32652d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jwql/utils/interactive_preview_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def add_interactive_controls(self, images, color_bars):
# JS callbacks for client side controls

# set alternate image visibility when scale selection changes
scale_group.js_on_click(CustomJS(args={'i1': images[0], 'c1': color_bars[0],
scale_group.js_on_change('active', CustomJS(args={'i1': images[0], 'c1': color_bars[0],
'i2': images[1], 'c2': color_bars[1]},
code="""
if (i1.visible == true) {
Expand Down Expand Up @@ -594,10 +594,10 @@ def add_interactive_controls(self, images, color_bars):
limit_high.js_link('value', color_bars[i].color_mapper, 'high')

# reset boxes to preset range on button click
reset.js_on_click(limit_reset)
reset.js_on_event('button_click', limit_reset)

# also reset when swapping limit style
scale_group.js_on_click(limit_reset)
scale_group.js_on_change('active', limit_reset)

# return widgets
spacer = Spacer(height=20)
Expand Down

0 comments on commit 32652d2

Please sign in to comment.