OSDN Git Service

Version 0.6.137, bugfix for X.NodeSelector.
[pettanr/clientJs.git] / 0.6.x / js / 01_core / 16_XViewPort.js
index bcc341a..0684d3f 100644 (file)
@@ -21,7 +21,7 @@ var X_ViewPort_readyState,
        X_Dom_orientationchange = window[ 'orientation' ] !== undefined && function( e ){
                X_ViewPort_orientationFlag = true;
                !X_UA[ 'Android' ] && X_ViewPort_resize();
-               //console.log( '-- orientationchange : ' + X[ 'ViewPort' ].getSize[ 0 ] + ' ' + X[ 'ViewPort' ].getSize[ 1 ] );
+               //console.log( '-- orientationchange : ' + X[ 'ViewPort' ][ 'getSize' ][ 0 ] + ' ' + X[ 'ViewPort' ][ 'getSize' ][ 1 ] );
        },
        
        X_ViewPort_document = X_EventDispatcher( document ),
@@ -264,7 +264,7 @@ X[ 'ViewPort' ] = {
                                X_ViewPort_lock = false;
                                if( X_ViewPort_orientationFlag ){
                                        X_ViewPort_orientationFlag = false;
-                                       X_ViewPort[ 'asyncDispatch' ]( 100, { type : X_EVENT_VIEW_TURNED, orientation : window.orientation } );
+                                       X_ViewPort[ 'asyncDispatch' ]( 100, { type : X_EVENT_VIEW_TURNED, 'orientation' : window.orientation } );
                                };
                        };
                };
@@ -303,12 +303,12 @@ X[ 'ViewPort' ] = {
                        body[ 'parent ' ] = head[ 'parent' ] = html;
                        html[ '_xnodes' ] = [ head, body ];
                        
-                       html[ 'appendTo' ] = html[ 'before' ] = html[ 'after' ] = html[ 'clone' ] = html[ 'remove' ] = html[ 'destroy' ] = html[ 'prev' ] = html[ 'next' ] =
+                       html[ 'appendTo' ] = html[ 'prev' ] = html[ 'next' ] = html[ 'clone' ] = html[ 'remove' ] = html[ 'destroy' ] =
                        html[ 'create' ] = html[ 'createText' ] = html[ 'createAt' ] = html[ 'createTextAt' ] = html[ 'append' ] = html[ 'appendAt' ] = html[ 'empty' ] = html[ 'html' ] = html[ 'text' ] =
                        html[ 'css' ] = html[ 'cssText' ] =
-                       head[ 'appendTo' ] = head[ 'before' ] = head[ 'after' ] = head[ 'clone' ] = head[ 'remove' ] = head[ 'destroy' ] =
+                       head[ 'appendTo' ] = head[ 'prev' ] = head[ 'next' ] = head[ 'clone' ] = head[ 'remove' ] = head[ 'destroy' ] =
                        head[ 'createText' ] = head[ 'createTextAt' ] = head[ 'empty' ] = head[ 'html' ] = head[ 'text' ] = head[ 'css' ] = head[ 'cssText' ] =
-                       body[ 'appendTo' ] = body[ 'before' ] = body[ 'after' ] = body[ 'clone' ] = body[ 'remove' ] = body[ 'destroy' ] = new Function( 'return this' );
+                       body[ 'appendTo' ] = body[ 'prev' ] = body[ 'next' ] = body[ 'clone' ] = body[ 'remove' ] = body[ 'destroy' ] = new Function( 'return this' );
 
                        X_ViewPort[ 'listenOnce' ]( X_EVENT_PRE_INIT, function(){
                                X_ViewPort_readyState = X_EVENT_XTREE_READY;
@@ -336,6 +336,9 @@ X[ 'ViewPort' ] = {
                                        defaultOverflow = document.body.style.overflow,
                                        w, h;
                        
+                               X_ViewPort_width  = size[ 0 ];
+                               X_ViewPort_height = size[ 1 ];
+                       
                                body.style.overflow = 'hidden';
                                w = body.clientWidth;
                                h = body.clientHeight;
@@ -368,9 +371,8 @@ X[ 'ViewPort' ] = {
                                };
                                
                                X_ViewPort_baseFontSize = X_Node_fontSizeNode[ '_rawObject' ].offsetHeight;
-                               
-                               X_ViewPort_readyState = X_EVENT_XDOM_READY;
-                               X_ViewPort[ 'asyncDispatch' ]( { type : X_EVENT_XDOM_READY, w : X_ViewPort_width = size[ 0 ], h : X_ViewPort_height = size[ 1 ] } );
+
+                               X_ViewPort[ 'asyncDispatch' ]( X_ViewPort_readyState = X_EVENT_XDOM_READY );
                        } );
 
                        X_ViewPort[ 'asyncDispatch' ]( X_EVENT_PRE_INIT );