Hi,
We try to use both HoverTool and TapTool on the same plot as you did in this Jupyter notebook : http://nbviewer.jupyter.org/github/birdsarah/pycon_2015_bokeh_talk/blob/master/notebooks/Building%20the%20static%20visualization.ipynb
But, we don’t want the “selective” effect of the TapTool, we just want it to trigger a callback, so its behavior attribute is set to ‘inspect’.
The HoverTool works fine, but when we click on a glyph, the tooltip disappears and the callback is not triggered. Furthermore, an error message displays in the browser console :
TypeError: m is undefined
Bokeh</<[“models/tools/inspectors/hover_tool”]</s</e.prototype._update()
bokeh-0.12.0.min.js:17
Bokeh</<.backbone</</</y()
bokeh-0.12.0.min.js:23
Bokeh</<.backbone</</</g()
bokeh-0.12.0.min.js:23
Bokeh</<.backbone</</</p()
bokeh-0.12.0.min.js:23
Bokeh</<.backbone</</</c.trigger()
bokeh-0.12.0.min.js:23
Bokeh</<[“common/selection_manager”]</o</e.prototype.inspect()
bokeh-0.12.0.min.js:3
bound ()
self-hosted:760
Bokeh</<[“models/tools/gestures/tap_tool”]</i</e.prototype._select()
bokeh-0.12.0.min.js:17
Bokeh</<[“models/tools/gestures/tap_tool”]</i</e.prototype._tap()
bokeh-0.12.0.min.js:17
Bokeh</<.backbone</</</y()
bokeh-0.12.0.min.js:23
Bokeh</<.backbone</</</g()
bokeh-0.12.0.min.js:23
Bokeh</<.backbone</</</p()
bokeh-0.12.0.min.js:23
Bokeh</<.backbone</</</c.trigger()
bokeh-0.12.0.min.js:23
Bokeh</<[“common/ui_events”]</s</e.prototype._trigger_event()
bokeh-0.12.0.min.js:3
Bokeh</<[“common/ui_events”]</s</e.prototype._trigger()
bokeh-0.12.0.min.js:3
Bokeh</<[“common/ui_events”]</s</e.prototype._tap()
bokeh-0.12.0.min.js:3
Bokeh</<[“common/ui_events”]</s</e.prototype._hammer_element/</<()
bokeh-0.12.0.min.js:3
Bokeh</<[“hammerjs/hammer”]</</ct.prototype.emit()
bokeh-0.12.0.min.js:35
Bokeh</<[“hammerjs/hammer”]</</<.emit()
bokeh-0.12.0.min.js:35
Bokeh</<[“hammerjs/hammer”]</</K.prototype.tryEmit()
bokeh-0.12.0.min.js:35
Bokeh</<[“hammerjs/hammer”]</</<.process/this._timer<()
bokeh-0.12.0.min.js:35
h/<()
``
I have written a simple code to reproduce the problem :
# coding=utf-8
from bokeh.io import output_file, show
from bokeh.models import ColumnDataSource, TapTool, HoverTool, CustomJS
from bokeh.plotting import Figure
output_file("layout.html")
source = ColumnDataSource(
data=dict(x=[2,3,5], y=[8,5,2]),
name='source'
)
p = Figure(plot_width=550, plot_height=550, sizing_mode="fixed")
p.circle(x='x', y='y', source=source, size=50)
p.add_tools(TapTool(behavior='inspect', callback=CustomJS(code="alert('foo');")))
p.add_tools(HoverTool())
show(p)
``
If one removes the ‘inspect’ attribute from the TapTool, all works perfectly. Is there any reason for this conflict ?
Thanks,
Guilhem

