Skip to content

Commit

Permalink
docs: clearly stating what fa-pipe-to and fa-pipe-from are supposed t…
Browse files Browse the repository at this point in the history
…o be doing
  • Loading branch information
stristr authored and zackbrown committed May 29, 2014
1 parent b27cca9 commit 568d6d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/scripts/directives/fa-pipe-from.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
* @module famous.angular
* @restrict A
* @priority 16
* @param {Object} EventHandler - target handler object
* @param {Object} EventHandler - Event handler target object
* @description
* This directive remove an handler object from set of downstream handlers. Undoes work of "pipe"
* from a faPipeTo directive.
* This directive pipes a target event handler to an element's event handler.
*
* @usage
* ```html
Expand All @@ -17,7 +16,6 @@
* ```
*/

// UNTESTED as of 2014-05-26
angular.module('famous.angular')
.directive('faPipeFrom', ['$famous', '$famousDecorator', '$famousPipe', function ($famous, $famousDecorator, $famousPipe) {
return {
Expand Down
13 changes: 7 additions & 6 deletions src/scripts/directives/fa-pipe-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
* @name faPipeTo
* @module famous.angular
* @restrict A
* @param {Object} EventHandler - Event handler target object
* @priority 16
* @param {Object} EventHandler - Event handler source object
* @description
* This directive add an event handler object to set of downstream handlers.
* This directive pipes an element's event handler to a source event handler.
*
* @usage
* ```html
* <ANY fa-pipe-to="eventHandler">
* <ANY fa-pipe-to="EventHandler">
* <!-- zero or more render nodes -->
* </ANY>
* ```
Expand All @@ -31,10 +32,10 @@ angular.module('famous.angular')
function(){
return scope.$eval(attrs.faPipeTo);
},
function(newPipe, oldPipe){
function(newSource, oldSource) {
var target = isolate.renderNode || Engine;
$famousPipe.unpipesFromTargets(oldPipe, target);
$famousPipe.pipesToTargets(newPipe, target);
$famousPipe.unpipesFromTargets(oldSource, target);
$famousPipe.pipesToTargets(newSource, target);
}
);

Expand Down

0 comments on commit 568d6d8

Please # to comment.