Skip to content
New issue

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

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

Already on GitHub? # to your account

subscribeCrosshairMove not working properly on mouse drag #1825

Open
vishnuc opened this issue Feb 24, 2025 · 1 comment
Open

subscribeCrosshairMove not working properly on mouse drag #1825

vishnuc opened this issue Feb 24, 2025 · 1 comment

Comments

@vishnuc
Copy link

vishnuc commented Feb 24, 2025

Hi , I dont know if this is bug or not

I have two charts named agrid and bgrid , I subscribe to crosshair mouse move like this

this.chart.subscribeCrosshairMove((param) => {
			currentChartPosition(param, this.grid, 'move');
});

When i just move the mouse around chart A it is logging only chart A param , and when i move out of chart and move the mouse around chart B its logging correctly only chart B params.

But when i click and drag around .. even when mouse is outside the chart A its logging chart A's param , Is this normal behaviour or is it a bug , please see attached video.

Screen.Recording.2025-02-24.at.22.01.06.mov
@illetid
Copy link
Contributor

illetid commented Feb 25, 2025

it is a default browser behavior, however, you can filter out some outside of the chart coordinates by https://tradingview.github.io/lightweight-charts/docs/next/api/interfaces/MouseEventParams#sourceevent coordinates if you want

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants