Index: remoting/webapp/me2mom/client_session.js |
diff --git a/remoting/webapp/me2mom/client_session.js b/remoting/webapp/me2mom/client_session.js |
index bd0fc6a0f2dbe93bf34853deb97d5c60fb5ae114..0790a1fe21e122f85d921d213591c9c96dfaac9f 100644 |
--- a/remoting/webapp/me2mom/client_session.js |
+++ b/remoting/webapp/me2mom/client_session.js |
@@ -352,11 +352,10 @@ remoting.ClientSession.prototype.setState_ = function(state) { |
* @return {void} Nothing. |
*/ |
remoting.ClientSession.prototype.onDesktopSizeChanged_ = function() { |
- var width = this.plugin.desktopWidth; |
- var height = this.plugin.desktopHeight; |
- remoting.debug.log('desktop size changed: ' + width + 'x' + height); |
- this.plugin.width = width; |
- this.plugin.height = height; |
Jamie
2011/09/06 17:19:25
Don't you still need these last two lines in the c
Wez
2011/09/07 00:28:43
setScaleToFit() already has those lines in the not
|
+ remoting.debug.log('desktop size changed: ' + |
+ this.plugin.desktopWidth + 'x' + |
+ this.plugin.desktopHeight); |
+ this.setScaleToFit(remoting.scaleToFit); |
}; |
/** |
@@ -395,6 +394,16 @@ remoting.ClientSession.prototype.setScaleToFit = function(shouldScale) { |
this.plugin.width = this.plugin.desktopWidth; |
this.plugin.height = this.plugin.desktopHeight; |
} |
+ |
+ // Update the containing element accordingly. |
+ if (this.plugin.parentNode) { |
+ var parentNode = this.plugin.parentNode; |
+ parentNode.style["width"] = this.plugin.width + "px"; |
+ parentNode.style["height"] = this.plugin.height + "px"; |
+ parentNode.style["margin-left"] = -(this.plugin.width/2) + "px"; |
Jamie
2011/09/06 17:19:25
Please add a comment above the margin setters to e
Wez
2011/09/07 00:28:43
Done.
|
+ parentNode.style["margin-top"] = -(this.plugin.height/2) + "px"; |
+ } |
+ |
remoting.debug.log('plugin size is now: ' + |
this.plugin.width + ' x ' + this.plugin.height + '.'); |
this.plugin.setScaleToFit(shouldScale); |