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

Expose pointerEventsFromOpacity$ in views-dom #240

Open
appsforartists opened this issue Dec 5, 2017 · 0 comments
Open

Expose pointerEventsFromOpacity$ in views-dom #240

appsforartists opened this issue Dec 5, 2017 · 0 comments

Comments

@appsforartists
Copy link
Member

appsforartists commented Dec 5, 2017

export function pointerEventsStyleFromOpacity(opacity$: ObservableWithMotionOperators<number>): ObservableWithMotionOperators<string> {
  return opacity$.threshold(.9).rewrite({
    mapping: {
      [ThresholdRegion.ABOVE]: 'inherit',
      [ThresholdRegion.WITHIN]: 'inherit',
      [ThresholdRegion.BELOW]: 'none',
    },
  });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant