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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:10:27+00:00 2026-05-28T06:10:27+00:00

See this jsFiddle post for a working arc drawing; thanks to Simon Sarris for

  • 0

See this jsFiddle post for a working arc drawing; thanks to Simon Sarris for the fix in my previous questions.

I’m using the KineticJS plugin to create shapes and make use of event handlers. Assuming you clicked somewhere on the arc and the arc knew where you clicked (x, y), how could those 2 coordinates be used to determine a percentage?

When you click anywhere, the total percentage is always 100%.

Addin

To make this simpler, what could I do to (x, y) to virtually bend the object so that x goes from 0 to maximum x?

  • 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-28T06:10:28+00:00Added an answer on May 28, 2026 at 6:10 am

    Simple trigonometry. sin(angle) = opposite / adjacent. opposite is the y value and adjacent is the x value. So Math.asin((xx - x) / (yy - y)) where xx and yy are the coords of the centre of the arc. That gives you the angle, which you can then divide 2 * Math.PI by.

    Off the top of my head I can’t remember what happens with negative numbers. You may have to take the Math.abs value of the arguments, then work out which quadrant the click is in (easy to do by using < and >) and add Math.PI / 2 for each one.

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

Sidebar

Related Questions

As you can see in this jsfiddle , I'm trying to make a toggle
There must be something wrong. I don't know what? see this on jsfiddle .
See here for code: http://jsfiddle.net/ecFBK/10/ I'm having a hard time getting this to work
You can see the example here: http://jsfiddle.net/8EHED/8/ This is a tricky problem because I
http://jsfiddle.net/YaMhn/8/ ^^^^Take a look and see if you can help solve this Ok so
This is my code: http://jsfiddle.net/WCP5f/2/ If you open it with Chrome, you will see
This is a fairly weird case, you can see the code here: http://jsfiddle.net/zpZtH/2/
I'm running this code in Firefox 11 on Windows 7. (See http://jsfiddle.net/QStkd/ ). $('<div><input
Please see this jsFiddle: https://jsfiddle.net/Wmq6f/ I have a textarea that has a background image,
I have the following array with a structure within each array (see this jsfiddle

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.