mirror of
https://github.com/friendica/friendica
synced 2025-01-03 20:02:19 +00:00
cropperjs: fix indention
This commit is contained in:
parent
34204ca580
commit
51841ab148
1 changed files with 19 additions and 19 deletions
|
@ -13,25 +13,25 @@
|
||||||
|
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
|
|
||||||
var image = document.getElementById('croppa');
|
var image = document.getElementById('croppa');
|
||||||
var cropper = new Cropper(image, {
|
var cropper = new Cropper(image, {
|
||||||
aspectRatio: 1 / 1,
|
aspectRatio: 1 / 1,
|
||||||
viewMode: 1,
|
viewMode: 1,
|
||||||
preview: '#profile-photo-wrapper, .crop-preview',
|
preview: '#profile-photo-wrapper, .crop-preview',
|
||||||
crop: function(e) {
|
crop: function(e) {
|
||||||
$( '#x1' ).val(e.detail.x);
|
$( '#x1' ).val(e.detail.x);
|
||||||
$( '#y1' ).val(e.detail.y);
|
$( '#y1' ).val(e.detail.y);
|
||||||
$( '#x2' ).val(e.detail.x + e.detail.width);
|
$( '#x2' ).val(e.detail.x + e.detail.width);
|
||||||
$( '#y2' ).val(e.detail.y + e.detail.height);
|
$( '#y2' ).val(e.detail.y + e.detail.height);
|
||||||
$( '#width' ).val(e.detail.scaleX);
|
$( '#width' ).val(e.detail.scaleX);
|
||||||
$( '#height' ).val(e.detail.scaleY);
|
$( '#height' ).val(e.detail.scaleY);
|
||||||
},
|
},
|
||||||
ready: function() {
|
ready: function() {
|
||||||
// Add the "crop-preview" class to the preview element ("profile-photo-wrapper").
|
// Add the "crop-preview" class to the preview element ("profile-photo-wrapper").
|
||||||
var cwrapper = document.getElementById("profile-photo-wrapper");
|
var cwrapper = document.getElementById("profile-photo-wrapper");
|
||||||
cwrapper.classList.add("crop-preview");
|
cwrapper.classList.add("crop-preview");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue