incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtu...@apache.org
Subject svn commit: r474542 - /incubator/xap/trunk/src/xap/bridges/dojo/WindowBridge.js
Date Mon, 13 Nov 2006 22:31:48 GMT
Author: mturyn
Date: Mon Nov 13 14:31:48 2006
New Revision: 474542

URL: http://svn.apache.org/viewvc?view=rev&rev=474542
Log:
Fixed double-clicking on the title-bar to maximise/restore---was losing "maximized" state
after the first restore, so couldn't do it again.

Modified:
    incubator/xap/trunk/src/xap/bridges/dojo/WindowBridge.js

Modified: incubator/xap/trunk/src/xap/bridges/dojo/WindowBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/WindowBridge.js?view=diff&rev=474542&r1=474541&r2=474542
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/WindowBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/WindowBridge.js Mon Nov 13 14:31:48 2006
@@ -248,13 +248,13 @@
 
 
 xap.bridges.dojo.WindowBridge.prototype.toggleMaximized = function(){
-	if (this.getElement().getAttribute(xap.xml.XmlTokens.MAXIMIZED)
-						!= xap.xml.XmlTokens.TRUE
-	){
+	if (this.getPeer().windowState != xap.xml.XmlTokens.MAXIMIZED){
 		if( this.getPeer().windowState == xap.xml.XmlTokens.MINIMIZED){
 			this.wasMaximisedFromMinimized = true ;
 		}
 		this.setMaximizedAttribute( xap.xml.XmlTokens.TRUE ) ;
+		this.writeBackAttribute(xap.xml.XmlTokens.MINIMIZED,xap.xml.XmlTokens.FALSE);
+		this.writeBackAttribute(xap.xml.XmlTokens.MAXIMIZED,xap.xml.XmlTokens.TRUE);		
 	} else {
 		this.restoreWindow() ;
 	}
@@ -274,5 +274,7 @@
 		this.setMinimizedAttribute(xap.xml.XmlTokens.TRUE) ;
 	} else {
 		this.getPeer().restoreWindow({}) ;
+		this.writeBackAttribute(xap.xml.XmlTokens.MINIMIZED,xap.xml.XmlTokens.FALSE);
+		this.writeBackAttribute(xap.xml.XmlTokens.MAXIMIZED,xap.xml.XmlTokens.FALSE);		
 	}
  }



Mime
View raw message