Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Apache Flex 4.14.1
-
None
Description
Setting scaleX and/or scaleY on a spark DataGrid does not handle mouse over events correctly.
This is issue is related to the functions "containsMouseEvent" located in class GridView.as and GridColumnHeaderView.as.
These functions do state:
/**
- True if this GridColumnHeaderView's bounds contain the event.
* - Currently this method does not account for the possibility that this GridColumnHeaderView has been
- rotated or scaled.
*/
/**
- True if this GridView's bounds contain the event.
* - Currently this method does not account for the possibility that this GridView has been
- rotated or scaled.
*/
A possible fix (as suggested by user "y-tanaka") would be the following modification to these functions:
public function containsMouseEvent(event:MouseEvent):Boolean
{ const eventStageX:Number = event.stageX; const eventStageY:Number = event.stageY; const origin:Point = localToGlobal(zeroPoint); // origin.x += horizontalScrollPosition; // if (layoutDirection == LayoutDirection.RTL) // origin.x -= width; // // origin.y += verticalScrollPosition; // // return (eventStageX >= origin.x) && (eventStageY >= origin.y) && // (eventStageX < (origin.x + width)) && (eventStageY < (origin.y + height)); return hitTestPoint(eventStageX, eventStageY, true); }