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

Re: Question about implementing DataTransfer.addElement

From: Daniel Cheng <dcheng@chromium.org>
Date: Mon, 10 Oct 2011 15:55:58 -0700
Message-ID: <CAF3XrKrmyPEQQMJ3s7QU6Q-tO6iD8Uze=d9n1gROd1KaRz1JKQ@mail.gmail.com>
To: Charles Pritchard <chuck@jumis.com>
Cc: Ian Hickson <ian@hixie.ch>, public-webapps <public-webapps@w3.org>
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.
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

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?

Received on Monday, 10 October 2011 22:56:35 UTC

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