-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues of IndexSizeError in IE #348
Comments
Here is how we get base64 data. $('#demoImg').croppie('result', {
|
here is the example in jsfiddle. https://jsfiddle.net/barretwu/L5cr6fba/3/ Please use IE11 open it. Thanks again for your help. |
This will be fixed in the next release, thanks for pointing it out. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Guys,
Could you please help to address this issue only in IE10/IE11 ?
Heads up for these 2 tips:
Then when we zoom out, say, 0.5 and move the picture to clip partially, the 'IndexSizeError' occurs. After we do some research, we found the root cause is in the API call " ctx.drawImage(this.elements.preview, left, top, width, height, startX, startY, outWidth, outHeight);", if the 'width'/'height' is greater than 'this.elements.preview's width or height, then we got the bug.
We want to add some code to fix this issue, but some times still does not work.
.........
var ua = window.navigator.userAgent;
var old_ie = ua.indexOf('MSIE ');
var new_ie = ua.indexOf('Trident/');
if ((old_ie > -1) || (new_ie > -1)) {
if (width > self._originalImageWidth) {
width = self._originalImageWidth - left;
outWidth = width;
}
if (height > self._originalImageHeight) {
height = self._originalImageHeight - top;
outHeight = height;
}
}
ctx.drawImage(this.elements.preview, left, top, width, height, startX, startY, outWidth, outHeight);
.......
Attached some screenshots and my IE is IE11.
@manast @fdanielsen @bigamil @spookee86 @kmagiera , could some guys help to look at it? Appreciate your help.
The text was updated successfully, but these errors were encountered: