tom91136 / gesturefx Goto Github PK
View Code? Open in Web Editor NEWA lightweight pinch-to-zoom pane for JavaFX
License: Apache License 2.0
A lightweight pinch-to-zoom pane for JavaFX
License: Apache License 2.0
Should behave like ScrollPane
where the corner is covered up
Does not fire for the following
Hi @tom91136!
First of all, thanks for this awesome library, it's really useful!
GestureFX is distributed on jcenter
. The problem is that JFrog announced that they will be shutting down Bintray and JCenter, so you should migrate to a different alternative.
Now I use JitPack for downloading your library:
repositories {
...
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.tom91136.GestureFX:gesturefx:gesturefx-parent-0.6.0'
}
Best regards
Zooming out by scrolling moves too slowly while zooming in moves at expected amount. I think the issue here is at this code from line 288:
case ZOOM:
double zoomFactor = DEFAULT_SCROLL_FACTOR * pane.scrollZoomFactor.get();
if (e.getDeltaY() < 0) zoomFactor *= -1;
pane.scale(1 + zoomFactor, fromGesture(e));
break;
Why is it adding +1 to the zoomFactor?
Also how can I change my code to get this desired result? I think I will have to override the scrolling event but I don't want rewrite that whole section.
The default behavior of the GesturePane seems to exclusively register zoom gestures. Is there a way to add rotation and translation support to fully resemble the behavior of mobile UIs? On Android and iOS the pinch to zoom is often also used to trigger a full transformation (translate, zoom, rotate).
System.out.println(pane.getCurrentScale()); shows the current scale factor of the image while zooming,
how can I get the actual width as it is zoomed?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.