@@ -25,7 +25,7 @@ var TestModule = NativeModules.TestModule;
2525var deepDiffer = require ( 'deepDiffer' ) ;
2626
2727function debug ( ) {
28- //console.log.apply(null, arguments);
28+ // console.log.apply(null, arguments);
2929}
3030
3131type LayoutEvent = {
@@ -46,22 +46,25 @@ var LayoutEventsTest = React.createClass({
4646 } ;
4747 } ,
4848 animateViewLayout : function ( ) {
49+ debug ( 'animateViewLayout invoked' ) ;
4950 LayoutAnimation . configureNext (
5051 LayoutAnimation . Presets . spring ,
5152 ( ) => {
52- debug ( 'layout animation done. ' ) ;
53+ debug ( 'animateViewLayout done' ) ;
5354 this . checkLayout ( this . addWrapText ) ;
5455 }
5556 ) ;
5657 this . setState ( { viewStyle : { margin : 60 } } ) ;
5758 } ,
5859 addWrapText : function ( ) {
60+ debug ( 'addWrapText invoked' ) ;
5961 this . setState (
6062 { extraText : ' And a bunch more text to wrap around a few lines.' } ,
6163 ( ) => this . checkLayout ( this . changeContainer )
6264 ) ;
6365 } ,
6466 changeContainer : function ( ) {
67+ debug ( 'changeContainer invoked' ) ;
6568 this . setState (
6669 { containerStyle : { width : 280 } } ,
6770 ( ) => this . checkLayout ( TestModule . markTestCompleted )
@@ -113,6 +116,7 @@ var LayoutEventsTest = React.createClass({
113116 var viewStyle = [ styles . view , this . state . viewStyle ] ;
114117 var textLayout = this . state . textLayout || { width : '?' , height : '?' } ;
115118 var imageLayout = this . state . imageLayout || { x : '?' , y : '?' } ;
119+ debug ( 'viewLayout' , this . state . viewLayout ) ;
116120 return (
117121 < View style = { [ styles . container , this . state . containerStyle ] } >
118122 < View ref = "view" onLayout = { this . onViewLayout } style = { viewStyle } >
@@ -122,9 +126,6 @@ var LayoutEventsTest = React.createClass({
122126 style = { styles . image }
123127 source = { { uri : 'uie_thumb_big.png' } }
124128 />
125- < Text >
126- ViewLayout: { JSON . stringify ( this . state . viewLayout , null , ' ' ) + '\n\n' }
127- </ Text >
128129 < Text ref = "txt" onLayout = { this . onTextLayout } style = { styles . text } >
129130 A simple piece of text.{ this . state . extraText }
130131 </ Text >
0 commit comments