Skip to content

Commit

Permalink
test: add spec for fa-flipper child removal
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbrown committed Aug 2, 2014
1 parent f97e357 commit b081f26
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
9 changes: 7 additions & 2 deletions dist/famous-angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,7 @@ angular.module('famous.angular')
$famousDecorator.sequenceWith(
scope,
function(data) {
//TODO: support fa-index + sorting children instead of just a stack
var _childCount = isolate.children.length;
if (_childCount === 0) {
isolate.renderNode.setFront(data.renderNode);
Expand All @@ -1821,9 +1822,13 @@ angular.module('famous.angular')

isolate.children.push(data.renderNode);
},
// TODO: support removing children
function(childScopeId) {
throw new Error('unimplemented: fa-flipper does not support removing children');
//TODO: support fa-index + sorting children and removing
// the child at the proper index instead of just popping off a stack

//Since children should handle hiding themselves, all we need to do is
//update our children array
isolate.children.splice(isolate.children.length - 1, 1);
}
);
},
Expand Down
Loading

0 comments on commit b081f26

Please sign in to comment.