You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2019/11/21 20:07:09 UTC

[royale-asjs] branch develop updated: initial JS implementation of busy cursor. Should fix #568

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 032b42e  initial JS implementation of busy cursor.  Should fix #568
032b42e is described below

commit 032b42e807db6ff1e32e5fab4c147fb78a6d6e0c
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Nov 21 12:06:45 2019 -0800

    initial JS implementation of busy cursor.  Should fix #568
---
 .../src/main/royale/mx/managers/CursorManager.as   | 10 ++++++++-
 .../src/main/royale/mx/rpc/remoting/Operation.as   | 25 +++++++++++-----------
 2 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/CursorManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/CursorManager.as
index 9c2037c..5f37894 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/CursorManager.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/CursorManager.as
@@ -408,6 +408,10 @@ public class CursorManager
      */
     public static function setBusyCursor():void 
     {
+        COMPILE::JS
+        {
+            document.body.style.cursor = "wait";        
+        }
         // impl.setBusyCursor();
     }
 
@@ -425,7 +429,11 @@ public class CursorManager
      */
     public static function removeBusyCursor():void 
     {
-        impl.removeBusyCursor();
+        COMPILE::JS
+        {
+            document.body.style.cursor = "auto";        
+        }
+        //impl.removeBusyCursor();
     }
             
     
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/Operation.as b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/Operation.as
index f10dcee..b86d273 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/Operation.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/Operation.as
@@ -20,6 +20,7 @@
 package mx.rpc.remoting
 {
 import mx.core.mx_internal;
+import mx.managers.CursorManager;
 import mx.messaging.events.MessageEvent;
 import mx.messaging.messages.AsyncMessage;
 import mx.messaging.messages.IMessage;
@@ -283,10 +284,10 @@ public class Operation extends AbstractOperation
      */
     override public function cancel(id:String = null):AsyncToken
     {
-        // if (showBusyCursor)
-        // {
-//            CursorManager.removeBusyCursor();
-        // }
+        if (showBusyCursor)
+        {
+            CursorManager.removeBusyCursor();
+        }
         return super.cancel(id);
     }
 
@@ -298,10 +299,10 @@ public class Operation extends AbstractOperation
 
     override mx_internal function invoke(message:IMessage, token:AsyncToken = null):AsyncToken
     {
-        // if (showBusyCursor)
-        // {
-//            CursorManager.setBusyCursor();
-        // }
+        if (showBusyCursor)
+        {
+            CursorManager.setBusyCursor();
+        }
 
         return super.invoke(message, token);
     }
@@ -311,10 +312,10 @@ public class Operation extends AbstractOperation
      */
     override mx_internal function preHandle(event:MessageEvent):AsyncToken
     {
-        // if (showBusyCursor)
-        // {
-//            CursorManager.removeBusyCursor();
-        // }
+        if (showBusyCursor)
+        {
+            CursorManager.removeBusyCursor();
+        }
 
         var wasLastCall:Boolean = activeCalls.wasLastCall(AsyncMessage(event.message).correlationId);
         var token:AsyncToken = super.preHandle(event);