Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8C409200C88 for ; Fri, 2 Jun 2017 18:00:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8A3C3160BD2; Fri, 2 Jun 2017 16:00:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D07C9160BD1 for ; Fri, 2 Jun 2017 18:00:00 +0200 (CEST) Received: (qmail 87608 invoked by uid 500); 2 Jun 2017 16:00:00 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 87594 invoked by uid 99); 2 Jun 2017 15:59:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jun 2017 15:59:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3873BCD562 for ; Fri, 2 Jun 2017 15:59:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.693 X-Spam-Level: *** X-Spam-Status: No, score=3.693 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, NUMERIC_HTTP_ADDR=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id WFl_yaSDxQ-J for ; Fri, 2 Jun 2017 15:59:58 +0000 (UTC) Received: from mail-yw0-f181.google.com (mail-yw0-f181.google.com [209.85.161.181]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 63E035FB71 for ; Fri, 2 Jun 2017 15:59:57 +0000 (UTC) Received: by mail-yw0-f181.google.com with SMTP id 63so22264374ywr.0 for ; Fri, 02 Jun 2017 08:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=LcCCTeYlkKh71CeV1xBkOZuebkcmiXkTHkhhbu6NFEU=; b=nQxuEkw5xmEe6GcQxTAwT0/LlImOxSUfhn5o/RWd9Xgw0j/D8LtX8rn6F4HYTlnDRL Mk4rRbRQ+1G0yB6Ut5udDJ7XlKv9yJSbnm161aPaBM3QwqZ4pW+fQLmA1M0N+AGTQRfe xH6kkTmyZevPLzmyVqnnrgtzcS3wczbJyu1iK+inKyHD+emHtJNVh2/p1a8DokqrmeGV NMyQq4wtTDCaOgLP+IQY8mDCGq3a7HJ2mF+MTiUYDpNhtnOw0vDNJbl0ch4fE0netOyd Cup2leLASFszjVpTGYtr6PYsEo/F3NnNM4AK17lC5nlmQlM5DBjIuZG58/MapjVctXhD J1aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=LcCCTeYlkKh71CeV1xBkOZuebkcmiXkTHkhhbu6NFEU=; b=e0/EV9Q/I1CEMCk2kqstYo5iFsfZZGP1pS4RmdYATGCCkW1eJ3w6KnZcbaIwXiWB8j h66wRerZJqqe03HXOpKekvUHT4rL0pEQwBBOSo9+zVO1B/CcafZbQ3S36inLhbKj2VBD CPHQtJXcMxC4FgKbGCwRzPrAxxtRwvq/JMdjKuvphdAum1oYFt5xT6rbKtZVWDv0Cbn3 +PbFTanKdDWONmqPpgRdMV1EF2yeFSGRv6U9A0+50dpUDmTtgwGnyWdl+6wu/+xQwqXT s7NQpdx6EpSxJN/uiGLir+dz63huKQP9j31oW4by4usXWPQr1i8miKOgLYvkhzIvwsEX ivqg== X-Gm-Message-State: AODbwcCwHc/QMPRIqNAe8jRfDFshwcws5NVh5tVF2wWHAFa9KCZ3GPf8 OwUAqqaCgeZfRLI1shqjT0k9YNEETWZqAtQ= X-Received: by 10.13.208.3 with SMTP id s3mr6713098ywd.315.1496419189457; Fri, 02 Jun 2017 08:59:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.74.138 with HTTP; Fri, 2 Jun 2017 08:59:49 -0700 (PDT) In-Reply-To: <1496417121650-15280.post@n4.nabble.com> References: <1476838131173-13844.post@n4.nabble.com> <1476838797448-13846.post@n4.nabble.com> <1476840933068-13848.post@n4.nabble.com> <1476843064451-13849.post@n4.nabble.com> <1476845003811-13850.post@n4.nabble.com> <1496417121650-15280.post@n4.nabble.com> From: =?UTF-8?Q?Fr=C3=A9deric_Cox?= Date: Fri, 2 Jun 2017 17:59:49 +0200 Message-ID: Subject: Re: Datagrid Sorting Problem on Mobile To: users@flex.apache.org Content-Type: multipart/alternative; boundary="001a114e6e8a3924960550fc3e11" archived-at: Fri, 02 Jun 2017 16:00:01 -0000 --001a114e6e8a3924960550fc3e11 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ok I managed to find a workaround and got it working. What I did was monkeypatch spark.components.gridClasses/GridColumnHeaderView and then changed the code to public static var dpiScaleFactor:Number =3D 1; public function containsMouseEvent(event:MouseEvent):Boolean { const eventStageX:Number =3D event.stageX; const eventStageY:Number =3D event.stageY; const origin:Point =3D localToGlobal(zeroPoint); origin.x +=3D horizontalScrollPosition; if (layoutDirection =3D=3D LayoutDirection.RTL) origin.x -=3D width; origin.y +=3D verticalScrollPosition; return (eventStageX >=3D origin.x) && (eventStageY >=3D origin.y) &= & (eventStageX < (origin.x + (width*dpiScaleFactor))) && (eventStageY < (origin.y + height)); } and in my application on preinitialize I do GridColumnHeaderView.dpiScaleFactor =3D (runtimeDPI/applicationDPI); This is working fine for me on the device now and fixes the issue, but I'm sure someone with a deeper knowledge of the SDK can take a look for a better fix? On Fri, Jun 2, 2017 at 5:25 PM, Fr=C3=A9deric Cox w= rote: > bilbosax wrote > > So it is happening straight down the middle of the iPad. SURELY, ther= e > > is nothing that I am doing to cause this, is there? > > Thanks for this info, it is very valuable. It got me to the cause of the > problem. The problem is in spark.components.GridColumnHeaderGroup, in > there > is a function mouseEventHeaderView which is called to determine which > column > was touched. In there a function containsMouseEvent is called on the > spark.components.gridClasses/GridColumnHeaderView. In that function we > find > the following code: > > public function containsMouseEvent(event:MouseEvent):Boolean > { > const eventStageX:Number =3D event.stageX; > const eventStageY:Number =3D event.stageY; > const origin:Point =3D localToGlobal(zeroPoint); > > origin.x +=3D horizontalScrollPosition; > if (layoutDirection =3D=3D LayoutDirection.RTL) > origin.x -=3D width; > > origin.y +=3D verticalScrollPosition; > > return (eventStageX >=3D origin.x) && (eventStageY >=3D origin.y)= && > (eventStageX < (origin.x + width)) && (eventStageY < (origin.= y > + > height)); > } > > The problem is that width is half the size as it should be. Now I am tryi= ng > to find the cause why this is an incorrect value and hope I find a fix. A= ny > help appreciated! > > > > > > -- > View this message in context: http://apache-flex-users. > 2333346.n4.nabble.com/Datagrid-Sorting-Problem-on- > Mobile-tp13844p15280.html > Sent from the Apache Flex Users mailing list archive at Nabble.com. > --001a114e6e8a3924960550fc3e11--