SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Answered
1
0

I am using a PinchZoomModifier with my chart and I would like to execute some code when the user stops the zooming action (stops touching the screen). Is it possible to do? Are there any listeners I could attach to the PinchZoomModifier? I couldn’t find any in the docs.

Version
2.2.1.2391
  • You must to post comments
Best Answer
1
0

Hi Miha,

Well there is no callback but you can extend PinchZoomModifier and override its onScaleEnd() method:

class CustomPinchZoomModifier extends PinchZoomModifier {
@Override
public void onScaleEnd(ScaleGestureDetector detector) {
    super.onScaleEnd(detector);

    //TODO
}
}

Is this suitable for your needs?

Best regards,
Yura

  • MIha Rozina
    Yes that works, thank you. Is there anything similar for ZoomPanModifier, to know when the panning has ended?
  • Yura Khariton
    Well you can override onUp() method which is called when touch gesture is ended
  • MIha Rozina
    That would work on everything but the fling I guess?
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.