Comments (5)
actually I wanted to execute a code to fit complete image inside crop area upon on lowest possible zoom
from jquery-cropbox.
Yes, the property minPercent of the cropbox data (I will document this).
So you would do:
$('yourimage').data('cropbox').minPercent
This property will only be populated AFTER the image has been loaded by the browser (otherwise it can't be computed). Therefore I suggest you query for the property inside the the cropbox event, like this:
$('yourimage').on('cropbox', function (event, result, cropbox) {
console.log('lowest zoom is ' + cropbox.minPercent);
});
from jquery-cropbox.
Wow!! Thanks for such a nice plugin.
Sorry for my wrong question, my question should have been how to identify when I am zooming out if I am on lowest zoom. Once I am on lowest zoom inside zoomout function and again user tries to zoom out 2nd time I wanted to fit image inside cropbox viewport.
I hope you got my question..!!
from jquery-cropbox.
I don't think I understand you. The image should always be "fit" inside the cropbox viewport.
If you want to zoom out beyond the boundaries of the image (i.e. you want part of the cropbox to have empty space), then this is unsupported by this plugin. You are welcome to submit a pull request implementing this feature, but it should be optional since most people don't want that behavior.
from jquery-cropbox.
Yes you are correct but I have such a requirement then I will be setting image width:auto / 100% and height:auto / 100% depending upon the image ratio.
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.