Comments (3)
I did change the behavior for zooming, but my intention was to make it better, not worse.
Right now, when you zoom in or out, the image is recentered, does something else happen?
The reason for the change was simply to have predictable behavior, since the old code tried to preserve the old center, but this is not always possible (for instance, when you zoom out, if you try to preserve the center then sometimes that will cause part of the cropbox to be outside the image area).
I am open to ideas here (maybe even revert to the old case if you make a good argument for it, or perhaps add an option to switch between the two). My priority is to keep to code clean, simple and easy to use.
I'll wait for your feedback before trying to fix this.
from jquery-cropbox.
I looked at this issue further, and figured out there was a bug in the centering. Fixed now and bumped versions.
I'll close this issue for now, but if you want the old behavior back, please reply in this issue so we can figure out what to do.
PS: I think I figured out a simple way to get the best of both worlds, available in 0.1.4, please do let me know what you think.
from jquery-cropbox.
Hi acornejo,
thanks for your quick feedback and the fix. I did some tests with several images and the zooming/centering works very well now. Before in 1.2. it somehow jumped when starting to zoom, even if the zoom factor did only change for 0.01 for example - I have to add I'm using a jQuery UI slider to have seamless zooming like this:
cropbox = $('#image').data('cropbox');
$("#slider").slider({
min: 50,
max: 100,
slide: function(event, ui) {
cropbox.zoom(ui.value / 100);
}
});
But anyway, it's really working well so far, so thank you again for your quick fix!
from jquery-cropbox.
Related Issues (20)
- iPhone dragging issue HOT 5
- Zoom Issue HOT 3
- Enhancement : image format when calling getDataURL() HOT 1
- Wrong Logic in Drag Event
- Crop the full-size image, not the cropbox bounding box HOT 2
- Enhancement : Adding slider for zooming in and out the image.
- Failed to execute 'toDataURL'
- Padding on container
- Zoom not working correctly when maxZoom > 1 and image smaller than cropbox HOT 2
- if you use any js script which are using "mouseup" event isn't working HOT 1
- Currently dragging is not working in latest chrome version HOT 4
- I have added rotation as a feature anyone interested? HOT 2
- Giving alert when width and height less than configuration in css
- Cannot read property 'getBlob' of undefined"
- Drag Not Working on Mobile
- bug report [solved]
- Can i set aspect ratio of cropping area?
- NO DRAG
- Retina support
- Uncaught TypeError: hammerit.get is not a function jquery cropbox
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-cropbox.