Menu

#41 RubberBandSelection works not well... second

open
nobody
None
5
2005-09-02
2005-09-02
Juerg B
No

The RubberBandSelection also works not well at the
corners...
Example:
Chart form (X;Y) 0;0 to 100;100
RubberBandSelection from 20;20 to 0;0 don't work
RubberBandSelection from 20;20 to 1;0 work
RubberBandSelection from 20;20 to 0;1 work
RubberBandSelection from 20;80 to 0;100 work
RubberBandSelection from 80;80 to 100;100 don't work
RubberBandSelection from 80;80 to 100;99 work
RubberBandSelection from 80;80 to 99;100 work
RubberBandSelection from 80;20 to 100;0 work

please correct, thanks
Juerg

Discussion

  • Nobody/Anonymous

    Logged In: NO

    In general selection towards the most upper right corner
    or towards the most lower left corner does not work.

     
  • Nobody/Anonymous

    Logged In: NO

    The problem resides in DoMouseUp() of the applicable
    interaction:

    if ((minPoint != maxPoint) && (r.Contains(minPoint) ||
    r.Contains(maxPoint)))
    ...

    In case of selecting towards the upper right or the lower
    left corners, the calculated min and maxPoint end up both
    outside the plot rectangle. This is not the case for the
    lower right and upper left corners, because in that case
    the min and maxPoint are the same points as the selected
    point. (First point is then on the surface, so action is
    performed)

    The easiest way to solve this is to change this check into:

    if (minPoint != maxPoint)
    ...

    I have found no side effects.

    regards,
    Rene van Kleef

     

Log in to post a comment.

MongoDB Logo MongoDB