From 7a7901d18fde6591ed91ef0ca8dcfe5c7ccc7556 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 16 Jan 2014 01:17:15 -0800 Subject: [PATCH] Fix distort instruction (called transform() on wrong object). Store matrix. --- .../src/main/webapp/modules/Client.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/guacamole-common-js/src/main/webapp/modules/Client.js b/guacamole-common-js/src/main/webapp/modules/Client.js index f4b732ba3..3ca45249f 100644 --- a/guacamole-common-js/src/main/webapp/modules/Client.js +++ b/guacamole-common-js/src/main/webapp/modules/Client.js @@ -752,10 +752,8 @@ Guacamole.Client = function(tunnel) { // Only valid for visible layers (not buffers) if (layer_index >= 0) { - // Get container element - var layer_container = getLayerContainer(layer_index).getElement(); - // Set layer transform + var layer_container = getLayerContainer(layer_index); layer_container.transform(a, b, c, d, e, f); } @@ -1391,6 +1389,16 @@ Guacamole.Client.LayerContainer = function(index, width, height) { */ this.z = 0; + /** + * The affine transformation applied to this layer container. Each element + * corresponds to a value from the transformation matrix, with the first + * three values being the first row, and the last three values being the + * second row. There are six values total. + * + * @type Number[] + */ + this.matrix = [1, 0, 0, 1, 0, 0]; + /** * The width of this layer in pixels. * @type Number @@ -1585,6 +1593,9 @@ Guacamole.Client.LayerContainer = function(index, width, height) { */ this.transform = function(a, b, c, d, e, f) { + // Store matrix + layer_container.matrix = [a, b, c, d, e, f]; + // Generate matrix transformation matrix =