From b6f12cce700d353bbbc9a1af67398c209a254cfe Mon Sep 17 00:00:00 2001 From: David Quartey <42542676+DavidQuartz@users.noreply.github.com> Date: Wed, 28 Sep 2022 09:57:29 +0000 Subject: [PATCH] [Fixes 1210] (#1214) --- .../js/components/ContentsEditable/ThumbnailEditable.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/geonode_mapstore_client/client/js/components/ContentsEditable/ThumbnailEditable.jsx b/geonode_mapstore_client/client/js/components/ContentsEditable/ThumbnailEditable.jsx index c5ee6867b6..30d43cab7c 100644 --- a/geonode_mapstore_client/client/js/components/ContentsEditable/ThumbnailEditable.jsx +++ b/geonode_mapstore_client/client/js/components/ContentsEditable/ThumbnailEditable.jsx @@ -12,8 +12,10 @@ import FaIcon from '@js/components/FaIcon'; import Button from '@js/components/Button'; import tooltip from '@mapstore/framework/components/misc/enhancers/tooltip'; import Message from '@mapstore/framework/components/I18N/Message'; +import { getConfigProp } from '@mapstore/framework/utils/ConfigUtils'; const ButtonWithToolTip = tooltip(Button); + const ThumbnailEditable = ({ defaultImage, onEdit = () => {} @@ -25,6 +27,9 @@ const ThumbnailEditable = ({ }, [defaultImage]); + const { defaultThumbnailSize } = getConfigProp('geoNodeSettings'); + const { height = 200, width = 240 } = defaultThumbnailSize; + const handleDialaogWindowUpload = () => { thumbnailRef?.current?.nextElementSibling.click(); }; @@ -40,8 +45,8 @@ const ThumbnailEditable = ({ }} thumbnailOptions={{ contain: false, - width: 250, - height: 184.8, + width, + height, type: 'image/png' }} />