-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] web_editor, *: improve toggle and d&d in grid mode for the images
*: website In grid mode, the images take the whole space in their column so they always have the same size as them. However, if text was added in the column (before or after toggle), it always looked like it was overflowing and the overlay would not cover it even after resizing. Also, since these images have the value of the `object-fit` property set to `cover`, the images are cut if they are too big for the column. This is problematic if the image has a shape because the shape is cut too, ruining the visual effect. This commit solves these issues by distinguishing the images that are alone in their column from those that are not. An image is considered alone if it is a direct child of the column and if there is no text in it (the line breaks and empty lines are excluded). Now, only this kind of images, if they have no shape, take the whole space in the column and have `object-fit` set to `cover`; the other ones behave like the columns in normal mode. This distinction also allows to block the edition of the columns containing only an image. Indeed, adding text or dropping inner content in them had the same overflowing effect. task-2973198 X-original-commit: e9c7e02 Part-of: odoo#102525
- Loading branch information
Showing
5 changed files
with
86 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters