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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:53:14+00:00 2026-06-17T06:53:14+00:00

I have a set that only contains a rectangle. var hoverTrigger = this.paper.set(); var

  • 0

I have a set that only contains a rectangle.

var hoverTrigger = this.paper.set();
var outline = this.paper.rect();
outline.attr({
...
hoverTrigger.push(outline)
this.sprite.push(hoverTrigger);

Upon hover, the rectangle is supposed to expand, and some links are added to it, and upon mouse off, the links disappear and the rectangle becomes small again.

hoverTrigger.hover(function () {
  var link = this.paper.text();
  hoverTrigger.push(link);
  outline.animate({
  ...
}, function() {
  link.remove();
  outline.animate({
  ...
});

However, it seems like the hover function is being applied to each item in the set individually, and not the whole set, because when you go to mouse over a link, the hover off function fires and the link disappears. Sometimes the box gets hover on and hover off events in quick succession and spazzes.

Is there a way to apply a hover to a set of things, so that mousing between two things in the set doesn’t trigger hover off?

  • 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-17T06:53:15+00:00Added an answer on June 17, 2026 at 6:53 am

    Having faced this limitation myself recently, I decided to write a small extension to Raphael called hoverInBounds that resolves it.

    Simply, once the mouse enters the element we keep track of when it actually moves outside its bounds – executing the hover out function then, not before.

    Demo: http://jsfiddle.net/amustill/Bh276/1

    Raphael.el.hoverInBounds = function(inFunc, outFunc) {
        var inBounds = false;
    
        // Mouseover function. Only execute if `inBounds` is false.
        this.mouseover(function() {
            if (!inBounds) {
                inBounds = true;
                inFunc.call(this);
            }
        });
    
        // Mouseout function
        this.mouseout(function(e) {
            var x = e.offsetX || e.clientX,
                y = e.offsetY || e.clientY;
    
            // Return `false` if we're still inside the element's bounds
            if (this.isPointInside(x, y)) return false;
    
            inBounds = false;
            outFunc.call(this);
        });
    
        return this;
    }
    

    Place the above block of code before you create your Raphael paper object.

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

Sidebar

Related Questions

I have a user control that contains only an image. This image is computed
I have a record-set like this that contains unix timestamps to record dates: +----+-----------+-----------+---------+
I have a malfunctioning set of jquery datepickers that are only not working since
I have a data set that resembles this: id product_id size color price created_date
This question is for experiences programmers. Do you have a set process that you
I have a <td> that is just about empty since it only contains an
I have a repository that contains all of my LINQ queries for this project
I have a Python set that contains objects with __hash__ and __eq__ methods in
I have a stored procedure that contains dynamic sql to return a result set.
I have a single view application that only contains a web view and a

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.