aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-06-04 14:09:05 +1000
committerTerry Truong <terry06890@gmail.com>2022-06-04 14:09:05 +1000
commit3b105e543a0e2e7097e3156d3daa1bdc0bd3fc2b (patch)
tree53611a5f35d2adec7fc7a95e01cf6d315a994ec9 /src
parent87a355da9c185e054d827e07a0f5729189a8e6d8 (diff)
Add tile-info otol links
Diffstat (limited to 'src')
-rw-r--r--src/components/TileInfoModal.vue4
-rw-r--r--src/tol.ts2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/components/TileInfoModal.vue b/src/components/TileInfoModal.vue
index 1123387..6e1a8ab 100644
--- a/src/components/TileInfoModal.vue
+++ b/src/components/TileInfoModal.vue
@@ -123,7 +123,9 @@ export default defineComponent({
<h1 class="text-center text-xl font-bold mb-2">
{{displayName}}
<div v-if="tolNode != null">
- ({{tolNode.children.length}} children, {{tolNode.tips}} tips)
+ ({{tolNode.children.length}} children, {{tolNode.tips}} tips,
+ <a :href="'https://tree.opentreeoflife.org/opentree/argus/opentree13.4@' + tolNode.otolId">
+ OTOL Link</a>)
</div>
</h1>
<hr class="mb-4 border-stone-400"/>
diff --git a/src/tol.ts b/src/tol.ts
index aa9a9b1..59ecadc 100644
--- a/src/tol.ts
+++ b/src/tol.ts
@@ -6,6 +6,7 @@
export type TolMap = Map<string, TolNode>;
// Represents a tree-of-life node
export class TolNode {
+ otolId: string | null;
children: string[];
parent: string | null;
tips: number;
@@ -13,6 +14,7 @@ export class TolNode {
commonName: null | string;
imgName: null | string | [string, string] | [null, string] | [string, null];
constructor(children: string[] = [], parent = null, tips = 0, pSupport = false){
+ this.otolId = null;
this.children = children;
this.parent = parent;
this.tips = tips;