Material Motion Exploring solutions that will empower creators with the tools needed to describe and implement rich, interactive motion on any platform. Edit this page · History
$._map inverted
Status Interface level Implementation level Library
Stable as of February 21, 2016 L2: Interaction creator L3: Stream creator material-motion
platformsrctests
Android View
iOS (Swift) View View
JavaScript View View
inverted
upstream (Bool)
(Bool) downstream

inverted specification

This is the engineering specification for the MotionObservable operator: inverted.

Overview

inverted emits the result of inverting the upstream value.

Example usage

stream.inverted()

upstream  |  downstream
true      |  false
true      |  false
false     |  true

MVP

Expose an inverted operator API

Use _map to implement the operator. Emit the result of !upstream.

class MotionObservable<Bool> {
  public func inverted() -> MotionObservable<Bool>