timeline: minor refactor

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/563/head
Varun Patil 2023-03-24 16:02:10 -07:00
parent eb3c834241
commit e696c5199c
1 changed files with 24 additions and 27 deletions

View File

@ -47,10 +47,10 @@
<template v-slot="{ item, index }"> <template v-slot="{ item, index }">
<div <div
v-if="item.type === 0" v-if="item.type === 0"
class="head-row"
:class="{ selected: item.selected }"
:style="{ height: item.size + 'px' }"
:key="item.id" :key="item.id"
:style="{ height: `${item.size}px` }"
:class="{ selected: item.selected }"
class="head-row"
> >
<div class="super" v-if="item.super !== undefined"> <div class="super" v-if="item.super !== undefined">
{{ item.super }} {{ item.super }}
@ -61,30 +61,27 @@
</div> </div>
</div> </div>
<template v-else> <div
<div v-else
class="photo" v-for="photo of item.photos"
v-for="photo of item.photos" :key="photo.key"
:key="photo.key" :style="{
:style="{ height: `${photo.dispH}px`,
height: photo.dispH + 'px', width: `${photo.dispW}px`,
width: photo.dispW + 'px', transform: `translate(${photo.dispX}px, ${photo.dispY}px`,
transform: `translate(${photo.dispX}px, ${photo.dispY}px`, }"
}" class="photo"
> >
<Photo <Photo
:data="photo" :data="photo"
:day="item.day" :day="item.day"
@select="selectionManager.selectPhoto" @select="selectionManager.selectPhoto"
@pointerdown="selectionManager.clickPhoto(photo, $event, index)" @pointerdown="selectionManager.clickPhoto(photo, $event, index)"
@touchstart=" @touchstart="selectionManager.touchstartPhoto(photo, $event, index)"
selectionManager.touchstartPhoto(photo, $event, index) @touchend="selectionManager.touchendPhoto(photo, $event, index)"
" @touchmove="selectionManager.touchmovePhoto(photo, $event, index)"
@touchend="selectionManager.touchendPhoto(photo, $event, index)" />
@touchmove="selectionManager.touchmovePhoto(photo, $event, index)" </div>
/>
</div>
</template>
</template> </template>
</RecycleScroller> </RecycleScroller>