Jan F. Weber created FLEX-35047:
-----------------------------------

             Summary: DataGrid MouseOver issue when scaled
                 Key: FLEX-35047
                 URL: https://issues.apache.org/jira/browse/FLEX-35047
             Project: Apache Flex
          Issue Type: Bug
          Components: Advanced Data Grid, Spark: DataGrid
    Affects Versions: Apache Flex 4.14.1
            Reporter: Jan F. Weber


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);
     }





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to