You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sensitivity of the wheel zoom cannot be configured on the Python side. However, there is a speed property which can be set on the JS side. It would be better to expose this property to the Python side too.
Why that line exists? @Havoc added that to get things working at all. Currently the client models add all kind of new attributes with abandon and most of them should not get serialized back to the server. But a few like this one should be, but were just overlooked. We should have been more careful in the first place and made client only "viewmodel" objects to store any new, extra, "not intended to be serialized" data, and and kept the main models pure and 1-1 in sync with Python (no extra attrs added). We still should do this some day.
Python would raise an exception at one point if it saw an unknown property... now it just warns. So I was having to mark tons of props as nonserializable. It sounds like the better fix here was to simply add the prop to Python.
We can certainly expose the speed, but unless we can also find a way to make a given speed somewhat uniform across browsers I am dubious of the utility. But changing to feature in any case.
Activity
birdsarah commentedon Nov 15, 2015
@liuyxpp we are actually in the middle of a big clean-up to ensure that the properties on the python and JS side match each other.
@havocp WheelZoomTool has a default for
speedon the JS side (https://github.com/bokeh/bokeh/blob/master/bokehjs/src/coffee/tool/gestures/wheel_zoom_tool.coffee#L119) but not a python property.However running the test in #3099 doesn't pick up this discrepancy. Thoughts?
birdsarah commentedon Nov 15, 2015
Maybe the test only picks up differences in defaults not when there's missing properties?
bryevdv commentedon Nov 15, 2015
@birdsarah maybe https://github.com/bokeh/bokeh/blob/master/bokehjs/src/coffee/tool/gestures/wheel_zoom_tool.coffee#L113
birdsarah commentedon Nov 15, 2015
great spot @bryevdv, do you know why that would be?
bryevdv commentedon Nov 15, 2015
Why that line exists? @Havoc added that to get things working at all. Currently the client models add all kind of new attributes with abandon and most of them should not get serialized back to the server. But a few like this one should be, but were just overlooked. We should have been more careful in the first place and made client only "viewmodel" objects to store any new, extra, "not intended to be serialized" data, and and kept the main models pure and 1-1 in sync with Python (no extra attrs added). We still should do this some day.
havocp commentedon Nov 15, 2015
Python would raise an exception at one point if it saw an unknown property... now it just warns. So I was having to mark tons of props as nonserializable. It sounds like the better fix here was to simply add the prop to Python.
birdsarah commentedon Nov 17, 2015
thanks for the background @havocp and @bryevdv still learning how the all the pieces of the properties mechanism works.
bryevdv commentedon Apr 2, 2016
We can certainly expose the speed, but unless we can also find a way to make a given speed somewhat uniform across browsers I am dubious of the utility. But changing to
featurein any case.damianavila commentedon Jul 19, 2016
Reopening because the PR was reverted by #4831
fix #3125
add option to disable wheel zoom on axes (#7743)
github-actions commentedon Oct 28, 2024
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.