Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-35047

DataGrid MouseOver issue when scaled

    XMLWordPrintableJSON

Details

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            JanFW Jan F. Weber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: