Commit 9a475ee3 authored by christianrhansen's avatar christianrhansen

set background-size via select

parent 5a8a653c
Pipeline #59810 passed with stage
in 1 minute and 23 seconds
......@@ -23,20 +23,14 @@
q-item-main.bg-grey-9.q-py-sm(style="border-radius: .15rem;")
//
q-tooltip.z-max.shadow-6.bg-grey-9(anchor="center left", self="center right", :offset="[8, 0]",
style="border: 1px solid rgba(255,255,255,0.1);") Fit image to cell
q-tooltip.z-max.shadow-6.bg-grey-9(anchor="center left", self="center right", :offset="[8, 0]",
style="border: 1px solid rgba(255,255,255,0.1);") Fit image to cell
q-item-tile.q-px-md
q-select(
v-model="test",
:options="selectOptions")
q-checkbox.full-width.q-py-sm(
dark,
v-model="cell.configuration._value.backgroundSize",
label="Fit image to cell",
@input="value => setCssAttribute('backgroundSize', 'contain')")
:options="css.backgroundSizes",
@input="value => setCssAttribute('backgroundSize', value)")
</template>
......@@ -46,30 +40,19 @@
props: ['cell', 'annotation'],
data () {
return {
selectOptions: [
{
label: 'Google',
value: 'goog'
},
{
label: 'Facebook',
value: 'fb'
}
],
test: 'goog',
updatedCell: undefined,
model: {
backgroundPosition: undefined,
backgroundSize: false
},
css: {
backgroundPositions: ['top left', 'top', 'top right', 'left', 'center', 'right', 'bottom left', 'bottom', 'bottom right']
backgroundPositions: ['top left', 'top', 'top right', 'left', 'center', 'right', 'bottom left', 'bottom', 'bottom right'],
backgroundSizes: [
{ label: 'Contain', value: 'contain' },
{ label: 'Cover', value: 'cover' },
{ label: 'Unset', value: 'unset' }
]
},
backgroundSizes: [
{ label: 'Contain', value: 'contain' },
{ label: 'Cover', value: 'cover' },
{ label: 'None', value: 'none' }
],
cssAttributes: {
backgroundSize: 'background-size',
backgroundPosition: 'background-position'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment