Skip to content

Commit

Permalink
🐛 two frame indicator collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidZhang73 committed Mar 6, 2022
1 parent 91d030f commit 4ef386b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pages/annotation/KeyframePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,14 @@ const handleNextKeyframe = () => { // base on left most one
const rightCurrentKeyFrameIndex = annotationStore.keyframeList.indexOf(rightCurrentKeyFrame)
const lastIndex = annotationStore.keyframeList.length - 1
if (leftCurrentKeyFrameIndex >= lastIndex || rightCurrentKeyFrameIndex >= lastIndex) {
annotationStore.leftCurrentFrame = annotationStore.keyframeList[lastIndex - 1] ||
annotationStore.keyframeList[lastIndex]
annotationStore.leftCurrentFrame = lastIndex - 1 >= 0 ? annotationStore.keyframeList[lastIndex - 1] : annotationStore.keyframeList[lastIndex]
annotationStore.rightCurrentFrame = annotationStore.keyframeList[lastIndex]
} else if (leftCurrentKeyFrameIndex === rightCurrentKeyFrameIndex) {
annotationStore.leftCurrentFrame = leftCurrentKeyFrame
annotationStore.rightCurrentFrame = annotationStore.keyframeList[leftCurrentKeyFrameIndex + 1]
} else if (leftCurrentKeyFrameIndex < rightCurrentKeyFrameIndex) {
if (leftCurrentKeyFrameIndex + 2 > lastIndex) {
annotationStore.leftCurrentFrame = annotationStore.keyframeList[lastIndex - 1] ||
annotationStore.keyframeList[lastIndex]
annotationStore.leftCurrentFrame = lastIndex - 1 >= 0 ? annotationStore.keyframeList[lastIndex - 1] : annotationStore.keyframeList[lastIndex]
annotationStore.rightCurrentFrame = annotationStore.keyframeList[lastIndex]
} else {
annotationStore.leftCurrentFrame = annotationStore.keyframeList[leftCurrentKeyFrameIndex + 1]
Expand Down

0 comments on commit 4ef386b

Please sign in to comment.