- Note that the crosshairs do not disappear at mouse-up although this behavior is implemented in the corresponding event.
Fixed in r32024
- Now right-drag the mouse in the right chart --> no cross-hairs
- Left-drag in the right chart to zoom, and immediately afterwards left-click to unzoom
- Right-drag in the right chart --> now the cross-hair appears
The problem is that the tool only stores a single local state (in this case, Position),
but it should generally store a separate state for each chart it is used on.
I actually plan to implement this, but do not have time right now.
Added workaround in r32025 which fixes the issues you mentioned.
(But does not fix some other problems -- for example, if you minimize the application
while holding right mouse button, then restore it, crosshair will be drawn on both charts).
Hopefully the workaround will suffice until the full solution arrives.
It should be mentioned also that the crosshairs seem to work only with TLineSeries, not with TFuncSeries that I used in this demo initially.
This is because finding nearest point of the function graph requires full recalculation of the function,
which I avoided on performance grounds.
In r32026 I have added a compromise solution -- it just takes the point with the same X as the cursor,
and declares it the nearest one.
What do you think -- is it enough?