Issue Bug Closed

#103389Multiple configured coverAreas not correctly displayed in image manipulation modal

Chris Müller 03/13/24, 13:19 updated 07/09/24, 15:37

Description

The following cover areas are defined in a custom page field:

'columns' => [
    'crop' => [
        'config' => [
            'cropVariants' => [
                'desktop_wide' => [
                    'title' => 'Desktop wide',
                    'allowedAspectRatios' => [
                        'default' => [
                            'title' => 'Default',
                            'value' => 1920 / 680,
                        ],
                    ],
                    'selectedRatio' => 'default',
                    'coverAreas' => [
                        [
                            'x' => 0,
                            'y' => 0,
                            'width' => 1,
                            'height' => 0.25,
                        ],
                        [
                            'x' => 0.2,
                            'y' => 0.35,
                            'width' => 0.25,
                            'height' => 0.5,
                        ],
                    ],
                ],
                'desktop' => [
                    'title' => 'Desktop',
                    'allowedAspectRatios' => [
                        'default' => [
                            'title' => 'Default',
                            'value' => 1370 / 680,
                        ],
                    ],
                    'selectedRatio' => 'default',
                    'coverAreas' => [
                        [
                            'x' => 0,
                            'y' => 0,
                            'width' => 1,
                            'height' => 0.25,
                        ],
                        [
                            'x' => 0.08,
                            'y' => 0.35,
                            'width' => 0.45,
                            'height' => 0.5,
                        ],
                    ],
                ],
                'small' => [
                    'title' => 'Tablet / Smartphone',
                    'allowedAspectRatios' => [
                        'default' => [
                            'title' => 'Default',
                            'value' => 16 / 9,
                        ],
                    ],
                    'selectedRatio' => 'default',
                ],
            ],
        ],
    ],
],

However, the cover areas in the UI are displayed like that:

Desktop wide:
desktop-wide.png

Desktop:
desktop.png

Tablet/Smartphone:
tablet.png

Mind the duplicated cover areas, best seen in “Desktop wide” and “Desktop” for the second defined cover area. Additionally, the “Tablet/Smartphone” crop variant should have no cover areas displayed.

It looks like all defined cover areas are combined for each crop variant.

TYPO3 v12.4.12

Reviews 2