Jump to content

JS Protractor


murfy

Recommended Posts

Hi, I would like to have a very simple protractor to users, to help to measure angle on a photo. I am apparently very JS beginner but maybe somebody can help?

Let's have an image with television and imaginative blue axis x which will not be visible in the JS tool, but it helps me to explain how the tool should work.

I would like to measure some angle for example in the profile view, and I will draw the red line and blue angle to show you which angle I want to measure.

 

2gubjhx.jpg

 

 

Now as the description shows, you should need to do two clicks. One to show the initiate point, the second to show the ending point. The angle that should be measured would be alpha. You would just twice click and it would calculated the angle referenced to the horizontal axis and show it somewhere outside the image. Could anybody do this?

 

Additional and voluntary opinion would be to display the angle during you move the mouse cursor just after first click, when you are trying to find the correct point so you would not need to click, but also to show the red line between starting point and the mouse cursor xy position.

 

Use of the protractor, for example if user uploaded photo, but he needs to rotate it and does not know how much. So he would measure it and then I can use php code to fix the rotation of the photo :-)

Link to comment
https://forums.phpfreaks.com/topic/287033-js-protractor/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.