murfy Posted March 17, 2014 Share Posted March 17, 2014 (edited) 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. 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 :-) Edited March 17, 2014 by murfy Quote Link to comment https://forums.phpfreaks.com/topic/287033-js-protractor/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.