Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

ZoomableWidget: Set the origin point between the two fingers instead to the screen's center #155

Open
kbups opened this issue May 11, 2020 · 1 comment

Comments

@kbups
Copy link

kbups commented May 11, 2020

Hello,

Very good job! I use it with an SVG rendering and it works as expected. Do you know how to set the origin point, when zooming, between the 2 fingers instead of fixing it to the screen's center as it is mentioned below?

// Scale the widget size. (Origin point was fixed to screen's center)
ZoomableWidget(
  panLimit: 1.0,
  maxScale: 2.0,
  minScale: 0.5,
  singleFingerPan: true,
  multiFingersPan: false,
  enableRotate: true,
  child: Image(
    image: AssetImage('graphics/background.png'),
  ),
  zoomSteps: 3,
),

Thanks in advance for your reply.

Regards,

@mchome
Copy link
Owner

mchome commented May 11, 2020

Yeah that's what I want to do, but I don't have time on flutter now.
Here is the reference with code: https://gallery.flutter.dev/#/demo/2d-transformations, you can try to port it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants