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

Re: [ydn-javascript] Serious Performance Issues with DragDrop+Tooltip Combo

Expand Messages
  • Matt Warden
    ... Steven, A good thought. I added code in startDrag and endDrag to set preventdefault to false and increase the showdelay to a large number, and then restore
    Message 1 of 3 , Jun 1, 2006
    • 0 Attachment
      On 6/1/06, Steven Peterson <peterson@...> wrote:

      Matt,

       

      Perhaps you can trap the fact that you're in the process of dragging your context element, detect that in some custom code in preventOverlap, and keep the repositioning logic from happening? You might be able to use this idea as the basis for something that might work for you.


      Steven,

      A good thought. I added code in startDrag and endDrag to set preventdefault to false and increase the showdelay to a large number, and then restore original values after the drag. This drastically improves performance during a drag.

      However, I noticed that I still get the 'too much recursion' error even when I simply mouseover the draggable context element for a few seconds. Again, all of this goes away when i set preventoverlap to false.

      I looked into it a little further, and the onContextMouseOver function resets the xy config variables which then fire moveEvent which then fire preventOverlap. This happens with every mouse move (I think), not just mouse enter. This doesn't seem necessary; am I correct? Would it be sufficient to simply fire the event when the mouse enters the region of the context element for the first time (or, alternatively, for preventoverlap to only listen to the event the first time)? And, if so, is the best way to do this to keep a state variable like 'firemouseover' or 'dopreventoverlap', where if true would fire the event (or execute preventoverlap) and then set the state to false, and then set to true on mouseout?

      Thanks for the help. I know you guys are busy.

      --
      Matt Warden
      Oxford, OH, USA
      http://mattwarden.com


      This email proudly and graciously contributes to entropy.
    Your message has been successfully submitted and would be delivered to recipients shortly.