Comments (13)
I think its because on line 215 in your plugin this.img_top = fill((this.options.height - this.img_height) / 2, this.img_height, this.options.height);. I don't know why but the variable this.img_top is not destroyed or I think it is destroyed but it had applied the css on the image. Because if in this line I write this this.img_top = 0; then it is working. But I am assuming it would be having trouble on drag calculation. Do you think you have any solution for it?
from jquery-cropbox.
From your description, it seems that the old cropbox is NOT being removed.
I am surprised that the new image preserves the same top: -X value, but not the same left: -Y value.
How are you removing the cropbox? You should be doing $('imageselector').data('cropbox').remove()
I ask because a lot of people do $('imageselector').cropbox().remove()
but that is wrong since cropbox is a chainable function, and it returns the image, not the cropbox instance.
from jquery-cropbox.
I am removing it like this,
var crop = $('#postcar_image').data('cropbox');
crop.remove();
Yeah I am not sure why it isn't removing it properly. if I do this this.img_top = 0; on line 215 in your code then it works. I mean the the new image isn't having any top values. But I don't think it is the right way to do it. Do you want me to share the link with you so that you can have a look?
from jquery-cropbox.
Sure, a link to a jsfiddle would help.
It seems you are removing the cropbox correctly.
from jquery-cropbox.
http://pprdev.onjumpstarter.io/resapp/#/selectImage try and select an image which has higher height as compared to the width and then select another one with higher width. You will see that the new image is having some top: - X value..
from jquery-cropbox.
I can't reproduce the issue you see with the top value, but I can see the cropbox is NOT being removed, because I run into different issues (width and height are not being refreshed).
Try using the latest version in master and see if it fixes your issue.
from jquery-cropbox.
No it still doesn't fixes the issues. Let me give you the images to upload as well so that you can see the problem what I am talking about.
First upload this one and then add this one
from jquery-cropbox.
So when you upload the horse one it has top: -X value.
from jquery-cropbox.
Ok, let me try (also, please update again, I forgot to push the change to github).
from jquery-cropbox.
After updating I am still having that same issue.
from jquery-cropbox.
Now I can reproduce the problem in your example. I have to go to work now, but this is now at the top of my priority list when I get back from work.
PS: The example in the sandbox you sent me IS NOT using the latest version of jquery cropbox, but I assume you tried it with the latest version in another sandbox.
from jquery-cropbox.
yeah on my local machine I tried with the latest code. Thanks a lot for your response. I will wait for you to fix the thing meanwhile if I fix it I will let you know.
from jquery-cropbox.
This is resolved, there wasn't problem with your plugin but with my code.. I am trying to use ember to bind the src attr of the image and then it wasn't allowing to remove the cropbox. Now I have removed it and it is working now..
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.