-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* import menu with add data to viewer support * create subset support * filter available data per-viewer * basic test coverage
- Loading branch information
Showing
13 changed files
with
274 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<template> | ||
<v-menu | ||
absolute | ||
offset-y | ||
left | ||
v-if="dataset_items.length > 0 || subset_tools.length > 0" | ||
> | ||
<template v-slot:activator="{ on, attrs }"> | ||
<j-tooltip | ||
v-if="dataset_items.length > 0 || subset_tools.length > 0" | ||
tooltipcontent="Add data or subset to viewer" | ||
> | ||
<v-btn | ||
icon | ||
v-bind="attrs" | ||
v-on="on" | ||
> | ||
<v-icon class="invert-if-dark">mdi-plus</v-icon> | ||
</v-btn> | ||
</j-tooltip> | ||
</template> | ||
<v-list dense style="width: 200px; max-height: 300px; overflow-y: auto;"> | ||
<v-subheader v-if="dataset_items.length > 0"><span>Load Data</span></v-subheader> | ||
<v-list-item | ||
v-for="data in dataset_items" | ||
> | ||
<v-list-item-content> | ||
<j-tooltip tooltipcontent="add data to viewer"> | ||
<span | ||
style="cursor: pointer; width: 100%" | ||
@click="() => {$emit('add-data', data.label)}" | ||
> | ||
{{ data.label }} | ||
</span> | ||
</j-tooltip> | ||
</v-list-item-content> | ||
</v-list-item> | ||
<v-subheader v-if="subset_tools.length > 0"><span>Create Subset</span></v-subheader> | ||
<v-list-item | ||
v-if="subset_tools.length > 0" | ||
> | ||
<v-list-item-content style="display: inline-block"> | ||
<j-tooltip | ||
v-for="tool in subset_tools" | ||
span_style="display: inline-block" | ||
:tooltipcontent="'Create new '+tool.name+' subset'" | ||
> | ||
<v-btn | ||
icon | ||
@click="() => {$emit('create-subset', tool.name)}" | ||
> | ||
<img :src="tool.img" width="20" class="invert-if-dark"/> | ||
</v-btn> | ||
</j-tooltip> | ||
</v-list-item-content> | ||
</v-list-item> | ||
</v-list> | ||
</v-menu> | ||
|
||
</template> | ||
|
||
<script> | ||
module.exports = { | ||
props: ['dataset_items', 'subset_tools'], | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.