Skip to content

Commit

Permalink
Fixes for Bounds streams on bokeh server (#1883)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 13, 2017
1 parent 644c94d commit c6f8b3e
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions holoviews/plotting/bokeh/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,14 @@ class BoundsCallback(Callback):
"""
Returns the bounds of a box_select tool.
"""
attributes = {'x0': 'cb_data.geometry.x0',
'x1': 'cb_data.geometry.x1',
'y0': 'cb_data.geometry.y0',
'y1': 'cb_data.geometry.y1'}
models = ['box_select']
attributes = {'x0': 'cb_obj.geometry.x0',
'x1': 'cb_obj.geometry.x1',
'y0': 'cb_obj.geometry.y0',
'y1': 'cb_obj.geometry.y1'}
models = ['plot']
extra_models = ['box_select']
on_events = ['selectiongeometry']
skip = ["!box_select || !box_select.active"]

def _process_msg(self, msg):
if all(c in msg for c in ['x0', 'y0', 'x1', 'y1']):
Expand All @@ -724,8 +727,11 @@ class BoundsXCallback(Callback):
Returns the bounds of a xbox_select tool.
"""

attributes = {'x0': 'cb_data.geometry.x0', 'x1': 'cb_data.geometry.x1'}
models = ['xbox_select']
attributes = {'x0': 'cb_obj.geometry.x0', 'x1': 'cb_obj.geometry.x1'}
models = ['plot']
extra_models = ['xbox_select']
on_events = ['selectiongeometry']
skip = ["!xbox_select || !xbox_select.active"]

def _process_msg(self, msg):
if all(c in msg for c in ['x0', 'x1']):
Expand All @@ -739,8 +745,11 @@ class BoundsYCallback(Callback):
Returns the bounds of a ybox_select tool.
"""

attributes = {'y0': 'cb_data.geometry.y0', 'y1': 'cb_data.geometry.y1'}
models = ['ybox_select']
attributes = {'y0': 'cb_obj.geometry.y0', 'y1': 'cb_obj.geometry.y1'}
models = ['plot']
extra_models = ['ybox_select']
on_events = ['selectiongeometry']
skip = ["!ybox_select || !ybox_select.active"]

def _process_msg(self, msg):
if all(c in msg for c in ['y0', 'y1']):
Expand Down

0 comments on commit c6f8b3e

Please sign in to comment.