Skip to content

Commit

Permalink
browser detection b/c only Safari cannot vector-effect #64
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rind committed Dec 14, 2021
1 parent e9920ee commit e180c5e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/NetworkMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
@click="clickAlter(mark.d)"
/>
<text
v-if="alteriNames"
v-if="alteriNames && useTextBG"
class="textbg"
vector-effect="non-scaling-stroke"
:x="mark.x"
Expand Down Expand Up @@ -348,6 +348,14 @@ export default defineComponent({
connections: computed(() => store.state.view.connections),
Sectors,
SYMBOL_DECEASED,
// TODO browser detection b/c vector-effect seems not to work in Safari only as of 14 Dec 2021
useTextBG: computed(
() =>
!(
/Safari/.test(navigator.userAgent) &&
/Apple Computer/.test(navigator.vendor)
)
),
};
},
});
Expand Down

0 comments on commit e180c5e

Please sign in to comment.