track > variation : add bg color
This commit is contained in:
parent
099479dc45
commit
760e17287e
5 changed files with 15 additions and 4 deletions
|
|
@ -35,7 +35,11 @@
|
|||
v-if="activeTrack.files.length > 1"
|
||||
:activeTrack="activeTrack"
|
||||
/>
|
||||
<SingleImage v-else :file="activeTrack.files[0]" />
|
||||
<SingleImage
|
||||
v-else
|
||||
:file="activeTrack.files[0]"
|
||||
:backgroundColor="activeTrack.backgroundColor"
|
||||
/>
|
||||
</template>
|
||||
<div
|
||||
v-if="isCompareModeEnabled && activeTracks.length < 2"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<figure>
|
||||
<figure :style="'--bg-color:' + activeTrack.backgroundColor">
|
||||
<div
|
||||
@mousedown="enableDragToRotate"
|
||||
@touchstart="enableDragToRotate"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<figure>
|
||||
<figure :style="'--bg-color:' + backgroundColor">
|
||||
<img :src="file.url" alt="" />
|
||||
</figure>
|
||||
</template>
|
||||
|
|
@ -9,7 +9,8 @@ import { storeToRefs } from 'pinia';
|
|||
import { useVirtualSampleStore } from '../../../stores/virtualSample';
|
||||
import { watch } from 'vue';
|
||||
|
||||
const { file } = defineProps({
|
||||
const { file, backgroundColor } = defineProps({
|
||||
backgroundColor: String,
|
||||
file: Object,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue