W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: Question about implementing DataTransfer.addElement

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 10 Oct 2011 23:15:58 +0000 (UTC)
To: Daniel Cheng <dcheng@chromium.org>
cc: public-webapps <public-webapps@w3.org>
Message-ID: <Pine.LNX.4.64.1110102314360.20981@ps20323.dreamhostps.com>
On Mon, 10 Oct 2011, Daniel Cheng wrote:
> On Mon, Oct 10, 2011 at 15:26, Ian Hickson <ian@hixie.ch> wrote:
> > 
> > The parenthetical isn't the important part (that's why it's 
> > parenthetical). The important difference between setDragImage() and 
> > addElement() is that the latter automatically generates the image 
> > based on the current rendering of the elements added whereas the 
> > former uses the exact specified image. So for example if the user is 
> > dragging an element with some complicated CSS styles, that's what gets 
> > drawn with addElement(), whereas the author has no sane way of 
> > providing an image that contains equivalent pixels.
> It seems like setDragImage() does that as well:
> > If the element argument is an img element, then set the drag data 
> > store bitmap to the element's image (at its intrinsic size); 
> > otherwise, set the drag data store bitmap to an image generated from 
> > the given element (the exact mechanism for doing so is not currently 
> > specified).
> Doesn't the otherwise clause describe exactly what addElement() does?

Ah, indeed. I forgot about that.

I guess the difference then is just that addElement() lets you add 
multiple elements, but that's not a particularly great difference. If 
nobody implements it, or if people who implement it don't mind dropping 
it, we can drop it from the spec entirely.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 10 October 2011 23:19:35 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC