From 326e3f5490759e2042be2e220c84a5615e2233e4 Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Tue, 2 Apr 2024 15:17:33 +0100 Subject: [PATCH] Fix cropping UI tools --- inc/cropper/media-template.php | 12 +++++++----- inc/cropper/src/cropper.scss | 4 +++- inc/cropper/src/views/image-editor.js | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/inc/cropper/media-template.php b/inc/cropper/media-template.php index 3871c0a..cce9918 100644 --- a/inc/cropper/media-template.php +++ b/inc/cropper/media-template.php @@ -205,19 +205,21 @@
<# if ( data.model.get('editor').can && data.model.get('editor').can.rotate ) { #> - - + + + <# } else { #> <# } #> - - + + + @@ -260,7 +262,7 @@ class="image-preview image-preview-{{ data.model.get( 'size' ) }}"
-
+
<# if ( data.model.get( 'size' ) === 'full' || data.model.get( 'size' ) === 'full-orig' ) { #> <# if ( data.model.get( 'editor' ).can && data.model.get( 'editor' ).can.restore ) { #> diff --git a/inc/cropper/src/cropper.scss b/inc/cropper/src/cropper.scss index 465b775..9d50b79 100644 --- a/inc/cropper/src/cropper.scss +++ b/inc/cropper/src/cropper.scss @@ -86,7 +86,7 @@ img { display: block; width: auto; - height: 80px; + height: auto; max-width: 100%; max-height: 80px; } @@ -127,6 +127,8 @@ &-crop { position: relative; + padding: 0; + margin: 10px 0 0; } &--preview { diff --git a/inc/cropper/src/views/image-editor.js b/inc/cropper/src/views/image-editor.js index 332ac69..74ad8e8 100644 --- a/inc/cropper/src/views/image-editor.js +++ b/inc/cropper/src/views/image-editor.js @@ -284,6 +284,7 @@ const ImageEditor = Media.View.extend( { }, onEditImage() { this.$el.find( '.focal-point, .note-focal-point' ).hide(); + this.$el.find( '.imgedit-submit-btn' ).prop( 'disabled', false ); }, } );