Note that there are some explanatory texts on larger screens.

plurals
  1. POGWT 2.4 HTML 5 drag and drop APIS - change cursor while dragging
    primarykey
    data
    text
    <p>I'm using GWT 2.4 Drag and Drop API to drag elements for data transfer between widgets. Implementing the Drag and Drop behaviour was straight forward but I'm having problems changing the cursor while dragging an element. I've done a bit of research and I've found a few articles on how I could achieve this.</p> <p>This article <a href="http://blog.vjeux.com/2012/css/css-cross-browser-drag-cursor.html" rel="nofollow noreferrer">http://blog.vjeux.com/2012/css/css-cross-browser-drag-cursor.html</a> suggests that it can be done by setting the <strong>cursor</strong> property to whichever acceptable value we would want. I've tried (<strong>cursor: -webkit-drag; or cursor: move;</strong>) on the element to be dragged or the element where an element can be dropped but only added a small image to the bottom right of the cursor icon.</p> <p>Took a look at this <a href="http://www.html5rocks.com/en/tutorials/dnd/basics/" rel="nofollow noreferrer">http://www.html5rocks.com/en/tutorials/dnd/basics/</a>, it is said that the cursor(effect) can be changed when dragging or dropping by setting <strong>effectAllowed</strong> and <strong>dropEffect</strong> from the <strong>dataTransfer</strong> object. Despite the GWT Drag and Drop API not exposing none of these properties, I can set them through <strong>JSNI</strong> yet the effect was the same as before (with CSS).</p> <p>I've found these questions <a href="https://stackoverflow.com/questions/10119514/html5-drag-drop-change-icon-cursor-while-dragging">HTML5 Drag &amp; Drop Change icon/cursor while dragging</a> and <a href="https://stackoverflow.com/questions/8459838/changing-mouse-cursor-for-html5-drag-drop-files-gmail-drag-drop">Changing Mouse Cursor for HTML5 Drag Drop Files (GMail Drag Drop)</a> on the same subject but none seemed to help to actually change/replace the icon while dragging.</p> <p>Any help is appreciated.</p> <p>Test environment:</p> <p>Ubuntu 12.04.1 Chrome 22</p> <p>Cheers,</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload