mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Added busy handlers for layer, implemented ready instruction handling in client
This commit is contained in:
@@ -68,7 +68,9 @@ function Layer(width, height) {
|
||||
|
||||
resize(width, height);
|
||||
|
||||
var busyHandler = null;
|
||||
var readyHandler = null;
|
||||
|
||||
var updates = new Array();
|
||||
var autosize = 0;
|
||||
|
||||
@@ -131,6 +133,10 @@ function Layer(width, height) {
|
||||
readyHandler = handler;
|
||||
};
|
||||
|
||||
display.setBusyHandler = function(handler) {
|
||||
busyHandler = handler;
|
||||
};
|
||||
|
||||
|
||||
display.drawImage = function(x, y, image) {
|
||||
reserveJob(function() {
|
||||
@@ -141,6 +147,11 @@ function Layer(width, height) {
|
||||
|
||||
|
||||
display.draw = function(x, y, url) {
|
||||
|
||||
// If about to become busy, call busy handler
|
||||
if (display.isReady() && busyHandler != null)
|
||||
busyHandler();
|
||||
|
||||
var update = reserveJob(null);
|
||||
|
||||
var image = new Image();
|
||||
|
Reference in New Issue
Block a user