You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by necouchman <gi...@git.apache.org> on 2018/04/30 17:42:50 UTC
[GitHub] guacamole-client pull request #280: GUACAMOLE-152: Allow zoom/scale to be ma...
GitHub user necouchman opened a pull request:
https://github.com/apache/guacamole-client/pull/280
GUACAMOLE-152: Allow zoom/scale to be manually entered.
This change allows the zoom level (display scale) to be manually entered in addition to using the -/+ controls in the menu so that additional zoom levels can be reached that aren't currently possible with the 0.10 (10%) scale stepping.
Not sure if this is the right approach or not, but thought I'd give it a try!
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/necouchman/guacamole-client jira/152
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/guacamole-client/pull/280.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #280
----
commit 310fdd0ea2c5dea082a58c0f9949783a9e51957d
Author: Nick Couchman <vn...@...>
Date: 2018-04-30T17:35:08Z
GUACAMOLE-152: Allow zoom/scale to be manually entered.
----
---
[GitHub] guacamole-client pull request #280: GUACAMOLE-152: Allow zoom/scale to be ma...
Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:
https://github.com/apache/guacamole-client/pull/280#discussion_r186011182
--- Diff: guacamole/src/main/webapp/app/client/templates/client.html ---
@@ -151,7 +151,7 @@ <h3>{{'CLIENT.SECTION_HEADER_DISPLAY' | translate}}</h3>
<div class="content">
<div id="zoom-settings">
<div ng-click="zoomOut()" id="zoom-out"><img src="images/settings/zoom-out.png" alt="-"/></div>
- <div id="zoom-state">{{formattedScale()}}%</div>
--- End diff --
Yep, removed.
---
[GitHub] guacamole-client pull request #280: GUACAMOLE-152: Allow zoom/scale to be ma...
Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:
https://github.com/apache/guacamole-client/pull/280#discussion_r185993432
--- Diff: guacamole/src/main/webapp/app/client/templates/client.html ---
@@ -151,7 +151,7 @@ <h3>{{'CLIENT.SECTION_HEADER_DISPLAY' | translate}}</h3>
<div class="content">
<div id="zoom-settings">
<div ng-click="zoomOut()" id="zoom-out"><img src="images/settings/zoom-out.png" alt="-"/></div>
- <div id="zoom-state">{{formattedScale()}}%</div>
--- End diff --
If this is no longer necessary, then we should probably also delete:
https://github.com/apache/guacamole-client/blob/91f19b2e03cce32c964f1f06e810d84aa8b924d5/guacamole/src/main/webapp/app/client/controllers/clientController.js#L734-L736
---
[GitHub] guacamole-client pull request #280: GUACAMOLE-152: Allow zoom/scale to be ma...
Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:
https://github.com/apache/guacamole-client/pull/280#discussion_r188524055
--- Diff: guacamole/src/main/webapp/app/client/templates/client.html ---
@@ -151,7 +151,12 @@ <h3>{{'CLIENT.SECTION_HEADER_DISPLAY' | translate}}</h3>
<div class="content">
<div id="zoom-settings">
<div ng-click="zoomOut()" id="zoom-out"><img src="images/settings/zoom-out.png" alt="-"/></div>
- <div id="zoom-state">{{formattedScale()}}%</div>
+ <div class="zoom-ctrl">
+ <input type="number" class="zoom-ctrl" guac-zoom-ctrl
+ ng-model="client.clientProperties.scale"
+ ng-model-options="{ updateOn: 'blur submit' }"
+ ng-change="zoomSet();" />%
--- End diff --
Was just about to retest these changes but out of curiosity:
What is the effect of including a semicolon within the attribute of an AngularJS directive like this? Does Angular (intentionally) support multiple statements within expressions?
---
Re: [GitHub] guacamole-client pull request #280: GUACAMOLE-152: Allow
zoom/scale to be ma...
Posted by Mark Nolan <ma...@gmail.com>.
I think it is permitted and it certainly works on the angularjs website
expression example.
On Wed, 16 May 2018, 15:44 necouchman, <gi...@git.apache.org> wrote:
> Github user necouchman commented on a diff in the pull request:
>
>
> https://github.com/apache/guacamole-client/pull/280#discussion_r188652586
>
> --- Diff: guacamole/src/main/webapp/app/client/templates/client.html
> ---
> @@ -151,7 +151,12 @@ <h3>{{'CLIENT.SECTION_HEADER_DISPLAY' |
> translate}}</h3>
> <div class="content">
> <div id="zoom-settings">
> <div ng-click="zoomOut()"
> id="zoom-out"><img src="images/settings/zoom-out.png" alt="-"/></div>
> - <div
> id="zoom-state">{{formattedScale()}}%</div>
> + <div class="zoom-ctrl">
> + <input type="number"
> class="zoom-ctrl" guac-zoom-ctrl
> +
> ng-model="client.clientProperties.scale"
> + ng-model-options="{ updateOn:
> 'blur submit' }"
> + ng-change="zoomSet();" />%
> --- End diff --
>
> Old (bad?) JavaScript habits. Removed.
>
>
> ---
>
[GitHub] guacamole-client pull request #280: GUACAMOLE-152: Allow zoom/scale to be ma...
Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:
https://github.com/apache/guacamole-client/pull/280#discussion_r188652586
--- Diff: guacamole/src/main/webapp/app/client/templates/client.html ---
@@ -151,7 +151,12 @@ <h3>{{'CLIENT.SECTION_HEADER_DISPLAY' | translate}}</h3>
<div class="content">
<div id="zoom-settings">
<div ng-click="zoomOut()" id="zoom-out"><img src="images/settings/zoom-out.png" alt="-"/></div>
- <div id="zoom-state">{{formattedScale()}}%</div>
+ <div class="zoom-ctrl">
+ <input type="number" class="zoom-ctrl" guac-zoom-ctrl
+ ng-model="client.clientProperties.scale"
+ ng-model-options="{ updateOn: 'blur submit' }"
+ ng-change="zoomSet();" />%
--- End diff --
Old (bad?) JavaScript habits. Removed.
---
[GitHub] guacamole-client pull request #280: GUACAMOLE-152: Allow zoom/scale to be ma...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/guacamole-client/pull/280
---