_css : null, // X.Dom.Style\r
_cssText : '',\r
\r
+ _anime : null,\r
+ \r
Constructor : function( v ){\r
var css, xnodes, xnode, parent, uid = Node._chashe.length;\r
\r
//if( v.nodeType === 11 ) return Node.IS_DOC_FRAG;\r
return 0;\r
};\r
-Node._getXNode = function( node ){\r
- var uid;\r
- switch( Node._getType( node ) ){\r
+Node._getXNode = function( v ){\r
+ var uid, i, chashe, xnode;\r
+ switch( Node._getType( v ) ){\r
case Node.IS_XNODE :\r
case Node.IS_XNODE_LIST :\r
- return node;\r
+ return v;\r
case Node.IS_RAW_HTML :\r
- case Node.IS_RAW_TEXT :\r
case Node.IS_IMAGE :\r
+ // fake TextNode too.\r
if( X.UA.IE && X.UA.IE < 5 ){\r
- uid = node.getAttribute( 'UID' );\r
+ uid = v.getAttribute( 'UID' );\r
return uid && Node._chashe[ uid ];\r
};\r
- return node.UID && Node._chashe[ node.UID ];\r
+ return v.UID && Node._chashe[ v.UID ];\r
case Node.IS_WINDOW :\r
return Node._window;\r
case Node.IS_DOCUMENT :\r
return Node._document;\r
+ case Node.IS_RAW_TEXT :\r
+ for( chashe = Node._chashe, i = chashe.length; i; ){\r
+ if( ( xnode = Node._chashe[ --i ] ) && ( xnode._rawNode === v ) ) return xnode;\r
+ };\r
};\r
};\r
\r
if( v._destroyed ) alert( 'xnode already destroyed!' );\r
Node._reserveRemoval.splice( i, 1 );\r
};\r
+ break;\r
default :\r
return this;\r
};\r
var root = Node.root;\r
//if( !root ) return;\r
//child && ( child._dirty = true );\r
- if( root && !root._updateReserved ) root._updateReserved = X.Timer.requestFrame( root, root._startUpdate );\r
+ if( root && !root._updateTimerID ) root._updateTimerID = X.Timer.requestFrame( root, root._startUpdate );\r
};\r
\r
Node.prototype._startUpdate = function(){\r
var removal, i, xnode, tmp;\r
\r
- if( this._updateReserved ){\r
- //X.Timer.cancelFrame( this._updateReserved );\r
- delete this._updateReserved;\r
+ if( this._updateTimerID ){\r
+ //X.Timer.cancelFrame( this._updateTimerID );\r
+ this._updateTimerID = 0;\r
} else {\r
return;\r
};\r
* overflow:hidden かつ width か height が設定されていたら、再描画しないでその値を返す
*/
Node.prototype.width = function(){
- var elm;
- if( !this.parent ) return 0;
+ if( !this.parent ){
+ console.log( 'xnode.width() : no parent' );
+ return 0;
+ };
+ Node.root._updateTimerID && Node.root._startUpdate();
if( document.getElementById ){
// this.css( X.Dom.Style.Unit.px, 'width' );
- return ( elm = this._rawNode ) ? elm.offsetWidth : 0;
+ return this._rawNode.offsetWidth;
} else
if( document.all ){
- if( !( elm = this._ie4getRawNode() ) ) return 0;
- Node.root._updateReserved === true && Node.root._startUpdate();
- return elm.offsetWidth;
+ return ( this._rawNode || this._ie4getRawNode() ).offsetWidth;
} else {
};
};
Node.prototype.height = function(){
- var elm;
- if( !this.parent ) return 0;
+ if( !this.parent ){
+ console.log( 'xnode.height() : no parent' );
+ return 0;
+ };
+ Node.root._updateTimerID && Node.root._startUpdate();
if( document.getElementById ){
// this.css( X.Dom.Style.Unit.px, 'height' );
- return ( elm = this._rawNode ) ? elm.offsetHeight : 0;
+ return this._rawNode.offsetHeight;
} else
if( document.all ){
- if( !( elm = this._ie4getRawNode() ) ) return 0;
- Node.root._updateReserved === true && Node.root._startUpdate();
- return elm.offsetHeight;
+ return ( this._rawNode || this._ie4getRawNode() ).offsetHeight;
} else {
};
*/
// X.Dom.Style.transform,
Node.prototype.x = function(){
- var elm;
- if( !this.parent ) return 0;
+ if( !this.parent ){
+ console.log( 'xnode.x() : no parent' );
+ return 0;
+ };
+ Node.root._updateTimerID && Node.root._startUpdate();
if( document.getElementById ){
// this.css( X.Dom.Style.Unit.px, 'left' );
// this.css( X.Dom.Style.Unit.px, 'translateX' );
- return ( elm = this._rawNode ) ? elm.offsetLeft : 0;
+ return this._rawNode.offsetLeft;
} else
if( document.all ){
- if( !( elm = this._ie4getRawNode() ) ) return 0;
- Node.root._updateReserved === true && Node.root._startUpdate();
- return elm.offsetLeft;
+ return ( this._rawNode || this._ie4getRawNode() ).offsetLeft;
} else {
};
};
Node.prototype.y = function(){
- var elm;
- if( !this.parent ) return 0;
+ if( !this.parent ){
+ console.log( 'xnode.y() : no parent' );
+ return 0;
+ };
+ Node.root._updateTimerID && Node.root._startUpdate();
if( document.getElementById ){
// this.css( X.Dom.Style.Unit.px, 'top' );
// this.css( X.Dom.Style.Unit.px, 'transisitonY' );
- return ( elm = this._rawNode ) ? elm.offsetTop : 0;
+ return this._rawNode.offsetTop;
} else
if( document.all ){
- if( !( elm = this._ie4getRawNode() ) ) return 0;
- Node.root._updateReserved === true && Node.root._startUpdate();
- return elm.offsetTop;
+ return ( this._rawNode || this._ie4getRawNode() ).offsetTop;
} else {
};
-};
\ No newline at end of file
+};
+
};\r
\r
})( window, document, navigator, Math );\r
+\r
+\r
},
start : function(){
+ console.log( 'ui start.' )
this.initialize( this.User, this, null, null );
X.Timer.once( 0, this, this.addToView );
},
addToView : function(){
+ console.log( 'ui add to view.' + X.Dom.Node.root._tag )
var counter = this.eventCounter, flg, elm;
// document.body.insertBefore( this.rawElement, elmInteractive );
//document.body.appendChild( elm = document.createElement( 'div' ) );
elm = X.Dom.Node.root.create( 'div', {
- className : 'mouse-operation-catcher',
+ 'class' : 'mouse-operation-catcher',
unselectable : 'on'
} );