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 6947921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:45:18+00:00 2026-05-27T13:45:18+00:00

I have a fairly large map consisting of Raphael paths which im trying to

  • 0

I have a fairly large map consisting of Raphael paths which im trying to make accessible to some jquery ajax scripts to be populated. I’ve tried to add an ID or anything to make it accessible from jquery in an organized fashion.

As im new to Raphael I cant figure out a good way of achieving this.
I’ve tried using .data() to add an ID for each dot with say “seat_1″,”seat_2” and so on but been unsuccessful so far.

how would I go about organizing this code so I could manipulate it by looping?
I realize that its a fairly open ended question but any suggestion is much appreciated

Demo here: http://www.sam-sys.in/demo/pushparaj/ticketreservation/?page_id=203

var path_gs = rsr.path("M5.834,698.336c-3.217,0-5.833,2.615-5.833,5.831 c0,3.215,2.616,5.833,5.833,5.833c3.219,0,5.835-2.618,5.835-5.833C11.669,700.951,9.053,698.336,5.834,698.336"); 
path_gs.attr({"clip-path": 'url(#SVGID_2_)',fill: '#777675',parent: 'group_a','stroke-width': '0','stroke-opacity': '1'}).data('id', 'path_gs');

which generates

<path style="stroke-opacity: 1; " fill="#008000" stroke="#000000" d="M5.834,698.336C2.6169999999999995,698.336,0.0009999999999994458,700.951,0.0009999999999994458,704.167C0.0009999999999994458,707.3820000000001,2.6169999999999995,710,5.834,710C9.052999999999999,710,11.669,707.382,11.669,704.167C11.669,700.951,9.053,698.336,5.834,698.336" stroke-width="0" stroke-opacity="1"></path>
  • 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-05-27T13:45:18+00:00Added an answer on May 27, 2026 at 1:45 pm

    Well, the way I’m doing this is the following. First I write all the paths in an object, for example:

    var paths = {
        path1: 'the paths coordinates',
        path2: 'the paths coordinates',
        path3: 'the paths coordinates',
    }
    

    Then you just loop trough all the paths, seting the coordinates for each path and giving them an ID (this is an internal Raphael’s ID):

    for(path in paths){
       var newpath = paper.path(paths[path]);
       newpath.attr({options})
       newpath.id = path;
    }
    

    Now, if you want to get one of this elements you can use the next Raphael feature:

    var thisPath = paper.getById('path1');
    

    This way you can use the path on any of the Raphael methods. So, if you need to get the node in the dome you can do the following:

    var node = thisPath.node
    

    But if you need to animate the path, you better use the Raphael’s animate method, or if you need to change attibutes the attr method.

    thisPath.animate(.....)
    

    If you need to apply some change to all the paths, you can use:

    paper.forEach(function(thisArg))
    

    you need to pass the function to run on each element and thisArg reference the element on each iteration

    And maybe you want to take a look to the Raphael’s sets wich can be useful for use methods on groups of elements. If you need any help using this features just let me know and I’ll do my best to help you out. Bye!

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

Sidebar

Related Questions

We have fairly large C++ application which is composed of about 60 projects in
We have a fairly large SVN repository which we are looking to migrate to
I have a fairly large (new) project in which we have annotated many domain
I have a fairly large MVC3 application, of which I have developed a small
I have a fairly large C++ project, and am trying to use the debugger
I have a fairly large, three level deep, menu consisting of nested lists like
I have a fairly large ivy.xml containing a number of configurations which are the
I have a fairly large text file from which I need to extrapolate a
I have recently started a fairly large web project which is going to use
I have fairly large set of data returned via AJAX from a page. This

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.