image: add pre defined values for size, position and repeat properties

This commit is contained in:
jean-emmanuel 2021-04-23 13:50:29 +02:00
parent e6c7631d20
commit a0df774ced
2 changed files with 8 additions and 3 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## 1.9.2
- widgets
- image: add pre defined values for `size`, `position` and `repeat` properties
## 1.9.1
- bug fixes

View file

@ -16,9 +16,9 @@ module.exports = class Image extends StaticProperties(Widget, {bypass: true}) {
return super.defaults().extend({
style: {
_separator_image_style: 'Image style',
size: {type: 'string', value: 'cover', help: 'CSS background-size'},
position: {type: 'string', value: 'center', help: 'CSS background-position'},
repeat: {type: 'string', value: 'no-repeat', help: 'CSS background-repeat'},
size: {type: 'string', value: 'cover', choices: ['cover', 'contain', 'auto'], help: 'CSS background-size'},
position: {type: 'string', value: 'center', choices: ['center', 'center top', 'center bottom', 'left center', 'left top', 'left bottom', 'right center', 'right top', 'right bottom'], help: 'CSS background-position'},
repeat: {type: 'string', value: 'no-repeat', choices: ['no-repeat', 'repeat', 'repeat-x', 'repeat-y', 'space', 'round'], help: 'CSS background-repeat'},
},
class_specific: {
cache: {type: 'boolean', value: true, help: [