Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get original Image's coordinates when image's size is changed in html using width property #281

Open
PrajapatiDhara1510 opened this issue May 10, 2018 · 0 comments

Comments

@PrajapatiDhara1510
Copy link

Hello,

I am using your plugin for cropping. I am facing one issue.

I have image and i have applied width in tag
<img id="target" width="865" src="demo_files/vs.jpg" usemap="#planetmap">

My script is as below

  $(function(){

    $('#cropbox').Jcrop({
      onSelect: updateCoords,
    });

  });

  function updateCoords(c)
  {
    $('#x').val(c.x);
    $('#y').val(c.y);
    $('#w').val(c.w);
    $('#h').val(c.h);
  };

Now i am facing issue. I want coordinates of original image when i am cropping resized image. but i am getting coordinates of resized image.
Here is deferent.
Original Image coordinates :
x1 : 774 , y1 : 772, x2 : 1416, y2 : 1315

Resized Image coordinates :
x1 : 434 , y1 : 789, x2 : 430, y2 : 734

Any solution please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant