Skip to content

Commit

Permalink
fix: make multiple ng-shows inside of an fa-surface behave as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbrown committed Jun 17, 2014
1 parent 89d96ae commit 5478f03
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion dist/famous-angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -3286,7 +3286,10 @@ angular.module('famous.angular')
* @return {boolean}
*/
function isClassable(element) {
return $famous.getIsolate(element.scope()).renderNode instanceof Surface;

This comment has been minimized.

Copy link
@epegzz

epegzz Jun 18, 2014

$famous.getIsolate(element.scope()) in some cases results in undefined
maybe we change that to:

var scope = $famous.getIsolate(element.scope())
var hasASurface = scope && scope.renderNode instanceof Surface;

?

This comment has been minimized.

Copy link
@zackbrown

zackbrown Jun 19, 2014

Author Contributor

Good call. d4b352d :)

var hasASurface = $famous.getIsolate(element.scope()).renderNode instanceof Surface;
//TODO: support <div fa-surface>? (rather than just <fa-surface>)
var isAnFaSurface = element[0].nodeName === "FA-SURFACE"
return hasASurface && isAnFaSurface;
}

// Fork $animateProvider methods that update class lists with ng-class
Expand Down
Loading

0 comments on commit 5478f03

Please sign in to comment.