Loading ...
Sorry, an error occurred while loading the content.

2416Re: [ydn-javascript] research: why YUI dragdrop is so slow

Expand Messages
  • Peter Michaux
    Jun 19, 2006
    • 0 Attachment
      Adam,

      Any luck with this?

      Thanks,
      Peter

      On 6/16/06, Peter Michaux <petermichaux@...> wrote:
      > On 6/16/06, Adam Moore <adamoore@...> wrote:
      > >
      > > On Fri, Jun 16, 2006 at 08:06:24AM -0700, Peter Michaux wrote:
      > > > Hi,
      > > >
      > > > I spent some time trying to pin down exactly why the Yahoo! UI
      > > > dragdrop library is so slow for me during the drag. I think it is the
      > > > use of YAHOO.util.Dom.setXY().
      > >
      > >
      > > Peter, thanks for drilling into this. Originally drag and drop did not rely
      > > on setXY, but was later updated to use it in order to benefit from the
      > > accuracy it provides. While setXY can't be replaced, we should be able to
      > > improve the performance by caching the initial position produced by setXY and
      > > using that value to set the position directly during the drag. I am
      > > investigating incorporating this change for the 0.11 release.
      >
      > Adam, I like your solution idea. I tried it and it works fine except I
      > get a gnarly flicker in Safari and Firefox when I setXY in the
      > mousedown handler. In the handler I've tried the following. The Dom
      > line causes the flicker.
      >
      > this.initialPageX = YAHOO.util.Event.getPageX(event);
      > this.initialPageY = YAHOO.util.Event.getPageY(event);
      >
      > YAHOO.util.Dom.setXY(this.element, YAHOO.util.Dom.getXY(this.element));
      >
      > this.initialLeft = parseInt(this.element.style.left.split("px", 1), 10);
      > this.initialTop = parseInt(this.element.style.top.split("px", 1), 10);
      >
      >
      > Here is the new example
      >
      > http://peter.michaux.ca/examples/yui-dragdrop-v0_10-performance/with-setXY-new.html
      >
      > Peter
      >
    • Show all 15 messages in this topic