forked from spacetelescope/jdaviz
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
data-menu: implement action bar (delete, edit subset, metadata) (spac…
- Loading branch information
Showing
10 changed files
with
585 additions
and
59 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,14 @@ | ||
<template> | ||
<j-tooltip | ||
:tooltipcontent="'sublayer of '+icon[0].toUpperCase()" | ||
span_style="display: inline-block" | ||
> | ||
<v-icon dense>mdi-layers-outline</v-icon> | ||
</j-tooltip> | ||
</template> | ||
|
||
<script> | ||
module.exports = { | ||
props: ['icon'] | ||
}; | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<template> | ||
<v-menu | ||
absolute | ||
offset-y | ||
left | ||
> | ||
<template v-slot:activator="{ on, attrs }"> | ||
<j-tooltip | ||
:span_style="'display: inline-block; float: right; ' + (delete_enabled ? '' : 'cursor: default;')" | ||
:tooltipcontent="delete_tooltip" | ||
> | ||
<v-btn | ||
icon | ||
v-bind="attrs" | ||
v-on="on" | ||
:disabled="!delete_enabled" | ||
> | ||
<v-icon class="invert-if-dark">mdi-delete</v-icon> | ||
</v-btn> | ||
</j-tooltip> | ||
</template> | ||
<v-list dense style="width: 200px"> | ||
<v-list-item> | ||
<v-list-item-content> | ||
<j-tooltip | ||
:tooltipcontent="delete_viewer_tooltip" | ||
> | ||
<span | ||
style="cursor: pointer; width: 100%" | ||
@click="() => {$emit('remove-from-viewer')}" | ||
> | ||
Remove from viewer | ||
</span> | ||
</j-tooltip> | ||
</v-list-item-content> | ||
</v-list-item> | ||
<v-list-item> | ||
<v-list-item-content> | ||
<j-tooltip | ||
:span_style="'display: inline-block; float: right; ' + (delete_app_enabled ? '' : 'cursor: default;')" | ||
:tooltipcontent="delete_app_tooltip" | ||
> | ||
<span | ||
:style="'width: 100%; ' + (delete_app_enabled ? 'cursor: pointer;' : '')" | ||
:disabled="!delete_app_enabled" | ||
@click="() => {if (delete_app_enabled) {$emit('remove-from-app')}}" | ||
> | ||
Remove from app | ||
</span> | ||
</j-tooltip> | ||
</v-list-item-content> | ||
</v-list-item> | ||
</v-list> | ||
</v-menu> | ||
</template> | ||
|
||
<script> | ||
module.exports = { | ||
props: ['delete_enabled', 'delete_tooltip', 'delete_viewer_tooltip', 'delete_app_enabled', 'delete_app_tooltip'], | ||
}; | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<template> | ||
<v-menu | ||
v-if="selected_n_subsets > 0" | ||
absolute | ||
offset-y | ||
bottom | ||
left | ||
> | ||
<template v-slot:activator="{ on, attrs }"> | ||
<j-tooltip | ||
:span_style="'display: inline-block; float: right; ' + (subset_edit_enabled ? '' : 'cursor: default;')" | ||
:tooltipcontent="subset_edit_tooltip" | ||
> | ||
<v-btn | ||
text | ||
class="invert-if-dark" | ||
v-bind="attrs" | ||
v-on="on" | ||
:disabled="!subset_edit_enabled" | ||
> | ||
Edit Subset | ||
</v-btn> | ||
</j-tooltip> | ||
</template> | ||
<v-list dense style="width: 300px"> | ||
<v-list-item> | ||
<v-list-item-content> | ||
<j-tooltip :tooltipcontent="'Open '+subset_selected+' in Subset Tools plugin'"> | ||
<span | ||
style="cursor: pointer; width: 100%" | ||
@click="() => {$emit('view-info')}" | ||
> | ||
Edit in plugin | ||
</span> | ||
</j-tooltip> | ||
</v-list-item-content> | ||
</v-list-item> | ||
|
||
<v-divider></v-divider> | ||
|
||
<v-list-item | ||
v-for="mode_item in subset_edit_modes" | ||
@mouseover="() => {hover_mode=mode_item.glue_name}" | ||
@mouseleave="() => {if (hover_mode == mode_item.glue_name) {hover_mode=''}}" | ||
> | ||
<v-list-item-icon style="margin-right: 4px"> | ||
<img :src="mode_item.icon"/> | ||
</v-list-item-icon> | ||
<v-list-item-content> | ||
<!-- | ||
<data-menu-subset-edit-modify | ||
:mode_item="mode_item" | ||
/> | ||
--> | ||
{{ mode_item.glue_name }} | ||
</v-list-item-content> | ||
<v-list-item-action style="display: inline-block" v-if="hover_mode == mode_item.glue_name"> | ||
<j-tooltip | ||
v-for="tool in subset_tools.slice().reverse()" | ||
:span_style="'display: inline-block; float: right;'" | ||
:tooltipcontent="'Interactively apply \'' + mode_item.glue_name + '\' logic to ' + subset_selected + ' using the ' + tool.name + ' tool'" | ||
> | ||
<v-btn | ||
icon | ||
max-height="24px" | ||
max-width="24px" | ||
@click="() => {$emit('modify-subset', mode_item.glue_name, tool.name)}" | ||
> | ||
<img :src="tool.img" class="invert-if-dark" width="20"/> | ||
</v-btn> | ||
</j-tooltip> | ||
</v-list-item-action> | ||
</v-list-item> | ||
|
||
</v-list> | ||
</v-menu> | ||
</template> | ||
|
||
<script> | ||
module.exports = { | ||
data: function () { | ||
return { | ||
hover_mode: '', | ||
} | ||
}, | ||
props: ['subset_selected', 'subset_edit_enabled', 'subset_edit_tooltip', 'selected_n_subsets', 'subset_edit_modes', 'subset_tools'], | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.v-list-item__icon, .v-list-item__content, .v-list-item__action { | ||
/* even denser than dense */ | ||
padding-top: 2px !important; | ||
padding-bottom: 2px !important; | ||
margin-top: 0px !important; | ||
margin-bottom: 0px !important; | ||
} | ||
</style> |
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,14 @@ | ||
<template> | ||
<j-tooltip | ||
tooltipcontent="plugin results automatically update" | ||
span_style="display: inline-block" | ||
> | ||
<v-icon dense>mdi-reload-alert</v-icon> | ||
</j-tooltip> | ||
</template> | ||
|
||
<script> | ||
module.exports = { | ||
props: [] | ||
}; | ||
</script> |
Oops, something went wrong.