Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update image annotation cursor to pointer on hover #2609

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ exports[`Annotation with customised annotation points 1`] = `
class="hover-wrapper"
>
<div
style="color: red;"
class="element-wrapper"
>
Hi
<div
style="color: red;"
>
Hi
</div>
</div>

<div
Expand Down Expand Up @@ -68,11 +72,15 @@ exports[`Annotation with customised annotation points 1`] = `
<div
class="hover-wrapper"
>
<span
class="badge bg-primary"
<div
class="element-wrapper"
>
Primary
</span>
<span
class="badge bg-primary"
>
Primary
</span>
</div>

<div
class="hover-label"
Expand Down Expand Up @@ -121,10 +129,14 @@ exports[`Annotation with different visual annotation points 1`] = `
<div
class="hover-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
class="element-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
</div>

<div
class="hover-label"
Expand Down Expand Up @@ -155,10 +167,14 @@ exports[`Annotation with different visual annotation points 1`] = `
<div
class="hover-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 60px; height: 60px; cursor: default;"
/>
<div
class="element-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 60px; height: 60px; cursor: default;"
/>
</div>

<div
class="hover-label"
Expand Down Expand Up @@ -189,10 +205,14 @@ exports[`Annotation with different visual annotation points 1`] = `
<div
class="hover-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
class="element-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
</div>

<div
class="hover-label"
Expand Down Expand Up @@ -223,10 +243,14 @@ exports[`Annotation with different visual annotation points 1`] = `
<div
class="hover-wrapper"
>
<button
class="hover-point"
style="background-color: red; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
class="element-wrapper"
>
<button
class="hover-point"
style="background-color: red; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
</div>

<div
class="hover-label"
Expand Down Expand Up @@ -257,10 +281,14 @@ exports[`Annotation with different visual annotation points 1`] = `
<div
class="hover-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.7; width: 40px; height: 40px; cursor: default;"
/>
<div
class="element-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.7; width: 40px; height: 40px; cursor: default;"
/>
</div>

<div
class="hover-label"
Expand Down Expand Up @@ -291,10 +319,14 @@ exports[`Annotation with different visual annotation points 1`] = `
<div
class="hover-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
class="element-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
</div>

<div
class="hover-label"
Expand Down Expand Up @@ -325,10 +357,14 @@ exports[`Annotation with different visual annotation points 1`] = `
<div
class="hover-wrapper"
>
<button
class="hover-point"
style="background-color: black; opacity: 1; width: 40px; height: 40px; cursor: default;"
/>
<div
class="element-wrapper"
>
<button
class="hover-point"
style="background-color: black; opacity: 1; width: 40px; height: 40px; cursor: default;"
/>
</div>

<div
class="hover-label"
Expand Down Expand Up @@ -359,10 +395,14 @@ exports[`Annotation with different visual annotation points 1`] = `
<div
class="hover-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
class="element-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
</div>

<div
class="hover-label"
Expand Down Expand Up @@ -411,10 +451,14 @@ exports[`Annotation with markdown in header, content and label 1`] = `
<div
class="hover-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
class="element-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
</div>

<div
class="hover-label"
Expand Down Expand Up @@ -445,10 +489,14 @@ exports[`Annotation with markdown in header, content and label 1`] = `
<div
class="hover-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
class="element-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
</div>

<div
class="hover-label"
Expand Down Expand Up @@ -479,10 +527,14 @@ exports[`Annotation with markdown in header, content and label 1`] = `
<div
class="hover-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
class="element-wrapper"
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
</div>

<div
class="hover-label"
Expand Down
16 changes: 12 additions & 4 deletions packages/vue-components/src/annotations/AnnotatePoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
shift-cross-axis
>
<div class="hover-wrapper">
<slot>
<button class="hover-point" :style="pointStyle">
</button>
</slot>
<div class="element-wrapper">
<slot>
<button class="hover-point" :style="pointStyle">
</button>
</slot>
</div>
<div class="hover-label" :style="labelStyle">
<slot name="label"></slot>
</div>
Expand Down Expand Up @@ -271,6 +273,12 @@ export default {
margin: 0;
}

.element-wrapper > * {
position: relative;
z-index: 1;
cursor: pointer;
}

.hover-wrapper {
z-index: 0;
background: transparent;
Expand Down