Skip to content

Instantly share code, notes, and snippets.

@publickeating
Created January 3, 2011 17:05
Show Gist options
  • Save publickeating/763691 to your computer and use it in GitHub Desktop.
Save publickeating/763691 to your computer and use it in GitHub Desktop.
Proposed addition to expose isForward
/**
Returns the direction of the binding. If isForward is YES, then the value
being passed came from the "from" side of the binding (i.e. the "Binding.path"
you named). If isForward is NO, then the value came from the "to" side (i.e.
the property you named with "propertyBinding"). You can vary your transform
behavior if you are based on the direction of the change.
@returns {Boolean}
*/
isForward: function() {
return this._fromTarget === this._bindingSource;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment