I have been trying a lot to set a minimum size or maximum size and even setSelect option of Jcrop but for some reason, it doesnt work. Here is the code where everything else works just fine :
<script src="Scripts/jquery.Jcrop.js" type="text/javascript"></script>
<link href="CSS/jquery.Jcrop.css" rel="stylesheet" />
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$('#<%=imgToCrop.ClientID%>').Jcrop({
onSelect: getAreaToCrop,
aspectRatio:1,
boxWidth: 300,
boxHeight:300
});
});
function getAreaToCrop(c) {
$('#XCoordinate').val(parseInt(c.x));
$('#YCoordinate').val(parseInt(c.y));
$('#Width').val(parseInt(c.w));
$('#Height').val(parseInt(c.h));
setSelect:[100,100,50,50]
}
</script>
Aucun commentaire:
Enregistrer un commentaire