-
Notifications
You must be signed in to change notification settings - Fork 17
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
Adds zoom in and out multi-touch gesture snippets for mobile #85
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these scripts work as intended with the current percentages used, unless I am misreading this.
parameters: { pointerType: "touch" }, | ||
actions: [ | ||
// Move the pointer to the left of the center | ||
{ type: "pointerMove", duration: 0, x: center.x * 0.45, y: center.y }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this what you intended? The center.x
should already be the center of the element, so you are setting the x value here to be 45% of that (so 22.5% of the element width).
{ | ||
type: "pointerMove", | ||
duration: 1000, | ||
x: center.x * 0.35, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the percentages used here, this is actually moving away from the center I think?
{ type: "pointerMove", duration: 0, x: center.x * 0.55, y: center.y }, | ||
// Press down | ||
{ type: "pointerDown", button: 0 }, | ||
// Move the pointer further to the center over 1000ms | ||
{ | ||
type: "pointerMove", | ||
duration: 1000, | ||
x: center.x * 0.65, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments as the other file.
No description provided.