Skip to content

Commit

Permalink
Fixed missing <script> tag and added overlays to settingsTab.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtiessen1175 committed Sep 10, 2024
1 parent d15366d commit f89eb86
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/public/assets/scripts/annotations.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/assets/scripts/main.js": "/assets/scripts/main.js?id=2841cb161cd2f12e8413f919d09168b3",
"/assets/scripts/volumes.js": "/assets/scripts/volumes.js?id=68b2595cd29676ad8496e5f5a04a32f5",
"/assets/scripts/annotations.js": "/assets/scripts/annotations.js?id=121063d6a28ea875139802747178f18e",
"/assets/scripts/annotations.js": "/assets/scripts/annotations.js?id=d89c3ee524b17cf424cbff0087bde1ab",
"/assets/styles/main.css": "/assets/styles/main.css?id=bf09d95dc04208c3ee738dafbf8e123c"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export default {
data() {
return {
opacityValue: '1',
volumeId: null,
overlays: null,
}
},
computed: {
Expand All @@ -38,9 +40,17 @@ export default {
},
created() {
this.volumeId = biigle.$require('annotations.volumeId');
this.overlays = biigle.$require('annotations.overlays');
if (this.settings.has('contextLayerOpacity')) {
this.opacityValue = this.settings.get('contextLayerOpacity');
// check if there are context-overlays
if(this.overlays.length !== 0) {
// check if an opacity preference is available in settings and change it in case
if (this.settings.has('contextLayerOpacity')) {
this.opacityValue = this.settings.get('contextLayerOpacity');
}
} else {
// if no context-overlays available
}
}
};
};
</script>
2 changes: 1 addition & 1 deletion src/resources/views/annotationsSettingsTab.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<component :is="plugins.contextLayer" :settings="settings" inline-template>
<div class="sidebar-tab__section">
<div v-if="overlays.length !== 0" class="sidebar-tab__section">
<h5 title="Opacity of the context layer">Context Layer (<span v-if="shown" v-text="opacity"></span><span v-else>hidden</span>)</h5>
<div class="form-group">
<input type="range" min="0" max="1" step="0.1" v-model="opacityValue">
Expand Down

0 comments on commit f89eb86

Please sign in to comment.