Skip to content

Commit

Permalink
Hover over annotation highlights paperjs object, closes #107
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Feb 9, 2019
1 parent ac894e0 commit 761fe33
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion client/src/components/annotator/Annotation.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<template>
<div v-show="showSideMenu">
<div
v-show="showSideMenu"
@mouseenter="onMouseEnter"
@mouseleave="onMouseLeave"
>
<li
class="list-group-item btn btn-link btn-sm text-left"
:style="{ 'background-color': backgroundColor, color: 'white' }"
Expand Down Expand Up @@ -263,6 +267,16 @@ export default {
this.$emit("click", this.index);
}
},
onMouseEnter(event) {
if (this.compoundPath == null) return;
this.compoundPath.selected = true;
},
onMouseLeave(event) {
if (this.compoundPath == null) return;
this.compoundPath.selected = false;
},
getCompoundPath() {
if (this.compoundPath == null) {
this.createCompoundPath();
Expand Down

0 comments on commit 761fe33

Please sign in to comment.