Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DancingNerd
Copy link
Contributor

No description provided.

Copy link

@simonychoy simonychoy left a 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 },

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,

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?

Comment on lines +36 to +43
{ 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,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants