\r
X.Dom.BoxModel.vScrollbarSize = w;\r
X.Dom.BoxModel.hScrollbarSize = h;\r
+ if( h < 0 ){\r
+ console.log( 'invalid hScrollbarSize: ' + h );\r
+ X.Dom.BoxModel.hScrollbarSize = w;\r
+ };\r
//\r
\r
node.cssText( 'width:10px;padding:1px;border:2px solid #0;margin:4px;' );\r
// border\r
// margin\r
// top\r
- \r
- node\r
- //.cssText( 'width:90px;height:90px;overflow:auto;' )\r
- .html( '<div style="width:100px;height:100px;"></div>' );\r
- //._startUpdate();\r
- /*\r
- X.Dom.BoxModel.vScrollbarSize = 90 - node._rawNode.clientWidth;\r
- X.Dom.BoxModel.hScrollbarSize = 90 - node._rawNode.clientHeight;*/\r
\r
X.Dom.BoxModel.absoluteOffset =\r
node.cssText( 'position:absolute;top:0;left:0;margin:1px;border:2px solid #000;padding:4px;' )\r
+ .append( '<div></div>' )\r
.firstChild().cssText( 'position:absolute;top:8px;left:8px;margin:16px;border:32px solid #666;padding:64px;' )\r
.y();\r
\r
reserveEvents : null,\r
gesture : null,\r
\r
- x : 0,\r
- y : 0,\r
- \r
- t : 0, // top\r
- l : 0, // left\r
- b : 0, // bottom\r
- r : 0, // right\r
absoluteX : 0,\r
absoluteY : 0,\r
\r
\r
this.root = root;\r
this.rootData = rootData;\r
- this.hoverList = rootData.hoverList;\r
this.parent = parent;\r
this.parentData = parentData;\r
//this.xnode = X.Dom.Node.create( 'div' );\r
capcher : function( x, y ){\r
if( this.pointerDisabled ) return false;\r
\r
- x -= this.x;\r
- y -= this.y;\r
+ x -= this.boxX;\r
+ y -= this.boxY;\r
\r
if( 0 <= x && x < this.boxWidth && 0 <= y && y < this.boxHeight ){\r
- !this.hovering && ( this.hoverList[ this.hoverList.length ] = this );\r
+ !this.hovering && ( this.rootData.hoverList[ this.rootData.hoverList.length ] = this );\r
this.rootData.targetNodeData = this;\r
return true;\r
};\r
},\r
getX : function(){\r
// dirty の場合、rootData.calculate\r
- return X.Class._getPrivate( this ).x;\r
+ return X.Class._getPrivate( this ).boxX;\r
},\r
getY : function(){\r
// dirty の場合、rootData.calculate\r
- return X.Class._getPrivate( this ).y;\r
+ return X.Class._getPrivate( this ).boxY;\r
},\r
getAbsoluteX : function(){\r
// dirty の場合、rootData.calculate\r
i = uinodes && uinodes.length;\r
this.root = root;\r
this.rootData = rootData;\r
- this.hoverList = rootData.hoverList;\r
this.parent = parent;\r
this.parentData = parentData;\r
//this.xnode = X.Dom.Node.create( 'div' );\r
var uinodes, child, _x, _y, hit, i;\r
if( this.pointerDisabled ) return false;\r
delete this.hitChildData;\r
- x -= this.x;\r
- y -= this.y;\r
- if( this.pointerChildren && ( uinodes = this.uinodes ) ){\r
+ x -= this.boxX;\r
+ y -= this.boxY;\r
+ if( this.pointerChildren && ( uinodes = this.uinodes ) && ( i = uinodes.length ) ){\r
_x = x - this.scrollingX;\r
_y = y - this.scrollingY;\r
- for( i = uinodes.length; i; ){\r
+ for( ; i; ){\r
child = uinodes[ --i ];\r
- if( !child.pointerDisabled && child.l <= _x && _x < child.r && child.t <= _y && _y < child.b && child.capcher( _x, _y ) ){\r
- this.hitChildData = child;\r
+ if( !child.pointerDisabled && child.boxX <= _x && _x < child.boxX + child.boxWidth && child.boxY <= _y && _y < child.boxY + child.boxHeight ){\r
+ !child.hovering && ( child.rootData.hoverList[ child.rootData.hoverList.length ] = child );\r
+ this.hitChildData = child.rootData.targetNodeData = child;\r
break;\r
};\r
};\r
};\r
if( this.through ){\r
- this.hitChildData && !this.hovering && ( this.hoverList[ this.hoverList.length ] = this );\r
+ this.hitChildData && !this.hovering && ( this.rootData.hoverList[ this.rootData.hoverList.length ] = this );\r
return !!this.hitChildData;\r
};\r
hit = 0 <= x && x < this.w && 0 <= y && y < this.h;\r
- ( this.hitChildData || hit ) && !this.hovering && ( this.hoverList[ this.hoverList.length ] = this );\r
+ ( this.hitChildData || hit ) && !this.hovering && ( this.rootData.hoverList[ this.rootData.hoverList.length ] = this );\r
if( hit && this.hitChildData === null ) this.rootData.targetNodeData = this;\r
return hit || !!this.hitChildData;\r
},\r
i = 0,
data = X.UI.currentRootData,
sysOnly = false,
- list, ret, parent;
+ ret = X.Callback.NONE,
+ list, parent, _ret;
if( type !== X.UI.Event._POINTER_MOVE && type !== X.UI.Event._MOUSE_MOVE ){
//console.log( type + ' x:' + x + ', y:' + y )
};
e.type = type;
if( data && ( data = data.monopolyNodeData ) && ( ret = data.dispatch( e ) ) & X.Callback.MONOPOLY ) return ret;
- if( X.UI.currentRootData === null ) return;
+
+ if( X.UI.currentRootData === null ) return ret;
+
list = X.UI.currentRootData.hoverList;
data = X.UI.currentRootData.targetNodeData = X.UI.currentRootData;
data.capcher( x, y );
data = X.UI.currentRootData.targetNodeData;
- //console.log( 'absX: ' + data.absoluteX + ', absY:' + data.absoluteY )
- // data.apiuser.updateCoursor( data.targetNodeData._cursor );
+
while( data ){
- ret = data.dispatch( e, sysOnly );
- if( ret & X.Callback.MONOPOLY || ret & X.Callback.STOP_PROPAGATION || ret & X.Callback.STOP_NOW ) break; // sysOnly = true;
+ _ret = data.dispatch( e, sysOnly );
+ ret |= _ret;
+ if( _ret & X.Callback.MONOPOLY || _ret & X.Callback.STOP_PROPAGATION || _ret & X.Callback.STOP_NOW ) break; // sysOnly = true;
data = data.parentData;
};
data.hovering = true;
};
};
- return false;
+ return ret;
};
/*