Remove "downscale only" mode

The normal scaling mode should be sufficient for most use cases, so
let's keep the interface simple.
This commit is contained in:
Pierre Ossman
2017-10-20 13:23:03 +02:00
parent 8d1f0a3de8
commit 002907d2ce
7 changed files with 9 additions and 32 deletions
+1 -5
View File
@@ -517,7 +517,7 @@ Display.prototype = {
this._target.style.cursor = "none";
},
autoscale: function (containerWidth, containerHeight, downscaleOnly) {
autoscale: function (containerWidth, containerHeight) {
var vp = this._viewportLoc;
var targetAspectRatio = containerWidth / containerHeight;
var fbAspectRatio = vp.w / vp.h;
@@ -529,10 +529,6 @@ Display.prototype = {
scaleRatio = containerHeight / vp.h;
}
if (scaleRatio > 1.0 && downscaleOnly) {
scaleRatio = 1.0;
}
this._rescale(scaleRatio);
},
+2 -2
View File
@@ -351,9 +351,9 @@ RFB.prototype = {
RFB.messages.clientCutText(this._sock, text);
},
autoscale: function (width, height, downscaleOnly) {
autoscale: function (width, height) {
if (this._rfb_connection_state !== 'connected') { return; }
this._display.autoscale(width, height, downscaleOnly);
this._display.autoscale(width, height);
},
viewportChangeSize: function(width, height) {