Skip to content

Commit e4a50ce

Browse files
author
Michael Johnston
committed
Invalidate layer tree on component update.
Fixes Flipboard#40
1 parent 8ea85aa commit e4a50ce

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

lib/Image.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ var RawImage = createComponent('Image', LayerMixin, {
3434
var props = nextComponent.props;
3535
this.applyLayerProps(prevProps, props);
3636
this._currentElement = nextComponent;
37+
this.node.invalidateLayout();
3738
},
3839

3940
});

lib/Layer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var Layer = createComponent('Layer', LayerMixin, {
1717
var props = nextComponent.props;
1818
this.applyLayerProps(prevProps, props);
1919
this._currentElement = nextComponent;
20+
this.node.invalidateLayout();
2021
}
2122

2223
});

lib/Text.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ var Text = createComponent('Text', LayerMixin, {
3333
this.applyLayerProps(prevProps, props);
3434
this.applyTextProps(prevProps, props);
3535
this._currentElement = nextComponent;
36+
this.node.invalidateLayout();
3637
}
3738

3839
});

0 commit comments

Comments
 (0)