mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
Fix reset() to properly reset EVERYTHING.
This commit is contained in:
@@ -72,6 +72,7 @@ Guacamole.Layer = function(width, height) {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
var displayContext = display.getContext("2d");
|
var displayContext = display.getContext("2d");
|
||||||
|
displayContext.save();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The queue of all pending Tasks. Tasks will be run in order, with new
|
* The queue of all pending Tasks. Tasks will be run in order, with new
|
||||||
@@ -89,6 +90,10 @@ Guacamole.Layer = function(width, height) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of states on the state stack.
|
* The number of states on the state stack.
|
||||||
|
*
|
||||||
|
* Note that there will ALWAYS be one element on the stack, but that
|
||||||
|
* element is not exposed. It is only used to reset the layer to its
|
||||||
|
* initial state.
|
||||||
*/
|
*/
|
||||||
var stackSize = 0;
|
var stackSize = 0;
|
||||||
|
|
||||||
@@ -788,16 +793,13 @@ Guacamole.Layer = function(width, height) {
|
|||||||
|
|
||||||
// Clear stack
|
// Clear stack
|
||||||
while (stackSize > 0) {
|
while (stackSize > 0) {
|
||||||
displaycontext.restore();
|
displayContext.restore();
|
||||||
stackSize--;
|
stackSize--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear transform
|
// Restore to initial state
|
||||||
displayContext.setTransform(
|
displayContext.restore();
|
||||||
1, 0, 0,
|
displayContext.save();
|
||||||
0, 1, 0
|
|
||||||
/*0, 0, 1*/
|
|
||||||
);
|
|
||||||
|
|
||||||
// Clear path
|
// Clear path
|
||||||
displayContext.beginPath();
|
displayContext.beginPath();
|
||||||
|
Reference in New Issue
Block a user