Skip to content

Commit

Permalink
move Logger to tab content (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ok09ra authored and shundroid committed Sep 10, 2022
1 parent 908125d commit fc49d75
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
13 changes: 10 additions & 3 deletions src/components/Logger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,24 @@ const props = defineProps<{
width?: number;
height?: number;
cssClasses?: string;
target?: string;
}>();
const store = useStore();
const { time } = toRefs(store);
store.registerOutput("protein-mCherry");
const { target } = toRefs(props);
console.log("TARGET:" + target.value);
store.registerOutput(target.value);
onUnmounted(() => {
store.UnregisterOutput("protein-mCherry");
store.UnregisterOutput(target.value);
});
watch(time, () => {
chartData.value.datasets[0].data[time.value] =
store.runnerOutputs["protein-mCherry"];
store.runnerOutputs[target.value];
console.log(store.runnerOutputs[target.value]);
});
const chartData = ref({
Expand Down
2 changes: 0 additions & 2 deletions src/components/Property.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<tab-protein v-if="activeTab === 'Protein'" />
<tab-questions v-if="activeTab === 'Questions'" />
<tab-load v-if="activeTab === 'Load'" />
<logger />
</div>
</div>
</template>
Expand All @@ -26,7 +25,6 @@ import TabMessengerRNA from "@/components/TabMessengerRNA.vue";
import TabProtein from "@/components/TabProtein.vue";
import TabQuestions from "@/components/TabQuestions.vue";
import TabLoad from "@/components/TabLoad.vue";
import Logger from "./Logger.vue";
const store = useStore();
const { run, stop } = store;
Expand Down
2 changes: 2 additions & 0 deletions src/components/TabMessengerRNA.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/>
<div class="mRNA-settings" v-if="activeMessengerRNA">
<h3>{{ activeMessengerRNAName }}</h3>
<Logger :target="activeMessengerRNAName" />
Promoter(s):
<list-box :list="promoterNames" v-model="activePromoterName" />
<section v-if="activePromoter">
Expand All @@ -21,6 +22,7 @@
import { computed, watch, ref } from "vue";
import { useStore } from "@/store";
import ListBox from "@/components/ListBox.vue";
import Logger from "./Logger.vue";
const store = useStore();
const mRNANames = computed(() =>
Expand Down
2 changes: 2 additions & 0 deletions src/components/TabProtein.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<div class="protein-settings" v-if="activeProtein">
<h3>{{ activeProteinName }}</h3>
{{ activeProtein.description }}<br />
<Logger :target="activeProteinName" />
mRNA(s):<br />
<list-box :list="activeProteinMessengerRNAs" />
</div>
Expand All @@ -19,6 +20,7 @@ import { computed, watch, ref } from "vue";
import { useStore } from "@/store";
import ListBox from "@/components/ListBox.vue";
import LineChart from "@/components/Logger.vue";
import Logger from "./Logger.vue";
const store = useStore();
Expand Down

0 comments on commit fc49d75

Please sign in to comment.