GithubHelp home page GithubHelp logo

tom91136 / gesturefx Goto Github PK

View Code? Open in Web Editor NEW
60.0 6.0 5.0 880 KB

A lightweight pinch-to-zoom pane for JavaFX

License: Apache License 2.0

Java 99.93% CSS 0.07%
javafx java java8 image-viewer javafx-library pinch-to-zoom imageview

gesturefx's People

Contributors

dependabot[bot] avatar tom91136 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gesturefx's Issues

Migrate from jcenter

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

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.

Scrolling and Zooming

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.