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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:55:53+00:00 2026-05-28T22:55:53+00:00

Problem: I’m working on a website where there is a dial that displays a

  • 0

Problem:

I’m working on a website where there is a “dial” that displays a number of tabs representing different divisions of an umbrella company:

enter image description here

At the moment I have everything prepared in HTML/CSS (positioning of each of the tabs). The inner circles are on a higher z-index as the tabs will need to animate outward when rolled over (I can achieve this part). The images for the tabs actually look like this:

enter image description here

Unfortunately it didn’t occur to me until now that because of the mechanics of rollover and rollout in JavaScript, the boundaries for each item are square, meaning they overlap all over the place. For example, the centre circle’s rollover area is actually this:

enter image description here

Which detracts some massive clickable/rolloverable areas on the inner circle of tabs. This effect then stacks with each of the tabs, rendering a standard approach non-viable.


Approach:

This is fine, what I plan to do now is measure the distance and angle of the mouse from the centre of the dial and use these values to determine the relevant tab, and work from there. I’ll basically do the following:

  1. Collect angle (using atan2) and distance (using pythag).
  2. Apply my .click() to the entire dial, and work with these values from there.
  3. Use setInterval() to constantly check which item is rolled over and work with its animation from there.

Question:

I’m not exactly sure how to implement what I am doing (with JQuery). I know how to do all the Math stuff once I have the coordinates that I need, I’m just not confident in getting the actual coordinates (ensuring the same results cross-browser).

How can I best gather the coordinates of:

  1. The centre of my dial.
  2. The cursor (assuming that the cursor is within the same axis as the centre of my dial i.e. rolling over the centre of the dial will mean both sets of coordiantes are the same).

Note:

Taking the above, anything that achieves the same result (being able to have proper rollover detection for overlapping elements) is equally as helpful.

  • 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-05-28T22:55:54+00:00Added an answer on May 28, 2026 at 10:55 pm

    You can define an image map over the stack of layers. The map will define clicking/hovering regions, and the browser will take care of hit detection. With Adobe ImageReady, I have mapped a portion of your reference image so that “Reprise” and “Initiative” are hotspots:

    enter image description here

    ImageReady produced the following HTML:

    <img src="images/Imagemap.png" width="488" height="488" border="0" alt="" usemap="#Imagemap_Map">
    <map name="Imagemap_Map">
        <area shape="poly" alt="" coords="82,336, 138,303, 130,287, 123,265, 120,238, 125,206, 136,179, 158,152, 178,136, 209,122, 244,117, 244,55, 215,60, 184,67, 158,77, 122,101, 97,130, 73,169, 62,202, 59,224, 58,253, 61,281, 73,318" href="#">
        <area shape="poly" alt="" coords="73,72, 112,111, 138,89, 161,76, 187,66, 214,59, 244,57, 244,0, 205,4, 165,12, 118,34, 94,51" href="#">
    </map>
    

    (As you can see, mapping arbitrary regions can be exausting, and I dare to say virtually impossible without the use of a tool.)

    You’d apply the map to a transparent image on top of everything. The final assembly can be imagined as the following stack:

    enter image description here

    The regions were highlighted just for reference. The real composition should be 100% transparent.

    Good luck!

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

Sidebar

Related Questions

Problem: I have two spreadsheets that each serve different purposes but contain one particular
Problem (simplified to make things clearer): 1. there is one statically-linked static.lib that has
Problem PHP session in different folder. I have problem with PHP session. There are
Problem: Ajax suggest-search on [ n ] ingredients in recipes. That is: match recipes
Problem solved: Thanks guys, see my answer below. I have a website running in
Problem: We have a web app that calls some web services asynchronously (from the
Problem: I have 2 classes, DB class and a User class, that will work
Problem: Visitors open the url website.com/?i=133r534|213213|12312312 but this url isn't valid anymore and they
Problem: I cannot understand the number 256 (2^8) in the extract of the IBM
Problem: I have a large Visual C++ project that I'm trying to migrate to

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.