From bf60b8148909b6802fa9086f0be5e0599756ae8c Mon Sep 17 00:00:00 2001 From: "3m5\\schneider.n" Date: Tue, 12 Mar 2024 09:41:46 +0100 Subject: [PATCH] #3671 - add check if custom ratios for images are allowed --- .../ImageCropper/AspectRatioDropDown/index.js | 6 ++++-- .../src/SecondaryEditors/ImageCropper/index.js | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/neos-ui-editors/src/SecondaryEditors/ImageCropper/AspectRatioDropDown/index.js b/packages/neos-ui-editors/src/SecondaryEditors/ImageCropper/AspectRatioDropDown/index.js index da0c9d61a4..1066ac5d35 100644 --- a/packages/neos-ui-editors/src/SecondaryEditors/ImageCropper/AspectRatioDropDown/index.js +++ b/packages/neos-ui-editors/src/SecondaryEditors/ImageCropper/AspectRatioDropDown/index.js @@ -37,13 +37,14 @@ export default class AspectRatioDropDown extends PureComponent { PropTypes.instanceOf(AspectRatioOption) ), placeholder: PropTypes.string, + allowCustomRatios: PropTypes.boolean, onSelect: PropTypes.func.isRequired, onClear: PropTypes.func.isRequired }; render() { - const {options, current, placeholder, onSelect, onClear} = this.props; + const {options, current, placeholder, allowCustomRatios, onSelect, onClear} = this.props; const dropDownHeaderClasses = mergeClassNames({ [style.dropDown__btn]: true, @@ -58,7 +59,8 @@ export default class AspectRatioDropDown extends PureComponent { {current.label} - + {allowCustomRatios && ( + )} ) : ( diff --git a/packages/neos-ui-editors/src/SecondaryEditors/ImageCropper/index.js b/packages/neos-ui-editors/src/SecondaryEditors/ImageCropper/index.js index 00db73ee21..39f783a68b 100644 --- a/packages/neos-ui-editors/src/SecondaryEditors/ImageCropper/index.js +++ b/packages/neos-ui-editors/src/SecondaryEditors/ImageCropper/index.js @@ -203,6 +203,7 @@ export default class ImageCropper extends PureComponent { {!aspectRatioLocked &&