diff options
-rw-r--r-- | gmap_arcgis.js | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js index 9303c8f..715aeb0 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -32,12 +32,18 @@ function gmapArcgis(config) { // UI unblocker wrapper unblockUI: function() { - jQuery.unblockUI(); + if (window.ui == undefined || window.ui == 'blocked') { + jQuery.unblockUI(); + window.ui = 'unblocked'; + } }, // UI blocker wrapper blockUI: function(params) { - this.config.ui = 'blocked'; + if (window.ui == undefined || window.ui == 'unblocked') { + jQuery.blockUI(params); + window.ui = 'blocked'; + } }, // Block the UI and show an overlay @@ -58,14 +64,16 @@ function gmapArcgis(config) { if (t == false) { this.blockUI({ - message: message, - css: css, + message: message, + css: css, + onUnblock: this.unBlockUI, }); } else { this.blockUI({ - message: message, - css: css, - timeout: t, + message: message, + css: css, + timeout: t, + onUnblock: this.unBlockUI, }); } } |