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

result reseting for no reason. #48

Closed
AlexCppns opened this issue Aug 11, 2014 · 1 comment
Closed

result reseting for no reason. #48

AlexCppns opened this issue Aug 11, 2014 · 1 comment

Comments

@AlexCppns
Copy link

I am doing this:

$image.cropbox({ width: 400, height: 400, zoom: 3, maxZoom: 1.5 }).on('cropbox', function(e, data) {
     console.log(data);
   });

I see the data updating as I drag/zoom. Then I have this event:

$('#croppingModal').unbind().on('click', '.btn-primary' , function(e){
    e.preventDefault();
    ph.crop = $('#croppingModal img').data('cropbox');
    ph.crop.update();
    console.log(ph.crop);
    ph.drawCroppedImage($('#croppingModal img').get(0));
    ph.$el.trigger('update.photograph');
    $('#croppingModal .btn-default').click();
  });

which returns the default cropping values... What am I doing wrong??

@AlexCppns
Copy link
Author

Nevermind, my js was completely messed up.

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