Mit freundlichen Grüßen / Best Regards
i.A. Jan Weber
Software Development
Contact:
Location:
Head & Accounts Office:
tel
+49 941 8700 326
Bahnhofstr. 16
Cranachweg 1
fax
93047 Regensburg
93051 Regensburg
mail
[email protected]<mailto:[email protected]>
Germany
Germany
[banner]
<http://www.dallmeier.com/index.php?id=1054>
Subscribe to our Newsletter<http://www.dallmeier.com/index.php?id=322&L=1>
www.dallmeier.com<http://www.dallmeier.com/en/home.html>
Social Media<http://www.dallmeier.com/index.php?id=292&L=1>
Dallmeier electronic GmbH & Co.KG
CEO:
Registry Court:
VAT ID:
Unlimited Partner:
Registry Court:
Dieter Dallmeier
Amtsgericht Regensburg HRA 6827
DE813790649
Dallmeier GmbH
Amtsgericht Regensburg HRB 9085
On 3/2/16, 2:44 AM, "Weber Jan" <[email protected]> wrote:
>>Hi,
>>
>>I'm setting scaleX and scaleY on a spark DataGrid. This results in the
>>behavior, that -depending on the scale factor- the rollover (and click)
>>of rows does not get triggered anymore.
>>
>>Does anyone know what I can do so the data grid can handle scaleX and
>>scaleY factors greater than 1 properly?
>
>Hmm. Have you tried scaling the parent container of the DataGrid instead of
>the DataGrid itself? Not sure that would work though.
>
>It looks like you might be able to swap out the GridDimensionsView for a
>subclass that you could write that might handle scaling correctly. Again, not
>sure that would work.
>
>And, of course, you could code up a patch for GridDimensionsView that we could
>put in the nightly builds and a future release.
>
>HTH,
>-Alex
Hi Alex,
the scaling does actually take place on the root group of the application where
the DataGrid can be child of, so suggestion one wont work.
I have further digged into the issue and found in class GridView.as and
GridColumnHeaderView.as a function named "containsMouseEvent"
The functions are commented with:
/**
* 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.
*/
When the DataGrid is scaled, both these function return false, so I could
imagine that a fix would need to be implemented here.
One option would be to consider there the transform.concatenatedMatrix scaleX
and scaleY, so that no matter where the DataGrid is a child of, the correct
scaling could be applied to the check.
Unfortunately, I do not have the resources to deal with building the flex SDK
to implement a possible fix.
I'm currently using a workaround by subclassing Grid.as and
GridColumnHeaderGroup.as, overriding the mouse event handlers and having copied
a bunch of related private functions from both super classes to the custom
classes.
The functions "mouseEventGridView" (Grid.as) and "mouseEventHeaderView"
(GridColumnHeaderView.as) do then simply not check if containsMouseEvent
returns true but simply return either "centerGridColumnHeaderView" or
"centerGridView".
This truly is kind of hackish but for the scenario the DataGrid is used in the
application I work on, it serves the purpose for now.