Skip to content

Commit 600289f

Browse files
authored
Merge pull request #395 from fiji-flo/fix-contact-me-org
center contact me in mobile orgchart
2 parents 8a7855c + 7574d6b commit 600289f

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/components/ui/ContactMe.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
<Popover
1515
class="contact-me"
1616
layer="var(--layerContactMe)"
17-
initialMaxWidth="310"
17+
:initialMaxWidth="310"
18+
:floating="false"
1819
>
1920
<div class="contact-me__item">
2021
<a :href="`mailto:${primaryEmail}`" class="contact-me__pair">

src/components/ui/Popover.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export default {
1515
type: Number,
1616
default: 350,
1717
},
18+
floating: {
19+
type: Boolean,
20+
default: true,
21+
},
1822
},
1923
methods: {
2024
positionAndSize() {
@@ -33,8 +37,9 @@ export default {
3337
const centeredSpaceOnRight = spaceOnRight + width / 2;
3438
3539
if (
36-
centeredSpaceOnLeft > 0.5 * this.maxWidth &&
37-
centeredSpaceOnRight > 0.5 * this.maxWidth
40+
!this.floating ||
41+
(centeredSpaceOnLeft > 0.5 * this.maxWidth &&
42+
centeredSpaceOnRight > 0.5 * this.maxWidth)
3843
) {
3944
return;
4045
}

0 commit comments

Comments
 (0)