OSDN Git Service

Version 0.6.58, X.UI.HBox is working.
[pettanr/clientJs.git] / 0.5.x / javascripts / xdoc.js
index 712ba3d..c47c14f 100644 (file)
@@ -1463,10 +1463,12 @@ var XDocument = ( function( window, document ){
                        },\r
                        style : function( v ){\r
                                if( v instanceof NodeStyle ){\r
-                                       this.__style && this.__style.unRegister( this );\r
-                                       this._style = v;\r
-                                       this.__style = StylePrivate.getPrivateData( v );                                        \r
-                                       this.__style.register( this );\r
+                                       if( v !== this._style ){\r
+                                               this.__style && this.__style.unRegister( this );\r
+                                               this._style = v;\r
+                                               this.__style = StylePrivate.getPrivateData( v );                                        \r
+                                               this.__style.register( this );                                          \r
+                                       };\r
                                        return this.User;\r
                                } else\r
                                if( v === null ){\r