mirror of
https://github.com/agregarr/agregarr.git
synced 2026-05-12 21:59:11 -05:00
chore(prettier): formatting
This commit is contained in:
@@ -1292,8 +1292,12 @@ class OverlayTemplateRendererService {
|
||||
// Scale icon size and spacing to poster size
|
||||
// Support both new spacingX/spacingY and legacy spacing field
|
||||
const iconSize = Math.round(props.iconSize * posterScale);
|
||||
const spacingX = Math.round((props.spacingX ?? props.spacing ?? 4) * posterScale);
|
||||
const spacingY = Math.round((props.spacingY ?? props.spacing ?? 4) * posterScale);
|
||||
const spacingX = Math.round(
|
||||
(props.spacingX ?? props.spacing ?? 4) * posterScale
|
||||
);
|
||||
const spacingY = Math.round(
|
||||
(props.spacingY ?? props.spacing ?? 4) * posterScale
|
||||
);
|
||||
|
||||
// Calculate positions based on layout
|
||||
const positions = this.calculateIconPositions(
|
||||
|
||||
@@ -135,7 +135,14 @@ export const MappedIconElement: React.FC<MappedIconElementComponentProps> = ({
|
||||
default:
|
||||
return { width: iconSize, height: iconSize };
|
||||
}
|
||||
}, [mappingsToShow.length, iconSize, spacingX, spacingY, layout, gridColumns]);
|
||||
}, [
|
||||
mappingsToShow.length,
|
||||
iconSize,
|
||||
spacingX,
|
||||
spacingY,
|
||||
layout,
|
||||
gridColumns,
|
||||
]);
|
||||
|
||||
// Load icons
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1683,9 +1683,7 @@ export const OverlayLayerPanel: React.FC<OverlayLayerPanelProps> = ({
|
||||
},
|
||||
contentRating: {
|
||||
label: 'Content Rating',
|
||||
fields: [
|
||||
{ field: 'contentRating', label: 'Content Rating' },
|
||||
],
|
||||
fields: [{ field: 'contentRating', label: 'Content Rating' }],
|
||||
},
|
||||
// TODO: Add default icon mappings for these categories
|
||||
// tags: {
|
||||
@@ -1855,30 +1853,29 @@ export const OverlayLayerPanel: React.FC<OverlayLayerPanelProps> = ({
|
||||
)}
|
||||
|
||||
{/* Grid Columns (only shown when grid layout and array field) */}
|
||||
{props.layout === 'grid' &&
|
||||
!isSingleValueField(props.field) && (
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-stone-300">
|
||||
{intl.formatMessage(messages.gridColumns)} (
|
||||
{props.gridColumns || 3})
|
||||
</label>
|
||||
<input
|
||||
type="range"
|
||||
min="2"
|
||||
max="12"
|
||||
value={props.gridColumns || 3}
|
||||
onChange={(e) =>
|
||||
handleUpdateElement(element.id, {
|
||||
properties: {
|
||||
...props,
|
||||
gridColumns: parseInt(e.target.value),
|
||||
},
|
||||
})
|
||||
}
|
||||
className="w-full"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{props.layout === 'grid' && !isSingleValueField(props.field) && (
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-stone-300">
|
||||
{intl.formatMessage(messages.gridColumns)} (
|
||||
{props.gridColumns || 3})
|
||||
</label>
|
||||
<input
|
||||
type="range"
|
||||
min="2"
|
||||
max="12"
|
||||
value={props.gridColumns || 3}
|
||||
onChange={(e) =>
|
||||
handleUpdateElement(element.id, {
|
||||
properties: {
|
||||
...props,
|
||||
gridColumns: parseInt(e.target.value),
|
||||
},
|
||||
})
|
||||
}
|
||||
className="w-full"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Icon Size */}
|
||||
<div>
|
||||
@@ -1905,7 +1902,8 @@ export const OverlayLayerPanel: React.FC<OverlayLayerPanelProps> = ({
|
||||
<>
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-stone-300">
|
||||
{intl.formatMessage(messages.spacingX)} ({props.spacingX ?? props.spacing ?? 4}px)
|
||||
{intl.formatMessage(messages.spacingX)} (
|
||||
{props.spacingX ?? props.spacing ?? 4}px)
|
||||
</label>
|
||||
<input
|
||||
type="range"
|
||||
@@ -1914,7 +1912,10 @@ export const OverlayLayerPanel: React.FC<OverlayLayerPanelProps> = ({
|
||||
value={props.spacingX ?? props.spacing ?? 4}
|
||||
onChange={(e) =>
|
||||
handleUpdateElement(element.id, {
|
||||
properties: { ...props, spacingX: parseInt(e.target.value) },
|
||||
properties: {
|
||||
...props,
|
||||
spacingX: parseInt(e.target.value),
|
||||
},
|
||||
})
|
||||
}
|
||||
className="w-full"
|
||||
@@ -1922,7 +1923,8 @@ export const OverlayLayerPanel: React.FC<OverlayLayerPanelProps> = ({
|
||||
</div>
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-stone-300">
|
||||
{intl.formatMessage(messages.spacingY)} ({props.spacingY ?? props.spacing ?? 4}px)
|
||||
{intl.formatMessage(messages.spacingY)} (
|
||||
{props.spacingY ?? props.spacing ?? 4}px)
|
||||
</label>
|
||||
<input
|
||||
type="range"
|
||||
@@ -1931,7 +1933,10 @@ export const OverlayLayerPanel: React.FC<OverlayLayerPanelProps> = ({
|
||||
value={props.spacingY ?? props.spacing ?? 4}
|
||||
onChange={(e) =>
|
||||
handleUpdateElement(element.id, {
|
||||
properties: { ...props, spacingY: parseInt(e.target.value) },
|
||||
properties: {
|
||||
...props,
|
||||
spacingY: parseInt(e.target.value),
|
||||
},
|
||||
})
|
||||
}
|
||||
className="w-full"
|
||||
|
||||
Reference in New Issue
Block a user