Skip to content

Commit

Permalink
✨ better avoidness
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidZhang73 committed Nov 17, 2023
1 parent 3a916f6 commit 1326ced
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/pages/annotation/CanvasPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -478,24 +478,22 @@ const handleMousemove = event => {
y: mouseY
}
}
let isActionIndicatorOverlapsStatus = false
if (mouseX > annotationStore.video.width / 2 && mouseY > annotationStore.video.height / 2) {
statusStyle.value = {
...statusBaseStyle,
top: '1px',
left: '1px'
right: '1px'
}
isActionIndicatorOverlapsStatus = true
} else {
statusStyle.value = {
...statusBaseStyle,
bottom: '1px',
right: '1px'
}
}
if (mouseY > annotationStore.video.height / 2) {
if (mouseX < annotationStore.video.width / 2 && mouseY > annotationStore.video.height / 2) {
actionIndicatorStyle.value = {
top: isActionIndicatorOverlapsStatus ? '17px' : '0'
top: '0'
}
} else {
actionIndicatorStyle.value = {
Expand Down Expand Up @@ -1163,24 +1161,22 @@ const handleTouchmove = event => {
y: mouseY
}
}
let isActionIndicatorOverlapsStatus = false
if (mouseX > annotationStore.video.width / 2 && mouseY > annotationStore.video.height / 2) {
statusStyle.value = {
...statusBaseStyle,
top: '1px',
left: '1px'
right: '1px'
}
isActionIndicatorOverlapsStatus = true
} else {
statusStyle.value = {
...statusBaseStyle,
bottom: '1px',
right: '1px'
}
}
if (mouseY > annotationStore.video.height / 2) {
if (mouseX < annotationStore.video.width / 2 && mouseY > annotationStore.video.height / 2) {
actionIndicatorStyle.value = {
top: isActionIndicatorOverlapsStatus ? '17px' : '0'
top: '0'
}
} else {
actionIndicatorStyle.value = {
Expand Down

0 comments on commit 1326ced

Please sign in to comment.