On Mon, Apr 3, 2017 at 9:52 AM, wthomas <[email protected]> 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

Reply via email to