0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 13:43:03 -05:00
This commit is contained in:
Alex Sánchez 2024-06-18 16:00:39 +02:00 committed by GitHub
parent 4edb964a96
commit 8eb2b1a1be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -45,7 +45,7 @@ export const transformLayoutAttributes = (
> => { > => {
return { return {
'layoutItemH-Sizing': translateLayoutSizing(node.layoutSizingHorizontal, isFrame), 'layoutItemH-Sizing': translateLayoutSizing(node.layoutSizingHorizontal, isFrame),
'layoutItemV-Sizing': translateLayoutSizing(node.layoutSizingVertical), 'layoutItemV-Sizing': translateLayoutSizing(node.layoutSizingVertical, isFrame),
'layoutItemAbsolute': node.layoutPositioning === 'ABSOLUTE', 'layoutItemAbsolute': node.layoutPositioning === 'ABSOLUTE',
'layoutItemMaxH': node.maxHeight ?? undefined, 'layoutItemMaxH': node.maxHeight ?? undefined,
'layoutItemMinH': node.minHeight ?? undefined, 'layoutItemMinH': node.minHeight ?? undefined,

View file

@ -123,8 +123,8 @@ export const translateLayoutSizing = (
case 'FIXED': case 'FIXED':
return 'fix'; return 'fix';
case 'HUG': case 'HUG':
return isFrame ? 'fix' : 'auto'; // @TODO: Penpot does not handle hug in frames as figma does return 'auto';
case 'FILL': case 'FILL':
return 'fill'; return isFrame ? 'fix' : 'fill'; // @TODO: Penpot does not handle fill in frames as figma does
} }
}; };