Comments (12)
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.
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.
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.
Let me know if it's ok for you ;)
from jquery-crop.
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.
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.
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.
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.
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.
did you try to load an image and position it to a specific location before the crop?
from jquery-crop.
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.
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)
- cropping with bootstrap HOT 2
- IE8 and IE9 initializing crop via ajax HOT 11
- disable max zoom? HOT 6
- touch support? HOT 1
- How can destroy() ? HOT 1
- jQuery-crop scroll issue in firefox! HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-crop.