You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2017/03/08 01:12:05 UTC

[1/4] incubator-guacamole-client git commit: GUACAMOLE-230: Provide means of retrieving a canvas with the same dimensions and content as a layer.

Repository: incubator-guacamole-client
Updated Branches:
  refs/heads/master 865ec1970 -> 25b9425ed


GUACAMOLE-230: Provide means of retrieving a canvas with the same dimensions and content as a layer.

Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/c2f7fdb6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/c2f7fdb6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/c2f7fdb6

Branch: refs/heads/master
Commit: c2f7fdb61d49ce14f599dc728f70fab1d164b5aa
Parents: 6bcb983
Author: Michael Jumper <mj...@apache.org>
Authored: Sat Mar 4 20:33:57 2017 -0800
Committer: Michael Jumper <mj...@apache.org>
Committed: Sat Mar 4 20:33:57 2017 -0800

----------------------------------------------------------------------
 .../src/main/webapp/modules/Layer.js            | 34 ++++++++++++++++++--
 1 file changed, 31 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/c2f7fdb6/guacamole-common-js/src/main/webapp/modules/Layer.js
----------------------------------------------------------------------
diff --git a/guacamole-common-js/src/main/webapp/modules/Layer.js b/guacamole-common-js/src/main/webapp/modules/Layer.js
index 1ed9d4c..5384d2c 100644
--- a/guacamole-common-js/src/main/webapp/modules/Layer.js
+++ b/guacamole-common-js/src/main/webapp/modules/Layer.js
@@ -267,14 +267,42 @@ Guacamole.Layer = function(width, height) {
     this.height = height;
 
     /**
-     * Returns the canvas element backing this Layer.
-     * @returns {Element} The canvas element backing this Layer.
+     * Returns the canvas element backing this Layer. Note that the dimensions
+     * of the canvas may not exactly match those of the Layer, as resizing a
+     * canvas while maintaining its state is an expensive operation.
+     *
+     * @returns {HTMLCanvasElement}
+     *     The canvas element backing this Layer.
      */
-    this.getCanvas = function() {
+    this.getCanvas = function getCanvas() {
         return canvas;
     };
 
     /**
+     * Returns a new canvas element containing the same image as this Layer.
+     * Unlike getCanvas(), the canvas element returned is guaranteed to have
+     * the exact same dimensions as the Layer.
+     *
+     * @returns {HTMLCanvasElement}
+     *     A new canvas element containing a copy of the image content this
+     *     Layer.
+     */
+    this.toCanvas = function toCanvas() {
+
+        // Create new canvas having same dimensions
+        var canvas = document.createElement('canvas');
+        canvas.width = layer.width;
+        canvas.height = layer.height;
+
+        // Copy image contents to new canvas
+        var context = canvas.getContext('2d');
+        context.drawImage(layer.getCanvas(), 0, 0);
+
+        return canvas;
+
+    };
+
+    /**
      * Changes the size of this Layer to the given width and height. Resizing
      * is only attempted if the new size provided is actually different from
      * the current size.


[2/4] incubator-guacamole-client git commit: GUACAMOLE-230: Supply oncursor event with new canvas (having correct dimensions).

Posted by jm...@apache.org.
GUACAMOLE-230: Supply oncursor event with new canvas (having correct dimensions).

Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/69ff583a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/69ff583a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/69ff583a

Branch: refs/heads/master
Commit: 69ff583a07c6644f75cd404c2c94a16489b88b3b
Parents: c2f7fdb
Author: Michael Jumper <mj...@apache.org>
Authored: Sat Mar 4 20:36:24 2017 -0800
Committer: Michael Jumper <mj...@apache.org>
Committed: Sat Mar 4 20:36:24 2017 -0800

----------------------------------------------------------------------
 guacamole-common-js/src/main/webapp/modules/Display.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/69ff583a/guacamole-common-js/src/main/webapp/modules/Display.js
----------------------------------------------------------------------
diff --git a/guacamole-common-js/src/main/webapp/modules/Display.js b/guacamole-common-js/src/main/webapp/modules/Display.js
index f14c6bf..2c9ede6 100644
--- a/guacamole-common-js/src/main/webapp/modules/Display.js
+++ b/guacamole-common-js/src/main/webapp/modules/Display.js
@@ -423,7 +423,7 @@ Guacamole.Display = function() {
 
             // Fire cursor change event
             if (guac_display.oncursor)
-                guac_display.oncursor(cursor.getCanvas(), hotspotX, hotspotY);
+                guac_display.oncursor(cursor.toCanvas(), hotspotX, hotspotY);
 
         });
     };


[4/4] incubator-guacamole-client git commit: Merge 0.9.12-incubating changes back to master.

Posted by jm...@apache.org.
Merge 0.9.12-incubating changes back to master.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/25b9425e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/25b9425e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/25b9425e

Branch: refs/heads/master
Commit: 25b9425eda0e9eb14e0cd41ff6970af257facb36
Parents: 865ec19 4a0de7f
Author: James Muehlner <ja...@guac-dev.org>
Authored: Tue Mar 7 17:11:41 2017 -0800
Committer: James Muehlner <ja...@guac-dev.org>
Committed: Tue Mar 7 17:11:41 2017 -0800

----------------------------------------------------------------------
 .../src/main/webapp/modules/Display.js          |  2 +-
 .../src/main/webapp/modules/Layer.js            | 34 ++++++++++++++++++--
 2 files changed, 32 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[3/4] incubator-guacamole-client git commit: GUACAMOLE-230: Merge mouse cursor size fix.

Posted by jm...@apache.org.
GUACAMOLE-230: Merge mouse cursor size fix.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/4a0de7fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/4a0de7fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/4a0de7fc

Branch: refs/heads/master
Commit: 4a0de7fcc2c090c94ba7c4113e3783a9a7aeb9c2
Parents: 6bcb983 69ff583
Author: James Muehlner <ja...@guac-dev.org>
Authored: Tue Mar 7 17:09:25 2017 -0800
Committer: James Muehlner <ja...@guac-dev.org>
Committed: Tue Mar 7 17:09:25 2017 -0800

----------------------------------------------------------------------
 .../src/main/webapp/modules/Display.js          |  2 +-
 .../src/main/webapp/modules/Layer.js            | 34 ++++++++++++++++++--
 2 files changed, 32 insertions(+), 4 deletions(-)
----------------------------------------------------------------------