size, font, w, h;
if( ( this[ 'dispatch' ]( { type : XUI_Event.LAYOUT_BEFORE, 'cancelable' : cancelable } ) & X_CALLBACK_PREVENT_DEFAULT ) && cancelable ){
+ console.log( 'Layout のキャンセル' );
return X_CALLBACK_NONE;
};
+ console.log( 'レイアウト開始' );
+
XUI_mousemoveFix && XUI_mousemoveFixResetScroll();
size = X[ 'ViewPort' ][ 'getSize' ]();
this.updateLayout();
this.calcReserved = false;
-
- X_ViewPort[ 'listenOnce' ]( X_EVENT_AFTER_UPDATE, this, XUI_Root_onViewUpdate );
-
+
+ // size を測りながらレイアウトする結果、アップデートがない場合がある
+ if( X_Node_updateTimerID ){
+ X_ViewPort[ 'listenOnce' ]( X_EVENT_AFTER_UPDATE, this, XUI_Root_onViewUpdate );
+ } else {
+ this[ 'asyncDispatch' ]( XUI_Event.LAYOUT_COMPLETE );
+ };
+
return X_CALLBACK_NONE;
},
};
function XUI_Root_onViewUpdate( e ){
+ console.log( 'レイアウト完了' );
this[ 'dispatch' ]( XUI_Event.LAYOUT_COMPLETE );
};