flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Weber Jan <Jan.We...@dallmeier.com>
Subject AW: Spark DataGrid scaling - setting scaleX and scaleY results in misbehavior
Date Thu, 03 Mar 2016 08:42:30 GMT
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


Jan.Weber@dallmeier.com<mailto:Jan.Weber@dallmeier.com>


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:y-tanaka@mcs-kk.co.jp]
Gesendet: Donnerstag, 3. März 2016 09:14
An: users@flex.apache.org
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" <Jan.Weber@dallmeier.com> 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:y-tanaka@mcs-kk.co.jp
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" <Jan.Weber@dallmeier.com> 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:y-tanaka@mcs-kk.co.jp
URL: http://www.mcs-kk.co.jp
------------------------------------------

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message