mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Synchronize layers properly in copy.
This commit is contained in:
@@ -246,8 +246,8 @@ Guacamole.Layer = function(width, height) {
|
|||||||
function scheduleTask(handler, blocked) {
|
function scheduleTask(handler, blocked) {
|
||||||
|
|
||||||
// If no pending tasks, just call (if available) and exit
|
// If no pending tasks, just call (if available) and exit
|
||||||
if (layer.isReady() && !blocked && handler != null) {
|
if (layer.isReady() && !blocked) {
|
||||||
handler();
|
if (handler) handler();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -382,10 +382,9 @@ Guacamole.Layer = function(width, height) {
|
|||||||
*
|
*
|
||||||
* @param {function} handler The function to call once all currently
|
* @param {function} handler The function to call once all currently
|
||||||
* pending operations are complete.
|
* pending operations are complete.
|
||||||
|
* @param {boolean} blocked Whether the task should start blocked.
|
||||||
*/
|
*/
|
||||||
this.sync = function(handler) {
|
this.sync = scheduleTask;
|
||||||
return scheduleTask(handler);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy a rectangle of image data from one Layer to this Layer. This
|
* Copy a rectangle of image data from one Layer to this Layer. This
|
||||||
|
Reference in New Issue
Block a user