Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9006707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:29:05+00:00 2026-06-16T01:29:05+00:00

I have got multiple elements in my canvas. I want to find all elements

  • 0

I have got multiple elements in my canvas. I want to find all elements that are intersecting/overlapping currently chosen element.

Is there a way to find this out in raphael Js???

EDIT
To clarify further, lets suppose I get an element by getByID(), is there a way for me to get ALL elements(that are already present in canvas) that intersect with it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:29:06+00:00Added an answer on June 16, 2026 at 1:29 am

    Thought a little bit more and I think the best solution should be converting the elements into paths and then comparing if they are intersecting. (I have used jQuery in my example, but ou can easily do it without jQuery).

    intersectArray=new Array();  
    paper.forEach(function (e) {
        isIntersection=Raphael.pathIntersection(currentElement.attr("path"), e.attr("path"));  //Need to check with currentElement
        if(!jQuery.isEmptyObject(isIntersection)) intersectArray[]=e.node.id; //assuming e has got ID. You can put any identifier for e.
    }
    

    I dont think that for rect and circle you can get a path. But it is pretty easy to write a function for converting rect into path (since you know x,y all you need to do is add combination of width and Height). For circle use this link.

    I was hoping to get a function embedded in Raphael that could do this, but as Joker said “Can’t rely on anyone these days, you have to do everything yourself, don’t we!”. Just Kidding. RaphaelJs is damn neat.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have got an NSString *str = @12345.6789 and want to find out if there
I've got a multiple select that I want to use to pick which elements
I have got the requirement to find the core file in multiple box/machine and
I've got this HTML form where I have multiple input elements: text, radio, and
I have got multiple textfield on a formsheet view. I want to append them
I have got a single file in which I need specify classes in multiple
I have got access_token. Using zend framework. I have obtained token for multiple permissions.
i've got a SQL query which returns multiple rows, and i have : $data
I've got a table with multiple <tbody> elements. At a given time, only one
I have got multiple children which I display in a grid. 4 children fits

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.