var proto = this.constructor && this.constructor.prototype,\r
__p__ = proto && proto.__proto__,\r
v = this[ p ],\r
- r = false;\r
+ r = false;\r
\r
if( __p__ ) proto.__proto__ = null;\r
\r
if( v !== v ){\r
if( proto && ( p in proto ) && proto[ p ] !== proto[ p ] ){ // proto[ p ] is NaN\r
proto[ p ] = 0; // different value\r
- r = this[ p ] !== this[ p ]; // isNaN\r
- proto[ p ] = v; // proto で定義されていた.\r
+ r = this[ p ] !== this[ p ]; // isNaN?\r
+ proto[ p ] = v; // set NaN\r
} else {\r
r = true;\r
};\r
} else\r
- if( !proto || !( p in proto ) || ( proto[ p ] !== v ) ){\r
- r = true;\r
- } else {\r
+ if( proto && p in proto && proto[ p ] === v ){\r
// this と proto に同名で同値が書かれている可能性あり\r
proto[ p ] = v + ' '; // different value\r
r = v === this[ p ];\r
- \r
proto[ p ] = v;\r
+ } else {\r
+ r = true;\r
+ };\r
+ };\r
+ \r
+ if( __p__ ) proto.__proto__ = __p__;\r
+ \r
+ return r;\r
+ }); */\r
+/*\r
+Object.prototype.hasOwnProperty || (Object.prototype.hasOwnProperty = function( p ){\r
+ var proto = this.constructor && this.constructor.prototype,\r
+ __p__ = proto && proto.__proto__,\r
+ v = this[ p ],\r
+ isNaN = v !== v;\r
+ r = false;\r
+ \r
+ if( __p__ ) proto.__proto__ = null;\r
+ \r
+ if( p in this ){\r
+ if( proto && p in proto && ( proto[ p ] === v ) ^ isNaN ){ //true + false, false + true\r
+ // this と proto に同名で同値が書かれている可能性あり\r
+ proto[ p ] = v + ' '; // different value\r
+ r = ( v === this[ p ] ) ^ isNaN; // true + false, false + true\r
+ proto[ p ] = v;\r
+ } else {\r
+ r = true;\r
};\r
};\r
\r
if( __p__ ) proto.__proto__ = __p__;\r
\r
return r;\r
- });*/\r
+ }); */
\ No newline at end of file
raw.addEventListener( type, this._handleEvent, false );\r
};\r
}) :\r
- X.Dom.EVENT_W3C && ( X.UA.Opera7 || X.UA.NetFront ) ?\r
+ X.Dom.EVENT_W3C && X.UA.Opera7 ?\r
(function( type ){\r
var raw = this._rawNode;\r
if( !raw ) return;\r
delete this._handleEvent;\r
};\r
}) :\r
- X.Dom.EVENT_W3C && ( X.UA.Opera7 || X.UA.NetFront ) ?\r
+ X.Dom.EVENT_W3C && X.UA.Opera7 ?\r
(function( type ){\r
var raw = this._rawNode;\r
if( !raw ) return;\r
contentHeight : X.UI.Attr.AUTO,\r
minContentHeight : 0,\r
maxContentHeight : X.UI.Attr.AUTO,\r
+ lastContentHeight : -1,\r
\r
constraintW : false,\r
constraintH : false,\r
\r
case X.UI.Dirty.CONTENT : // コンテンツが変更された\r
case X.UI.Dirty.FONT : // フォントサイズが変更された\r
- delete this.lastContentWidth; \r
+ delete this.lastContentWidth;\r
+ delete this.lastContentHeight;\r
\r
case X.UI.Dirty.LAYOUT : // レイアウトの再計算が必要\r
\r
if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB;\r
if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB;\r
} else {\r
- this.scrollHeight = xnode.height() / xnode._getCharSize() + this.contentT + this.contentB;\r
+ this.scrollHeight = h + this.contentT + this.contentB;\r
};\r
+ \r
+ this.lastContentHeight = h;\r
} else\r
if( h === X.UI.Attr.AUTO ){\r
if( w !== this.lastContentWidth ){\r
if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB;\r
if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB; \r
} else {\r
- this.scrollWidth = w + this.contentL + this.contentR;\r
- this.scrollHeight = h + this.contentT + this.contentB;\r
+ this.contentHeight = this.lastContentHeight = h =\r
+ this.lastContentHeight === -1 ? xnode.scrollHeight() / xnode._getCharSize() : this.lastContentHeight;\r
+ this.scrollWidth = w + this.contentL + this.contentR;\r
+ this.scrollHeight = h + this.contentT + this.contentB;\r
};\r
} else\r
if( dirty !== X.UI.Dirty.LAYOUT ){\r
- this.contentWidth = this.lastContentWidth = w; //xnode.width();\r
- this.contentHeight = xnode.height() / xnode._getCharSize();\r
+ this.contentWidth = this.lastContentWidth = w; //xnode.width();\r
+ this.contentHeight = this.lastContentHeight = xnode.scrollHeight() / xnode._getCharSize();\r
this.scrollWidth = this.contentWidth + this.contentL + this.contentR;\r
this.scrollHeight = this.contentHeight + this.contentT + this.contentB;\r
} else {\r
++counter[ type ];\r
} else {\r
counter[ type ] = 1; \r
- root.elmMouseCatch.listen( X.UI.Event.IdToName[ type ], eventRellay );\r
+ root.xnodeInteractiveLayer.listen( X.UI.Event.IdToName[ type ], eventRellay );\r
};\r
};\r
};\r
if( !counter[ type ] ) return this;\r
--counter[ type ];\r
if( counter[ type ] === 0 ){\r
- X.Dom.Event.remove( root.elmMouseCatch, X.UI.Event.IdToName[ type ], eventRellay );\r
+ root.xnodeInteractiveLayer.unlisten( X.UI.Event.IdToName[ type ], eventRellay );\r
delete counter[ type ];\r
};\r
};\r
'_PageRoot',
X.Class.FINAL | X.Class.PRIVATE_DATA | X.Class.SUPER_ACCESS,
{
- layout : X.UI.Layout.Canvas,
+ layout : X.UI.Layout.Canvas,
- calcReserved : false,
- hoverList : null,
- targetNodeData : null,
- monopolyNodeData : null,
+ calcReserved : false,
+ hoverList : null,
+ targetNodeData : null,
+ monopolyNodeData : null,
- elmMouseCatch : null,
- eventCounter : null,
- cursorStyle : null,
+ xnodeInteractiveLayer : null,
+ eventCounter : null,
+ cursorStyle : null,
Constructor : function( layout, args ){
this.SuperConstructor( layout, args );
addToView : function(){
var counter = this.eventCounter, flg;
- // this.elmMouseCatch の前に追加する!
+ // this.xnodeInteractiveLayer の前に追加する!
this.addToParent( X.Dom.Node.root );
- this.elmMouseCatch = X.Dom.Node.root.create( 'div', {
+ this.xnodeInteractiveLayer = X.Dom.Node.root.create( 'div', {
'class' : 'mouse-operation-catcher',
unselectable : 'on'
} );
// X.Dom.Event.activate, X.Dom.Event.deactivate ?
// mouseout, mouseover
if( navigator.msPointerEnabled || navigator.pointerEnabled ){
- this.elmMouseCatch.listen( X.UI.Event.IdToName[ X.UI.Event._POINTER_MOVE ], eventRellay );
+ this.xnodeInteractiveLayer.listen( X.UI.Event.IdToName[ X.UI.Event._POINTER_MOVE ], eventRellay );
if( counter[ X.UI.Event._POINTER_MOVE ] ){
++counter[ X.UI.Event._POINTER_MOVE ];
} else {
counter[ X.UI.Event._POINTER_MOVE ] = 1;
};
} else {
- this.elmMouseCatch.listen( X.UI.Event.IdToName[ X.UI.Event._MOUSE_MOVE ], eventRellay );
+ this.xnodeInteractiveLayer.listen( X.UI.Event.IdToName[ X.UI.Event._MOUSE_MOVE ], eventRellay );
if( counter[ X.UI.Event._MOUSE_MOVE ] ){
++counter[ X.UI.Event._MOUSE_MOVE ];
} else {
},
_remove : function(){
- this.elmMouseCatch.unlisten();
+ this.xnodeInteractiveLayer.unlisten();
_Box.prototype._remove.call( this );
}
}