javascript - Get all Elements touching a rectangle -


I need to get all the elements whose bound rectangle has some arbitrary rectangle of my selection. I do not have a way to do this basically, and my best solution so far is to call a representative sample of the number within the rectangle, which is far from the correct, because it can remember the elements.

This is a performance nightmare that is going on every point in the rectangle, and therefore is not an option. Even if this is possible, then I do not think the elements are width: 0; Height: 0 , although this is not a huge concern for me.

I have the idea that how to reduce negative negatives by using the method of multiple points, but is that an real solution?

  1. Get for each element Touch your rectangle.
  2. For each element, check if there is a border rectangle and your rectangular intersection.

    If you have too many elements, and you can make assumptions such that the binding sequences of child elements of an element are always contained in the bounding text of the element, then some customization possible Are there. Or when elements are ordered in a particular way, but if any condition is possible for any HTML element, as is the CSS permission, you have to check them all.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -