-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to capture GestureDetector for onScaleUpdate and onScaleEnd #1183
Comments
Hi, did you find a solution? I have the same problem. |
I found if you enable gestures in FL_CHART then it traps all gesture messages and does not process or pass through all gestures :-( |
I found the same solution. |
I like your idea - much neater. |
Can you please tell me what you want to do? |
That’s correct. Or at least pass through that gesture as at preeent it’s
not passed through
…On Mon, 16 Jan 2023 at 00:55, Iman Khoshabi ***@***.***> wrote:
Can you please tell me what you want to do?
Are you looking for a zoom feature?
—
Reply to this email directly, view it on GitHub
<#1183 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEURLD77QQ3U7CCSRCT64VLWSP6UVANCNFSM6AAAAAARWB2TSI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Okay so let's only talk about the gesture here. |
Sorry @imaNNeo what do you mean by the statement “mentioned issue” ? |
I meant #71 |
Hello, I created a fork with a proposed solution (see commit here). Basically it replaces pan gestures with scale gestures. Scale gestures are a superset of pan gestures (source), so I think that's a safe swap as developers will just be able to check the number of pointers being used to determine if they want to pan or scale. In my code, which now has pinch to zoom and horizontal panning, my case FlScaleUpdateEvent:
{
event = event as FlScaleUpdateEvent;
if (event.details.pointerCount == 1) {
chartController.onHorizontalDrag(
context,
deltaX: event.details.focalPointDelta.dx,
);
} else {
chartController.onScale(scaleDetails: event.details);
}
} My fork is just a hacked together version that works for my app's needs, but more than happy to work with you @imaNNeo to make it something that could be merged in |
I tested the solution of @TNorbury , It work only on PanGestureRecognizer disabled. |
Hi
I'm trying to capture a pinch to zoom action by using GestureDector as per below,
I can confirm it first
onDoubleTap
but not foronLongPress
,onScaleUpdae
oronScaleEnd
.Is it something I'd doing wrong ?
any help would be much appreciated.
The text was updated successfully, but these errors were encountered: