Skip to content

Commit

Permalink
Update MRI page
Browse files Browse the repository at this point in the history
  • Loading branch information
dhovart committed Aug 10, 2022
1 parent 1eb44ad commit 9f0a440
Showing 1 changed file with 48 additions and 26 deletions.
74 changes: 48 additions & 26 deletions view/brainbox/src/components/MRIPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,42 +91,44 @@
</div>
</div>
<div class="right">
<div class="container">
<div id="stereotaxic" style="width: 100%; height: 100%"></div>
<OntologySelector
:ontology="ontology"
:open="displayOntology"
@on-close="displayOntology = false"
@label-click="handleOntologyLabelClick"
/>
<AdjustSettings
v-if="displayAdjustSettings"
:alpha="alpha"
@change-alpha="changeAlpha"
:brightness="brightness"
@change-brightness="changeBrightness"
:contrast="contrast"
@change-contrast="changeContrast"
/>
</div>
<div class="tools">
<Tools />
</div>
<Editor title="MRI" :dense="!displayChat && !displayScript" :class="{ fullscreen }">
<template v-slot:tools>
<Tools />
</template>
<template v-slot:content>
<div id="stereotaxic" style="width: 100%; height: 100%"></div>
<OntologySelector
:ontology="ontology"
:open="displayOntology"
@on-close="displayOntology = false"
@label-click="handleOntologyLabelClick"
/>
<AdjustSettings
v-if="displayAdjustSettings"
:alpha="alpha"
@change-alpha="changeAlpha"
:brightness="brightness"
@change-brightness="changeBrightness"
:contrast="contrast"
@change-contrast="changeContrast"
/>
</template>
</Editor>
</div>
</main>
</Wrapper>
</template>
<script setup>
import { ref, onMounted } from "vue";
import { ref, onMounted, watch } from "vue";
import {
Wrapper,
Header,
Footer,
Editor,
Table,
AdjustSettings,
OntologySelector,
Access,
} from "nwl-components";
OntologySelector,
AdjustSettings
} from "nwl-components/dist/nwl-components.umd.js";
import Tools from "./Tools.vue";
import useVisualization from "../store/visualization";
import { keyBy, mapValues, flatten, map } from "lodash";
Expand All @@ -142,11 +144,24 @@ const {
changeAlpha,
changeBrightness,
changeContrast,
fullscreen,
displayChat,
displayScript,
init: initVisualization,
} = useVisualization();
const selectedIndex = ref(0);
watch(fullscreen, () => {
if(!fullscreen.value) {
const tools = document.querySelector('.area .tools');
setTimeout(() => {
tools.style.left = '10px';
tools.style.top = '10px';
}, 100)
}
})
const selectVolumeAnnotation = async (index) => {
selectedIndex.value = index;
await AtlasMakerWidget.configureAtlasMaker(BrainBox.info, index);
Expand Down Expand Up @@ -199,6 +214,13 @@ main {
position: relative;
}
.area.fullscreen {
position: absolute;
width: 100%;
height: calc(100vh - 82px);
left: 0;
}
.left {
flex-grow: 1;
max-width: 900px;
Expand Down

0 comments on commit 9f0a440

Please sign in to comment.