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 mt...@apache.org on 2006/08/16 19:43:29 UTC
svn commit: r432003 -
/incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js
Author: mturyn
Date: Wed Aug 16 12:43:28 2006
New Revision: 432003
URL: http://svn.apache.org/viewvc?rev=432003&view=rev
Log:
Making progress, not there yet.
Modified:
incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js
Modified: incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js?rev=432003&r1=432002&r2=432003&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js Wed Aug 16 12:43:28 2006
@@ -95,22 +95,33 @@
var shouldResize = false ;
if ( name=="x" ) {
- peer.domNode.style.left = value ;
- peer.containerNode.style.left = value ;
- shouldResize = true ;
+ var height = dojo.style.getOuterHeight(peer.domNode ) || peer.height ;
+ var width = dojo.style.getOuterWidth( peer.domNode ) || peer.width ;
+ peer.domNode.style.left = value ;
+ peer.containerNode.style.left = value ;
+ peer.titleBar.style.left = value ;
+ peer.resizeBar.style.left = value ;
+ // Lets pane manage its container, titlebar, resize-bar
+ peer.resizeTo(width,height) ;
} else if (name=="y") {
- peer.domNode.style.top = value ;
- peer.containerNode.style.top = value ;
- shouldResize = true ;
+ var height = dojo.style.getOuterHeight(peer.domNode ) || peer.height ;
+ var width = dojo.style.getOuterWidth( peer.domNode ) || peer.width ;
+ peer.domNode.style.top = value ;
+ // Lets pane manage its container, title, resize-bar
+ peer.resizeTo(width,height) ;
} else if (name=="width") {
- //peer.domNode.style.width=value ;
- peer.containerNode.style.width=value ;
- shouldResize = true ;
+ // This code stolen from FloatingPane::maximizeWindow
+ var height = peer.height ||dojo.style.getOuterHeight(peer.domNode ) ;
+ peer.domNode.width=value ;
+ peer.containerNode.width=value ;
+ peer.titleBar.width=value ;
+ peer.resizeBar.width=value ;
+ peer.resizeTo(value,height) ;
} else if ( name=="height"){
- //peer.domNode.style.height=value ;
- peer.containerNode.style.height=value ;
- shouldResize = true ;
- } else if (name=="layoutAlign"){
+ // This code stolen from FloatingPane::maximizeWindow
+ var width = dojo.style.getOuterWidth( peer.domNode ) || peer.width ;
+ peer.resizeTo(width,value) ;
+ } else if (name=="layoutAlign"){
peer.layoutAlign = value ;
} else if (name=="title"){
peer.title = value ;
@@ -135,8 +146,13 @@
}
xap.bridges.dojo.DojoFloatingPaneBridge.prototype.getRootDomNode = function(){
-// This seems to work better---using the .domNode member produces an
-// offset between the mouse point and the pane when dragging it:
+ return this._peer.domNode ;
+}
+
+
+xap.bridges.dojo.DojoFloatingPaneBridge.prototype.getDisplayDomNode = function(){
+// This is the large pane in the middle of the widget, and so the best parent for other
+// components:
return this._peer.containerNode ;
}