Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface rotation doesn't stops if mouseup event is out of chart #169

Open
khalitovsv opened this issue Feb 21, 2021 · 1 comment
Open

Surface rotation doesn't stops if mouseup event is out of chart #169

khalitovsv opened this issue Feb 21, 2021 · 1 comment
Assignees

Comments

@khalitovsv
Copy link

khalitovsv commented Feb 21, 2021

If start rotate surface chart, and mouse up outside of chart, it will continue listening mousemove events and rotating chart.

I think you need to handle mousedown event on chart object, and handle mouseup event on document.

src\surface\Chart.js

anychart.surfaceModule.Chart.prototype.handleMouseEvent = function(event) {
  if (event['type'] == acgraph.events.EventType.MOUSEUP) {
    this.mouseRotation_ = false;
  }
};
@Shestac92
Copy link

@khalitovsv
Thank you for the suggestion! It's a good point. We will take it into account for future updates.

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

No branches or pull requests

3 participants