Skip to content

Instantly share code, notes, and snippets.

@browniefed
Created August 3, 2018 15:44
Show Gist options
  • Save browniefed/8ba43519853966e4ce9e9a8fb88ebeb6 to your computer and use it in GitHub Desktop.
Save browniefed/8ba43519853966e4ce9e9a8fb88ebeb6 to your computer and use it in GitHub Desktop.
const addY = add(this.offsetY, this.dragY);
const addX = add(this.offsetX, this.dragX);
this.transX = cond(eq(this.gestureState, State.ACTIVE), addX, set(this.offsetX, addX));
this.transY = cond(eq(this.gestureState, State.ACTIVE), addY, set(this.offsetY, addY));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment