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

  • SEARCH
  • Home
  • 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 7790437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:35:14+00:00 2026-06-01T21:35:14+00:00

We have an online designer that uses Raphael to manipulate SVGs. We’re preparing a

  • 0

We have an online designer that uses Raphael to manipulate SVGs. We’re preparing a large library of clip art to use for this, but have run into a very strange problem.

Some of the SVGs are running into a problem where they render fine in a browser, but once we pull them into Raphael they become completely unrecognizable.

Here’s an image showing the effect:
enter image description here

And here’s the code for the svg (generated by an illustrator export from a .ai file):

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     width="100px" height="83.641px" viewBox="0 0 100 83.641" enable-background="new 0 0 100 83.641" xml:space="preserve">
<polygon points="58.263,0.056 100,41.85 58.263,83.641 30.662,83.641 62.438,51.866 0,51.866 0,31.611 62.213,31.611 30.605,0 
    58.263,0.056 "/>
</svg>
  • 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-01T21:35:16+00:00Added an answer on June 1, 2026 at 9:35 pm

    Appears that your process for importing files into a path might be flawed, or, some unaccounted-for transformations have been applied. For example, this code works fine:

    var paper = Raphael("paper");
    paper.path(
        "M58.263,0.056 L100,41.85 L58.263,83.641 L30.662,83.641 " +
        "L62.438,51.866 L0,51.866 L0,31.611 L62.213,31.611 30.605,0"
    ).attr( { 'fill': 'black' } );
    

    See http://jsfiddle.net/sgMH6/

    How do you “pull” these files into Raphael? What’s your process/code for that?

    Edit: more information; import plugin is https://github.com/wout/raphael-svg-import/blob/master/raphael-svg-import.js

    It appears that the plugin you’re using might have a faulty polygon implementation routine. This is a hunch, but, seems like 0 numbers are not being processed correctly. Your SVG graphic does contain some zero coordinates.

    In function Raphael.fn.polygon, there is a section that goes like this:

         var d = parseFloat(c[j]);
         if (d)
           poly.push(d);
    

    If you change that to this, instead, it might work for you:

        var d = parseFloat(c[j]);
        if (!d) d = 0;
        poly.push(d);
    

    This is a very rudimentary fix and it might possibly break other things. At any rate, take a look at a working example with a modified plugin fix – http://jsfiddle.net/pkzGJ/ ; if this is indeed a bug, you should submit it to the plugin author.

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

Sidebar

Related Questions

We have online SharePoint site and we want to use tool or any way
I have an online service which uses a java applet to perform client side
I have looked online and i havent been able to fix a problem that
I have searched online for a solution, but have yet to find one that
Many poeple have online startups in their head that may potentially attracts millions, but
I have designed a new web site. I have hosted it online. I want
I have a online shopping cart, at checkout user enters his zipcode. There are
I have an online text editor, very well made however it does not currently
I have searched online but all the answers I have found were very primitive.
I have an online registry of professionals with about 300 members. These are smart

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.