For "spiral" checking, I had originally thought it might be easy  
enough with a NodeList, as it's dynamically updated as the DOM  
changes; but, I don't think there's a way to create one with  
arbitrary nodes.  There is also compareDocumentPosition(), but it's  
DOM Level-3, so I don't know what browser support is like.  
DocumentRanges might be useful too.

http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-536297177    
[NodeList]
http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3- 
compareDocumentPosition
http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html

The crux of the problem is having a fast way of comparing document  
order (which is also key to Ryan's overlap concerns).


TAG

Other interesting links:
[1] PPK http://www.quirksmode.org/blog/archives/2006/01/ 
contains_for_mo.html
[2] A couple of implementations for HTMLElement.prototype.contains().  
Might be worth adding to the Prototype core.
http://codingforums.com/archive/index.php?t-16823.html


On Feb 26, 2007, at 10:28 PM, Jean-Philippe Encausse wrote:

>
> Where should I hook in the code ?
>
> I think I should override the drop array by a custom sorted array and
> override show() function that seems to do the "search work" ?
>
> How to cache by coordiante ? Is there a known algorithm to retrive an
> object from it's closest coordinate x,y ? Seems complicated ?
>
> "spiral" checking like Tom explains seems also complicated because
> using the DOM to find closest object may take time
>
> Any suggestion ?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to