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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:34:42+00:00 2026-06-12T04:34:42+00:00

Note: Please see demo code here: http://jsfiddle.net/ginja/5yp7D/ I have a set of objects that

  • 0

Note: Please see demo code here: http://jsfiddle.net/ginja/5yp7D/

I have a set of objects that I rotate on the click of the blue square, which works fine. Each object in the set has a hover event attached that causes the object to animate a colour change and scale to give the impression of it growing and shrinking when the mouse enters and leaves. However as you can see from the demo, the scaling causes the object to reset to it’s original position and also causes an interesting effect on rotate if the object was previously hovered on.

My question is can I rotate the set of objects and still have the scale effect of the object after a rotate without it resetting to it’s original position, I assume that I have the incorrect transform in the mouseover and if someone could point me in the right direction I would be most grateful.

EDIT New fiddle link…

  • 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-12T04:34:43+00:00Added an answer on June 12, 2026 at 4:34 am

    After some further research into this I think I understand the issue.

    When you draw a path in Raphael it is a set position on the canvas, when we perform the rotate, it is an applied transformation on top of that set position. The hover event is triggered we apply a scale transformation, which clears any previous transformations and this is why the object returns to it’s original location.

    The solution that I have come up with is when we perform the hover animation, we need to also perform any current applied rotation and when rotating we need to make sure the scaling is reset. I’ve also noticed that while the rotation is occurring, if you hover over a block, some odd animation occurs and it may be necessary to disable the hover while rotating.

    Please see the jsFiddle link http://jsfiddle.net/ginja/5yp7D/ for an updated code, below I’ve outlined my changes…

    Rotate:

    blocks.animate({ transform: "r" + stadRotate + " " + stadCX + " " + stadCY + "s1" }, 1000);
    

    Mouse Over:

    this.animate({ fill: "#5CBFEB", transform: "r" + stadRotate + " " + stadCX + " " + stadCY + "s1.2" }, 200);
    

    Mouse Out:

    this.animate({ fill: "#cc0000", transform: "r" + stadRotate + " " + stadCX + " " + stadCY + "s1" }, 200);
    

    I’m not sure if this is the right way to do this but if anyone has anything to add or a better solution please do post a comment or answer

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

Sidebar

Related Questions

Please see the jsFiddle http://jsfiddle.net/Lijo/ryDnn/1/ . I have two columns layout. It is %
Please see this jsFiddle . Note that the click event works just fine (try
please see the following: http://jsfiddle.net/8sq2w/ Problem: Focus in the item Highlight the text and
Please see the code here: http://pastie.org/1092106 When I call the method createPost on Blog,
(Please note that I have seen a similar question on StackOverflow recently, however I
Note, I have found the solution to my problem. Please see below. I'm converting
Please see this url: http://qwiet.com/index.html Note the 20px or so at the top, above
(Problem solved, please see the updates) I have some files that have incorrect filenames
Try hovering over the Cancel button in Internet Explorer 8: http://jsfiddle.net/HYDKa/ You'll notice that
NOTE: Please read the whole thing before posting, you'll see why. So I have

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.