3 Replies Latest reply on May 17, 2018 11:01 AM by Loic.Aigon

    Drag and Drop Ghost Image

    Vlaak Level 1

      Hey all, I can drag and drop an image from my extension to the active document in Illustrator. This works, however, while dragging through the extension itself, the mouse cursor doesn't change to show the dragged object (I think this is called a ghost image?). You cant even tell you're dragging until your mouse icon enters Illustrator and the cursor changes to show a little green + symbol.

       

      When I run my extension in Chrome, and I try to drag an image, I do see the cursor change to show the item I'm dragging.


      What can be done to make my extension, and even better, Illustrator itself, show the dragged item during the drag (ie. to change the cursor to a drag cursor with the ghost image)?

       


      Any ideas?

       

       

      Thanks,

      Marshall

        • 1. Re: Drag and Drop Ghost Image
          Loic.Aigon Adobe Community Professional

          You should be able to change cursor look with html/js

          cursor | CSS-Tricks

           

          However, chances are that at teh very moment the cursor exits the CEP panel and enters AI's UI, the cursor comes back to [whatever active tool you have] cursor because it's dealt internally and I don't think you can change that at a scripting level unless I am wrong.

          1 person found this helpful
          • 2. Re: Drag and Drop Ghost Image
            Vlaak Level 1

            Thanks for the advice. This didn't work unfortunately. I am able to change the cursor but it only changes for a split second then goes back to the basic cursor. I'm going to fool around with it a bit more. There might be something else in my code which is blocking this functionality.

            • 3. Re: Drag and Drop Ghost Image
              Loic.Aigon Adobe Community Professional

              Might also be some conflict between illy internal cursor management and cep layer.

              those kind of grey areas where you a bit helpless.

              however I thought i saw this working at least inside cep.