Skip to content

Allow to configure and report key modifiers in TapTool and pointer events #13132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 23, 2023

Conversation

mattpap
Copy link
Contributor

@mattpap mattpap commented May 16, 2023

This adds two things:

  • Allows to configure TapTool with key modifiers required to trigger the tool. This is specifically useful in inspect mode, less in select mode, which has intrinsic meaning for key modifiers, derived from other select tools.
  • Allows to report key modifiers in TapTool's callback data and allows the same for pointer events Tap, etc.

fixes #12532

@mattpap mattpap added this to the 3.2 milestone May 16, 2023
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Merging #13132 (2bb4d76) into branch-3.2 (6bec5c2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           branch-3.2   #13132   +/-   ##
===========================================
  Coverage       92.41%   92.41%           
===========================================
  Files             315      315           
  Lines           20029    20038    +9     
===========================================
+ Hits            18509    18518    +9     
  Misses           1520     1520           

@mattpap mattpap force-pushed the mattpap/12532_TapTool_modifiers branch from b6b30af to 1cda558 Compare May 21, 2023 12:01
@mattpap mattpap force-pushed the mattpap/12532_TapTool_modifiers branch from 1cda558 to a7a62e9 Compare May 21, 2023 12:25
Copy link
Member

@bryevdv bryevdv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo two small suggestions

@mattpap mattpap force-pushed the mattpap/12532_TapTool_modifiers branch from a7a62e9 to 2bb4d76 Compare May 23, 2023 19:43
@mattpap mattpap merged commit d4e1e91 into branch-3.2 May 23, 2023
@mattpap mattpap deleted the mattpap/12532_TapTool_modifiers branch May 23, 2023 21:28
@nlosacco
Copy link

nlosacco commented Sep 6, 2023

but this still only allows for a single action per each TapTool, right?
I mean, it's not possible to set up different actions for different modifiers with a single TapTool, is it?

Chiemezuo pushed a commit to Chiemezuo/bokeh that referenced this pull request Aug 27, 2024
…events (bokeh#13132)

* Allow to configure key modifiers in TapTool

* Refactor callback emit in TapTool

* Expose key modifiers to the callback in inspect mode

* Expose key modifiers to pointer events

* Add an example of inspect setup of TapTool

* Unify handling of key modifiers across bokehjs

* Add unit tests for setting modifiers and reporting

* Added a release note

* Rename tap_inspect.py -> tap_inspect_keymod.py

* Change a note to a warning
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Access to know whether user ctrl-clicks, shift-clicks, or command-clicks in CustomJS callback
3 participants