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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:34:30+00:00 2026-06-07T10:34:30+00:00

I have this piece of code ( on jsfiddle ) var paper = new

  • 0

I have this piece of code (on jsfiddle)

var paper = new Raphael('holder', 400, 100);

var set = paper.set();

for(var i = 0; i < 10; i++) {
    var circle = paper.circle((i * 30) + 30, 20, 5);
    circle.attr({ fill: '#ff0' });
    circle.animate(Raphael.animation({ transform: 's2,2' }, 2000).repeat('Infinity'));

    set.push(circle);
}

set.hover(function() {
    set.pause();
}, function() {
    set.resume(); // <- things get nasty here
});​

Now when the mouse enters the set, set.pause() is called correctly and all animations stop.
But when leaving the hover area it doesn’t resume the animation(s), instead I get following error in the console:

Uncaught TypeError: Cannot read property ‘transform’ of undefined

I have no idea why this happens; is anybody able to help?

  • 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-07T10:34:31+00:00Added an answer on June 7, 2026 at 10:34 am

    On Safari/Firefox, after some time after hovering out, I received this error message (using the uncompressed source at https://raw.github.com/DmitryBaranovskiy/raphael/master/raphael.js ):

    `raphael.js`, line 2946: `e.totalOrigin is undefined`
    

    The only place where totalOrigin is set is the runAnimation function:

    line 3072: function runAnimation(anim, element, percent, status, totalOrigin, times) {
    

    Your code calls first elproto.pause() (line 3352), then elproto.resume() (line 3361). pause() sets the paused property to true, resume() deletes this property. But resume also calls the status() method right after deleting the paused flag:

    var e = animationElements[i];
    if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) {
        delete e.paused;
        this.status(e.anim, e.status);
    }
    

    The strange, work-in-progress elproto.status method (line 3323) is only called by elproto.setTime() and elproto.resume(). This function constructs some complex return value, but no active code uses its return value, only the commented out lines starting at line 2980.

    This function also calls the runAnimation function, if it has a value parameter:

     runAnimation(anim, this, -1, mmin(value, 1)     );
              totalOrigin should be passed here! ^^^
    

    Unfortunately, it doesn’t pass anything for totalOrigin, and this is the cause of the bug.

    I tried adding a totalOrigin parameter based on line 3312:

     runAnimation(anim, this, -1, mmin(value, 1), this.attr());
    

    While it seems to work, it goes buggy.

    As a second attempt, I commented out the whole line:

     // runAnimation(anim, this, -1, mmin(value, 1));
    

    Result: it works, but the timing is wrong, probably the animation start time should be updated somewhere.

    http://jsfiddle.net/7nGcR/26/
    https://raw.github.com/gist/3067995/1e82de48eeacf98697b572efdc74c11a9b1d9d03/gistfile1.js

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

Sidebar

Related Questions

I have this piece of code var f = function() { this.x = 100;
I have this piece of code List<Class<? extends SubApplication>> appClasses = new ArrayList<Class<? extends
I have this piece of code: $(document).on(click, #breadNavMain, function() { for(var i = 0;
I have this piece of code: var arrayParamaters = sParameters[split](|); I want to find
I have this piece of code: $(#faq).click(function () { var url = $.get(faq, {
I have this piece of code: var myObj = function () { this.complex =
I have this piece of code in a stored procedure: BEGIN SET @UserId =
I have this piece of code which works in Firefox link = $('<a>link</a>'); var
I have this piece of code: EventSnapshot snapshotEvent = new EventSnapshot(); EventSnapshot currentEvent =
I have this piece of code: listTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) {

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.