Hi y-tanaka, thanks for your feedback!
hitTesting in "containsMouseEvent" would also be a viable solution for this. Along with an implementation in GridView.as your solution should also be implemented for the class GridColumnHeaderView.as, so that the header of a DataGrid would also correctly behave when being scaled. -Jan 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 -----Ursprüngliche Nachricht----- Von: y-tanaka [mailto:[email protected]] Gesendet: Donnerstag, 3. März 2016 09:14 An: [email protected] Betreff: Re: Spark DataGrid scaling - setting scaleX and scaleY results in misbehavior Hi. I found similar behavior two yeas ago. That time I patched GridView.as in my ApacheFlex4.11SDK as follows. ------------------------------------------------------------------ /** * 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. */ 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 this.hitTestPoint(eventStageX, eventStageY, true); } If it's available, please code up. On 2016/03/03 1:20, Alex Harui wrote: > > > 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 > -- ------------------------------------------ Maruman Computer Service Yoshio Tanaka E-Mail:[email protected] URL: http://www.mcs-kk.co.jp ------------------------------------------ On 2016/03/03 1:20, Alex Harui wrote: > > > 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 > -- ------------------------------------------ マルマンコンピュータサービス株式会社 企画・営業本部 システム開発部 システム開発 田中 良夫 Tel:0172-33-5166 Fax:0172-36-3362 E-Mail:[email protected] URL: http://www.mcs-kk.co.jp ------------------------------------------
