Git Product home page Git Product logo

Comments (12)

adriengibrat avatar adriengibrat commented on July 29, 2024

Hello,
please provide sample code (you may use http://jsfiddle.net/).

It seems you're not using the plugin the right way for what you want to achieve ;)

from jquery-crop.

edba1970 avatar edba1970 commented on July 29, 2024

Here's the link http://jsfiddle.net/km38G/

doesn't entirely behave the same way as it is on my machine but the idea is that when I add the second crop script, the first image doesn't move any more. On my local machine, the first image becomes the same size as the second image. One note I would like to make is that I am testing it on Mozilla and this doesn't happen on IE 9.

Also, when I load images dynamically, the controls don't work any more. I cannot zoom in and zoom out. I removed line 35 if ( ! self.width )and removed line 39 if ( self.width ) and changed line 34 from .on( 'load.' + namespace, function ()  to .on( 'load', function () which worked when loading images dynamically but now I cannot drag the image left or right.

All these problems only happen when I attach the second image to the script. Still line 39, 35, and 34 had to be removed for dynamic image load.

Thanks.


From: Adrien Gibrat [email protected]
To: adriengibrat/jQuery-crop [email protected]
Cc: edba1970 [email protected]
Sent: Wednesday, September 11, 2013 12:56 PM
Subject: Re: [jQuery-crop] multiple image sizes (#3)

Hello,
please provide sample code (you may use http://jsfiddle.net/).
It seems you're not using the plugin the right way for what you want to achieve ;)

Reply to this email directly or view it on GitHub.

from jquery-crop.

adriengibrat avatar adriengibrat commented on July 29, 2024

Thank for reporting this bug.
Sorry I suggested you was doing it wrong, it was an actual bug, i was doing it wrong ;)
I fixed the pb of size... it was a pb of options shared between different instances via the prototype of the plugin...
About the dynamic loading i've made some change to fix that too.

Glad you use this plugin. When I wrote it i finally did not used it in prod, so it wasn't tested enough, sorry about that!

from jquery-crop.

adriengibrat avatar adriengibrat commented on July 29, 2024

Let me know if it's ok for you ;)

from jquery-crop.

edba1970 avatar edba1970 commented on July 29, 2024

it works well as far as loading dynamic images and I can zoom in and out as well, There is a new problem however. When I load a large image and crop it, the x and y are totally in a wrong position. Another words the cropped image is not where I have positioned the image.

from jquery-crop.

adriengibrat avatar adriengibrat commented on July 29, 2024

Hum, need more info. a test case if possible.
Seems ok in the demo: http://adriengibrat.github.io/jQuery-crop/
x & y are top left point.

from jquery-crop.

edba1970 avatar edba1970 commented on July 29, 2024

While I was waiting for your initial response, I search all over to see if I could find something similar and found another script which was based on jWindowCrop. That script is actually working. It's a bit bigger is size than yours. I'd rather use yours because it has a smaller foot print. My code is exactly the same as far as x, y, w, and h are concerned and it works. I looked at your sample and it seems it works. I am not sure than why it wouldn't work. Can you try to load an image dynamically and then crop a big image. I think this is what causes the problem. Thanks

from jquery-crop.

adriengibrat avatar adriengibrat commented on July 29, 2024

I can't reproduce the bug...
on the demo i've tried to load another big image, in the console run:
$('.crop:first').attr('src','http://s3.amazonaws.com/rapgenius/filepicker%2FvCleswcKTpuRXKptjOPo_kitten.jpg');

No pb with the coordinates.

Again, i need a sample to identify actual bug.

could you give me the url of the other jWindowCrop fork ?

from jquery-crop.

edba1970 avatar edba1970 commented on July 29, 2024

I don't know where i found it, I search all over the internet for something that works. Here it is https://github.com/terebentina/jQcrop

from jquery-crop.

edba1970 avatar edba1970 commented on July 29, 2024

did you try to load an image and position it to a specific location before the crop?

from jquery-crop.

adriengibrat avatar adriengibrat commented on July 29, 2024

I just loaded an image, then executed:
$('.crop:first').attr('src','http://s3.amazonaws.com/rapgenius/filepicker%2FvCleswcKTpuRXKptjOPo_kitten.jpg');
I did not position it... but it should not induce pb... again, i can't help you without sample code, or more precise exemple (more specific than "totally in a wrong position.").

from jquery-crop.

adriengibrat avatar adriengibrat commented on July 29, 2024

closing the issue as i can't reproduce the bug and i have no news, feel free to reopen it

from jquery-crop.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.