flutter_advanced_networkimage icon indicating copy to clipboard operation
flutter_advanced_networkimage copied to clipboard

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

Open kbups opened this issue 5 years ago • 1 comments

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,

kbups avatar May 11 '20 14:05 kbups

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.

mchome avatar May 11 '20 15:05 mchome