Skip to content

Commit

Permalink
✨ action indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidZhang73 committed Feb 26, 2022
1 parent 8a904a0 commit ad73fef
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/pages/annotation/components/CanvasPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@
:icon="mainStore.zoom ? 'zoom_out' : 'zoom_in'"
@click="handleZoomClick"
></q-btn>
<div
class="absolute bg-black text-white"
v-if="actionList && actionList.length"
style="bottom: 0; padding: 4px; font-size: 20px; opacity: 0.8"
>Action: <span
v-for="(action, index) in actionList"
:style="{color: action.color}"
>{{ action.name }}<span
v-if="actionList.length !== 1 && index !== actionList.length - 1"
class="text-white"
>, </span></span>
</div>
<q-badge
class="bg-black text-white"
v-if="preferenceStore.actions && status"
Expand Down Expand Up @@ -197,6 +209,19 @@ let createContext
let dragContext
let activeContext
/// action indicator
const actionList = computed(
() => annotationStore.actionAnnotationList.filter(action =>
currentFrame.value >= utils.time2index(action.start)
&& currentFrame.value <= utils.time2index(action.end)
).map(action => {
return {
name: configurationStore.actionLabelData.find(label => label.id === action.action).name,
color: action.color
}
})
)
/// status
const status = ref()
const statusStyle = ref()
Expand Down

0 comments on commit ad73fef

Please sign in to comment.