Pre loader

Making crosshair passive while pinch zooming?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

Answered
0
0

Hi,

I’m using the crosshair on the chart and i want to crosshair disappear as soon as i start pinch zoom. So I created a custom PinchZoomModifier and i am doing cursorModifier.setIsEnabled (false) on the onScaleBegin override. But the crosshair does not disappear, it remains steady on the chart, even if I move the chart, it stays at the same point. How can I make crosshair passive when I pinch zoom?

Tnx.

Version
3.1
  • You must to post comments
Best Answer
0
0

Hi Emre,

Our modifiers weren’t design to support enabling/disabling in the middle of touch gesture. By default we hide modifier when on touch up occurs and if you disable it before this event then it just stops processing further events and freezes in its last state. If you want to remove modifier’s tooltips when you disable it then please try to override on onIsEnabledChanged() and call clearAll() explicitly:

 class CustomCursorModifier extends CursorModifier {
    @Override
    protected void onIsEnabledChanged(boolean isEnabled) {
        super.onIsEnabledChanged(isEnabled);

        if(!isEnabled)
            clearAll();
    }
}

Hope this will help you!

Best regards,
Yura

  • You must to post comments
0
0

Yes, it’s worked, thanks.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies