Skip to content
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

Zoomer: add a user definable predicate for panning #631

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

ichaus-we
Copy link
Contributor

This commit adds a user-definable predicate for panning to the Zoomer plugin.

It allows to replace the default predicate (middle mouse button) to something else, like it was possible with the now removed Panner plugin.

Sample code:
zoomer.setPanMouseFilter(event -> MouseEventsHelper.isOnlyPrimaryButtonDown(event) && MouseEventsHelper.isOnlyCtrlModifierDown(event));

This is demonstrated in a new chart in the ZoomerSample.

@sonarcloud
Copy link

sonarcloud bot commented Oct 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (7164e6b) 48.09% compared to head (27a078b) 48.07%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #631      +/-   ##
============================================
- Coverage     48.09%   48.07%   -0.02%     
+ Complexity     6224     6219       -5     
============================================
  Files           374      374              
  Lines         38304    38309       +5     
  Branches       6117     6117              
============================================
- Hits          18422    18417       -5     
- Misses        18727    18732       +5     
- Partials       1155     1160       +5     
Files Coverage Δ
.../main/java/io/fair_acc/chartfx/plugins/Zoomer.java 25.87% <20.00%> (-0.06%) ⬇️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@wirew0rm wirew0rm left a comment

Choose a reason for hiding this comment

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

Thanks for this nice improvement, looks good!

From my pov the now unused predicate could also have been directly removed instead of deprecated, but we can also do that after the next release.

@wirew0rm wirew0rm merged commit ed86318 into fair-acc:main Oct 10, 2023
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants