Skip to content

Commit

Permalink
Disable popover in a-point when there is no header or content (MarkBi…
Browse files Browse the repository at this point in the history
  • Loading branch information
yucheng11122017 authored Feb 25, 2024
1 parent 15bf079 commit e1ba80e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ exports[`Annotation with different visual annotation points 1`] = `
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: pointer;"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
Expand Down Expand Up @@ -153,7 +153,7 @@ exports[`Annotation with different visual annotation points 1`] = `
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 60px; height: 60px; cursor: pointer;"
style="background-color: green; opacity: 0.3; width: 60px; height: 60px; cursor: default;"
/>
<div
Expand Down Expand Up @@ -187,7 +187,7 @@ exports[`Annotation with different visual annotation points 1`] = `
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: pointer;"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
Expand Down Expand Up @@ -221,7 +221,7 @@ exports[`Annotation with different visual annotation points 1`] = `
>
<button
class="hover-point"
style="background-color: red; opacity: 0.3; width: 40px; height: 40px; cursor: pointer;"
style="background-color: red; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
Expand Down Expand Up @@ -255,7 +255,7 @@ exports[`Annotation with different visual annotation points 1`] = `
>
<button
class="hover-point"
style="background-color: green; opacity: 0.7; width: 40px; height: 40px; cursor: pointer;"
style="background-color: green; opacity: 0.7; width: 40px; height: 40px; cursor: default;"
/>
<div
Expand Down Expand Up @@ -289,7 +289,7 @@ exports[`Annotation with different visual annotation points 1`] = `
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: pointer;"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
Expand Down Expand Up @@ -323,7 +323,7 @@ exports[`Annotation with different visual annotation points 1`] = `
>
<button
class="hover-point"
style="background-color: black; opacity: 1; width: 40px; height: 40px; cursor: pointer;"
style="background-color: black; opacity: 1; width: 40px; height: 40px; cursor: default;"
/>
<div
Expand Down Expand Up @@ -357,7 +357,7 @@ exports[`Annotation with different visual annotation points 1`] = `
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: pointer;"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
Expand Down Expand Up @@ -407,7 +407,7 @@ exports[`Annotation with markdown in header, content and label 1`] = `
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: pointer;"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
Expand Down Expand Up @@ -441,7 +441,7 @@ exports[`Annotation with markdown in header, content and label 1`] = `
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: pointer;"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
Expand Down Expand Up @@ -475,7 +475,7 @@ exports[`Annotation with markdown in header, content and label 1`] = `
>
<button
class="hover-point"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: pointer;"
style="background-color: green; opacity: 0.3; width: 40px; height: 40px; cursor: default;"
/>
<div
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-components/src/annotations/AnnotatePoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default {
return this.legend === 'bottom' || this.legend === 'both';
},
hasPopover() {
return this.legend === 'popover' || this.legend === 'both';
return (this.hasContent || this.hasHeader) && (this.legend === 'popover' || this.legend === 'both');
},
computedBottomHeader() {
if (this.label !== '' && this.header === '') {
Expand Down

0 comments on commit e1ba80e

Please sign in to comment.