opened 06:10PM - 28 Aug 17 UTC
type: discussion
I'm working on an interactive animation running on the bokeh server. Glyphs move… around the figure and users are instructed to click on these while in transit. I noticed that Tap events only registered back on the server when the mouse was stationary. I figured this was due to some kind of bottleneck sending events back to the python environment from the client. Thus, I modified the CustomJS example found [here](https://bokeh.pydata.org/en/latest/docs/user_guide/interaction/callbacks.html#userguide-interaction-jscallbacks) to see if these Tap events registered on the client side (see below). This does not seem to make a difference—if you slowly move the mouse around the figure and click (or double-click) you will not see tap (or double-tap) events register. The mouse must be stationary to register taps.
This behavior was described as unexpected by @bryevdv on the [google group](https://groups.google.com/a/continuum.io/d/msg/bokeh/CZ_gy1KV3UM/rpaImvEDCgAJ).
Is it possible to glean tap events while moving the mouse?
Minimal example:
```
import numpy as np
from bokeh.io import show, output_file
from bokeh.plotting import figure
from bokeh import events
from bokeh.models import CustomJS, Div
from bokeh.layouts import row
def display_event(div, attributes=[], style = 'float:left;clear:left;font_size=0.5pt'):
"Build a suitable CustomJS to display the current event in the div model."
return CustomJS(args=dict(div=div), code="""
var attrs = %s; var args = [];
for (var i=0; i<attrs.length; i++ ) {
args.push(attrs[i] + '=' + Number(cb_obj[attrs[i]]).toFixed(2));
}
var line = "<span style=%r><b>" + cb_obj.event_name + "</b>(" + args.join(", ") + ")</span>\\n";
var text = div.text.concat(line);
var lines = text.split("\\n")
if ( lines.length > 35 ) { lines.shift(); }
div.text = lines.join("\\n");
""" % (attributes, style))
p = figure(tools="")
div = Div(width=1000)
layout = row(p, div)
## Events with attributes
point_attributes = ['sx','sy'] # Point events
point_events = [events.Tap, events.DoubleTap]
for event in point_events:
p.js_on_event(event,display_event(div, attributes=point_attributes))
output_file("js_events.html", title="JS Events Example")
show(layout)
```
My environment that produces this behavior:
OSX 10.12
python 3.6.1
bokeh 0.12.5, 0.12.6, 0.12.7
chrome 60.0.3112.101, safari 10.0, firefox 55.0.3