hitTest sometimes returning wrong result

Posted by: edekoven on 6 February 2020, 7:39 am EST

    • Post Options:
    • Link

    Posted 6 February 2020, 7:39 am EST

    I have multiple grids on my screen at the same time, and I want to keep them in sync. When I hover over row R of grid1 I also want row R of grid2 to show as hovered. So I use a mouseover event to trigger a method that uses hitTest to determine which row number is hovered, and then I apply a class to that row of both grids. For the most part this works well. However sometimes if I move my mouse up from row R to the one above (R-1) very slowly and stop right on the edge of that next cell, sometimes hitTest returns R instead of R-1. What is causing that?

  • Posted 7 February 2020, 2:47 am EST

    Hi Elyon,

    Since there is no code snippet provided, we made a sample demonstrating your requirements. Please try this sample at your end and let us know whether it is working as expected.

    https://stackblitz.com/edit/js-xjms8g

    In this sample, there is connectGrids class that can directly be used to connect two grids while hovering.

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels