You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by wthomas <we...@edgecaselabs.com> on 2017/04/03 16:52:28 UTC

Re: guacamole-common-js resize method guidance

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> 





--
View this message in context: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/guacamole-common-js-resize-method-guidance-tp693p707.html
Sent from the Apache Guacamole (incubating) - Users mailing list archive at Nabble.com.

Re: guacamole-common-js resize method guidance

Posted by wthomas <we...@edgecaselabs.com>.
Anyone have any guidance on how to resize the guac viewer display so it
doesn't fill beyond my entire browser window?



--
View this message in context: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/guacamole-common-js-resize-method-guidance-tp693p738.html
Sent from the Apache Guacamole (incubating) - Users mailing list archive at Nabble.com.

Re: guacamole-common-js resize method guidance

Posted by wthomas <we...@edgecaselabs.com>.
Sorry for the ridiculously large screenshot. I wasn't thinking.



--
View this message in context: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/guacamole-common-js-resize-method-guidance-tp693p708.html
Sent from the Apache Guacamole (incubating) - Users mailing list archive at Nabble.com.

Re: guacamole-common-js resize method guidance

Posted by Mike Jumper <mi...@guac-dev.org>.
On Mon, Apr 3, 2017 at 9:52 AM, wthomas <we...@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