flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From y-tanaka <y-tan...@mcs-kk.co.jp>
Subject Re: Spark DataGrid scaling - setting scaleX and scaleY results in misbehavior
Date Thu, 03 Mar 2016 08:14:01 GMT
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
View raw message