Pre loader

How to prevent annotation dragStarted event triggered while panning with ZoomPanModifier?

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

1
0

I have a real time updated chart and users can add annotation to the chart. The position of the annotation will be updated with the chart data. I would like to stop updating the annotation position while user dragging the annotation. So I added a flag (e.g. isDragging) to the annotation dragStarted and dragEnded events. The isDragging flag will be set to true in dragStarted and then set to false in dragEnded. I will check this flag before updating the annotation position.

Here’s the problem, the annotation dragStarted event will be triggered when users do panning in the chart. But the dragEnded will not be triggered in this case. It breaks my plan to stop updating the annotation position as the isDragging will be incorrect. Is it a bug that the annotation dragStarted event (but not the dragEnded event) triggered when panning?

Version
2.2.2415
  • You must to post comments
1
0

Hi Andrew,

I have created a simple example with codepen:

Steps to reproduce:
1. Start the demo with the console opened.
2. Drag the annotation. You will see the logs “drag started – isDragging: true” and “drag ended
– isDragging: false” as expected.
3. Pan the chart. You will see the logs “drag started – isDragging: true”.

  • You must to post comments
0
0

Hello, a bugfix for this issue was published in v3.0.317 of the library.
Please, try it out and let us know if it works as expected on your side.

  • Quyen Sy
    Hi Jim, it works well now. 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