Unexpected selection/display behavior when there are multiple rows/cols per pixel

Issue #258 closed
Robert Leach created an issue

When there are 4 rows per pixel:

  1. and the user clicks a label, a label 3 spots below the one they clicked on is the one that gets selected (even though the red hover highlight is correctly under the cursor).

  2. the bottom 3 row labels are never displayed even if the cursor is hovering over the bottom row of pixels.

Lance, Anastasia, and I discussed this issue separately and decided on how to handle the minutiae of this issue, but I have thought about it some more and modified the strategy, describe here:

  1. The label selected to be under the cursor will be selected by cursor position relative to the matrix. E.g. if there are 4 data rows per pixel and the cursor is hovered over the top pixel row, the first label will be drawn under the cursor. If the cursor is hovered over the last pixel row, the 4th label will be positioned under the cursor.

  2. only the arbitrarily selected label in item 1 will be highlighted red on hover.

  3. Clicking/selecting in the matrix will arbitrarily select the relative position that corresponds to the description in item 1 above.

  4. Clicking/selecting in a label pane will arbitrarily select the relative position that corresponds to the description in item 1 above.

This resolves unexpected selections and undisplayed labels. It does not resolve 100% label access at every zoom level.

Note, a side-effect of this will be that there will exist labels that the user cannot hover over or individually select because if the user moves the cursor 1 pixel up or down, the labels will jump by 4, so there will be 3 labels that sneak past the cursor. A user might find this confusing, but I think it will be less confusing that other strategies discussed: coloring all 4 labels red on hover or selecting all 4 rows on click. We might consider denoting the unreachable labels in some way or somehow giving the user a visual cue that they need to zoom in to be able to click those labels... It's not a perfect solution, but there's got to be some limitation imposed when there are multiple rows of data represented by a single row of pixels.

Comments (5)

  1. Robert Leach reporter

    There turned out to be a separate issue. There were 2 methods used to obtain the pixel index. One utilized a mouse event object passed in as an event to things like mouseMoved or mouseDragged, etc.. And then there were instances where the cursor position was retrieved using an external method and its relative pane position was the result of a conversion. The Y coordinate that was being returned was 1 less than it should have been. I added a fudge factor and that fixed the first part of the problem (selecting a row below where there was a click).

    The second part of the problem has yet to be addressed (not being able to display the last headers).

  2. Log in to comment