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

Marking Menu interactions #231

Open
appsforartists opened this issue Oct 7, 2017 · 0 comments
Open

Marking Menu interactions #231

appsforartists opened this issue Oct 7, 2017 · 0 comments

Comments

@appsforartists
Copy link
Member

The Marking Menu demo will be a great showcase of an advanced interaction powered by Material Motion. It will need these operators:

  • toPolar(): Observable<{ angle, distance }>
  • toCartesian(): Observable<Point2D>
  • inIncrementsOf({ size: number }): Observable<number>

and will likely be composed of many smaller interactions, such as:

  • MarkingMenuItem
  • MarkingMenu
  • NextScreenPreview
appsforartists added a commit that referenced this issue Jun 1, 2018
Summary:
This is useful for building marking menus.  Like `distanceFrom`, it accepts an `origin$` argument, which allows us to ensure it can only be called on `Observable<Point2D>`.  (Another solution would have been `point$.subtractedBy(origin$).toPoint()`, but without the argument, we can't constrain `T`).

I inlined the Pythagorean theorem rather than returning `combineLatest({ distance: this.distanceFrom(origin$), angle: … })` to avoid emitting separately for each of `distance` and `angle`.

Part of #231

Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion

Tags: #material_motion

Differential Revision: http://codereview.cc/D3444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant