You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2006/12/05 01:56:06 UTC

svn commit: r482447 - /incubator/xap/trunk/src/xap/bridges/basic/AbstractWidgetBridge.js

Author: jmargaris
Date: Mon Dec  4 17:56:05 2006
New Revision: 482447

URL: http://svn.apache.org/viewvc?view=rev&rev=482447
Log:
Fix for setting invis twice in a row lead to unrecoverable
undisplayed component

Modified:
    incubator/xap/trunk/src/xap/bridges/basic/AbstractWidgetBridge.js

Modified: incubator/xap/trunk/src/xap/bridges/basic/AbstractWidgetBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/basic/AbstractWidgetBridge.js?view=diff&rev=482447&r1=482446&r2=482447
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/basic/AbstractWidgetBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/basic/AbstractWidgetBridge.js Mon Dec  4 17:56:05 2006
@@ -524,22 +524,26 @@
 	if (!rootNode) return;
 	
 	if (value=="false"){
-		rootNode.style.visibility = "hidden";
+		if (rootNode.style.visibility!="hidden"){
+			rootNode.style.visibility = "hidden";
 		
-		//save the old display if it was set
-		this._oldDisplay = rootNode.style.display;
-		rootNode.style.display = "none";
+			//save the old display if it was set
+			this._oldDisplay = rootNode.style.display;
+			rootNode.style.display = "none";
+		}
 	}
 	else if (value=="true"){
-		rootNode.style.visibility = "visible";
-		
-		//if old display is saved roll back to it
-		if (this._oldDisplay){
-			rootNode.style.display = this._oldDisplay;
-			delete this.oldDisplay;
+		if (rootNode.style.visibility!="visible"){
+			rootNode.style.visibility = "visible";
+			
+			//if old display is saved roll back to it
+			if (this._oldDisplay){
+				rootNode.style.display = this._oldDisplay;
+				delete this.oldDisplay;
+			}
+			//otherwise just do the best we can
+			else rootNode.style.display = "";
 		}
-		//otherwise just do the best we can
-		else rootNode.style.display = "";
 	}
 }