Confirm and cancel icons can be invisible if drawn selection extends beyond viewport border
If a selection is drawn all the way to the bottom of the viewport, then the icons for confirmation and cancellation are drawn below the boundary of the viewport.
Once solution is to draw them inside the rectangle, rather than outside it. This allows us to be sure we can see them at all times, at the cost of perhaps being less than pretty.
Another option is to place them elsewhere only when this occurs. This would require the painting logic of the Selectangle class to have knowledge of its container, which is also less than desirable.
Currently I'm inclined to go with the first option, as it's easier to implement.
#3 Updated by Sandeep Namilikonda about 10 years ago
Ryan, I was able to make the cancel/confirm buttons appear within the rectangle.
e.g., iconBase.y -= CONFIRM_ICON_SIZE;
I also made appropriate changes to getLocationInRectangle() so that correct
clickLocation.RECTANGLE is returned when the buttons are clicked.
But, the rectangles that are used to track click location coincide with the
rectangle selection area, thereby effectively preventing the user from confirming or canceling the selected area.
Any quick ideas?
#4 Updated by Ryan McFall about 10 years ago
I'm not quite sure what you mean by:
"But, the rectangles that are used to track click location coincide with the
rectangle selection area, thereby effectively preventing the user from confirming or canceling the selected area."
Does this mean that the code thinks that clicking inside the rectangle is initiation of the move operation? It's been a while since I looked at this code.
Perhaps having the rectangle drawn above or to the left of the selection in the case where it's at the bottom of the viewport would be sufficent. There'd have to be some changes to determining where the icons are, but I'd think those wouldn't be too bad.