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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:26:00+00:00 2026-06-11T22:26:00+00:00

Hi I am following this tutorial found on this page: http://net.tutsplus.com/tutorials/javascript-ajax/an-introduction-to-the-raphael-js-library/ Here is the

  • 0

Hi I am following this tutorial found on this page:
http://net.tutsplus.com/tutorials/javascript-ajax/an-introduction-to-the-raphael-js-library/

Here is the code I am testing:

window.onload = function() {
var paper = new Raphael(document.getElementById('canvas_container'), 500, 500);
var tetronimo = paper.path("M 250 250 l 0 -50 l -50 0 l 0 -50 l -50 0 l 0 50 l -50 0 l 0 50 z");
tetronimo.attr(
    {
        gradient: '90-#526c7a-#64a0c1',
                    rotation: -90,
        stroke: '#3b4449',
        'stroke-width': 10,
        'stroke-linejoin': 'round'
    }
);

tetronimo.animate({rotation: 360, 'stroke-width': 1}, 2000, 'bounce', function() {
/* callback after original animation finishes */
this.animate({
    rotation: -90,
    stroke: '#3b4449',
    'stroke-width': 10
}, 1000);
    });

}

The animation works for the stroke width, but not for the rotation. After some research, I found out that the “rotation” attribute is no longer supported in version 2. So I have two options:

1) Figure out an alternate way to reach the same goal

2) Find a copy of the Raphael V1 library

Can anyone help me with any of those options (my preference would go for option 1).

Thanks!

  • 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-11T22:26:01+00:00Added an answer on June 11, 2026 at 10:26 pm

    You need to use transform method now in v2. Its not too different, see this fiddle:

    http://jsfiddle.net/58yqW/3/

        var paper = new Raphael(document.getElementById('canvas'), 500, 500);
        var tetronimo = paper.path("M 250 250 l 0 -50 l -50 0 l 0 -50 l -50 0 l 0 50 l -50 0 l 0 50 z");
        tetronimo.attr(
          {
            gradient: '90-#526c7a-#64a0c1',
            'transform':"r-90",
            stroke: '#3b4449',
            'stroke-width': 10,
            'stroke-linejoin': 'round'
          }
        );
    
        tetronimo.animate({'transform':"r360", 'stroke-width': 1}, 2000, 'bounce',       function() {
        this.animate({
            'transform':"r-90",
            stroke: '#3b4449',
            'stroke-width': 10
           }, 1000);
        });
    

    I don’t know the exact requirements of your animation, but you can see that is does rotate etc. One thing to note is that you can use R-90 and r-90, review the docs for element transform.

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

Sidebar

Related Questions

I am following the tutorial i found in this page http://javahunter.wordpress.com/2010/09/25/integrating-captcha-in-jsf-2-0/ to integrate a
Following this tutorial (http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/handling-concurrency-with-the-entity-framework-in-an-asp-net-mvc-application), I learned how to save data and do concurrency checks
I'm following this tutorial http://www.gamedev.net/page/resources/_/technical/game-programming/how-to-load-a-bitmap-r1966 and I got the problem of wrong value for
i'm following this tutorial: http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide and downloading my own source of mod_wsgi. The problem
I was following this tutorial: http://www.vogella.com/articles/AndroidLocationAPI/article.html --> Paragraph 6.0 Problem: My emulator runs perfectly
I'm following this tutorial for twitter4j: http://www.javacodegeeks.com/2011/10/java-twitter-client-with-twitter4j.html and I've gotten almost everything right. All
I'm following this tutorial: http://developer.android.com/training/basics/firstapp/running-app.html#Emulator In it there is a simple code for a
I'm using Ubuntu 10, python 2.6.5 I'm following this tutorial: http://www.djangobook.com/en/2.0/chapter02 I followed all
I've been following this great tutorial: http://buildmobile.com/twitter-in-a-windows-phone-7-app/#fbid=o0eLp-OipGa But it seems that the pin extraction
I configured a jail with Chroot in SSH following this tutorial . I found

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.