guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Jumper <mike.jum...@guac-dev.org>
Subject Re: guacamole-common-js resize method guidance
Date Wed, 05 Apr 2017 22:11:05 GMT
On Mon, Apr 3, 2017 at 9:52 AM, wthomas <westhomas@edgecaselabs.com> wrote:

> I need to scale the remote viewing window down so that it fits within
> `window.innerHeight`
>
> <http://apache-guacamole-incubating-users.2363388.n4.nabble.com/file/n707/
> Screenshot_2017-04-03_11.png>
>

The function you're looking for is scale():

http://guacamole.incubator.apache.org/doc/guacamole-common-js/Guacamole.Display.html#scale

You will need to calculate the scale factor yourself initially and when the
window changes size.

The resize() function you were using previously will resize individual
layers, clipping the contents of that layer. It doesn't perform scaling,
but rather the same resize operation that the Guacamole protocol's "size"
instruction uses. It is a drawing operation which directly modifies display
state, unlike scale() which only affects how the display appears.

- Mike

Mime
View raw message