Index: remoting/webapp/me2mom/client_session.js |
diff --git a/remoting/webapp/me2mom/client_session.js b/remoting/webapp/me2mom/client_session.js |
index 021f14fa5a59a0ea0e775cd55204def8f5eee5ba..1166e75730ac9afb92490f49c14bc686288ab197 100644 |
--- a/remoting/webapp/me2mom/client_session.js |
+++ b/remoting/webapp/me2mom/client_session.js |
@@ -383,12 +383,9 @@ remoting.ClientSession.prototype.toggleScaleToFit = function(shouldScale) { |
if (height % 2 == 1) |
--height; |
- var scale = 1.0; |
- if (width < height) |
- scale = 1.0 * height / this.plugin.desktopHeight; |
- else |
- scale = 1.0 * width / this.plugin.desktopWidth; |
- |
+ var scaleFitHeight = 1.0 * height / this.plugin.desktopHeight; |
+ var scaleFitWidth = 1.0 * width / this.plugin.desktopWidth; |
+ var scale = Math.min(scaleFitHeight, scaleFitWidth); |
if (scale > 1.0) { |
remoting.debug.log('scale up is not supported'); |
Wez
2011/08/13 01:38:51
Don't we need to be sure to re-set things to 1:1 h
Lambros
2011/08/13 02:13:30
Done.
|
return; |