Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 4.0.x][Fixes 1210] Configure the client to receive image properties from server #1221

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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