Skip to content

Commit

Permalink
[Fixes #1210] Configure the client to receive image properties from s…
Browse files Browse the repository at this point in the history
…erver (#1214) (#1221)
  • Loading branch information
DavidQuartz authored Oct 7, 2022
1 parent a0269e0 commit 079f04f
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {}
Expand All @@ -25,6 +27,9 @@ const ThumbnailEditable = ({

}, [defaultImage]);

const { defaultThumbnailSize } = getConfigProp('geoNodeSettings');
const { height = 200, width = 240 } = defaultThumbnailSize;

const handleDialaogWindowUpload = () => {
thumbnailRef?.current?.nextElementSibling.click();
};
Expand All @@ -40,8 +45,8 @@ const ThumbnailEditable = ({
}}
thumbnailOptions={{
contain: false,
width: 250,
height: 184.8,
width,
height,
type: 'image/png'
}}
/>
Expand Down

0 comments on commit 079f04f

Please sign in to comment.