Disabling scrolling by disabled `horzTouchDrag` and `vertTouchDrag` options disables moving crosshair in tracking mode
See original GitHub issueThe horzTouchDrag
and vertTouchDrag
properties for mobile right now allow for the user to perform touch and drag movements, but as far as I can tell there is no way to allow movements of only the crosshair on mobile. If I disable scrolling, or set the horzTouchDrag
and vertTouchDrag
to false, I lose the ability to freely move around the crosshair.
Is there any way on a mobile device to still allow for free movement of the crosshair while disabling scrolling for the chart itself?
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
How to Stop Crosshair From Moving in Valorant ... - YouTube
In this video we show you how to stop crosshair from moving in Valorant. The crosshair moves because of firing and movement error...
Read more >tradingview/lightweight-charts v3.8.0 on GitHub
... Disabling scrolling by disabled horzTouchDrag and vertTouchDrag options disables moving crosshair in tracking mode (see #434); Reducing precision ...
Read more >Interface: HandleScrollOptions | Lightweight Charts
Represents options for how the chart is scrolled by the mouse and touch ... Enable scrolling by holding down the left mouse button...
Read more >Disable scrolling when touch moving certain element
Set the touch-action CSS property to none , which works even with passive event listeners: touch-action: none;. Applying this property to an ...
Read more >Financial lightweight charts built with HTML5 canvas - JsRepos
... the price axis (see #939); Disabling scrolling by disabled horzTouchDrag and vertTouchDrag options disables moving crosshair in tracking mode (see #434) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think it depends on fixes from #106, so postpone it for now until we’ll fix that issue (I guess it will be right after 3.2).
it would be great if there was an option where developer could decide if handleScroll is disabled then how crosshair should function… for my use case this was exactly what i wanted and so for my need i modified library code to get this functionality. i do not recommend anyone to use code in production. This is just for reference commit
i wanted to understand what problems were faced because of which above decision were made. As the comment stated in src/gui/pane-widget.ts
// actually we should check what event happened (touch or mouse) // not check current UA to detect “mobile” device const trackCrosshairOnlyAfterLongTap = isMobile;
if touch event were handled separately to the mouse click could it be easier to achieve above functionality ?