You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bugfix should prevent an image to be zoomed to maximize one axis.
If the image is too small, for the canvas element, this will show some borders around.
If this was by desire, I suggest having an option to decide which default zoom to use.
Hello everyone there !
i have a problem with the croppie tool.
the problem is that the display of the image on croppie is different from one screen to another => croppie takes all the height of the image but width is completely overflowed. I want the image display to be fixed on croppie with all screens, i want that the image will be not overflowed after uploading to croppie, so ha we can fixe that please ?
How can i do it please because i am working with my client now and he is not happy to see that.
Here is my code:
Please anonimyze this picture (if personal data are visible)
My image does not contain personal data
I've finished Cropping
var $addButton = document.getElementById("addButton");
$files = event.target.files;
$file = files[0];
var $ind = $file.name.lastIndexOf(".");
var $ext = $file.name.substring(ind);
$ext = $ext.toLowerCase();
if (($ext === ".jpg") || ($ext === ".jpeg") || ($ext === ".png")) {
$addButton.removeAttribute('disabled');
var $document = document.getElementById("Document");
var $reader = new FileReader();
$reader.onload = function (event) {
$image_crop.croppie('bind', {
url: event.target.result
}).then(function(){
$image_crop.croppie('setZoom', 0);
});
}
$reader.readAsDataURL(this.$files[0]);
$('#insertimageModal').modal('show');
}else{
$addButton.setAttribute('disabled','disabled');
function Timer(){
if($count == 2){
clearTimer($timer);
}else{
$count ++;
var p = document.getElementById("bt");
var div = document.getElementById("alert");
p.removeChild(div);
}
}
var $count = 1;
var $timer = setTimeout(Timer, 3000);
console.log("Uncompatible image or it isn't");
var p = document.getElementById("bt");
var div = document.createElement("div");
div.setAttribute("class","alert alert-danger");
div.setAttribute("role","alert");
div.setAttribute("id","alert");
text = document.createTextNode("You can only upload an image (jpeg, png or jpg)");
div.appendChild(text);
p.appendChild(div);
$timer;
}
});
var $value;
var $text;
var $IndexChoisie;
$('#customeTypeSelection').on('change', function(){
$IndexChoisie = document.forms.form.CustomTypeId.options.selectedIndex;
$text = document.forms.form.CustomTypeId.options[$IndexChoisie].text;
$value = document.forms.form.CustomTypeId.options[$IndexChoisie].value;
});
$('.crop_image').click(function(event){
var $textarea = document.getElementById("textarea");
var $customTypeId = document.getElementById("customeTypeSelection").childNodes;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This bugfix should prevent an image to be zoomed to maximize one axis.
If the image is too small, for the canvas element, this will show some borders around.
If this was by desire, I suggest having an option to decide which default zoom to use.