-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Subset control plugin [ci skip]
- Loading branch information
Showing
5 changed files
with
65 additions
and
0 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 @@ | ||
from .subset_control import * # noqa |
20 changes: 20 additions & 0 deletions
20
jdaviz/configs/imviz/plugins/subset_control/subset_control.py
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,20 @@ | ||
from jdaviz.core.registries import tray_registry | ||
from jdaviz.core.template_mixin import TemplateMixin | ||
from jdaviz.utils import load_template | ||
|
||
__all__ = ['SubsetControl'] | ||
|
||
|
||
@tray_registry('imviz-subset-control', label="Subset Control") | ||
class SubsetControl(TemplateMixin): | ||
template = load_template("subset_control.vue", __file__).tag(sync=True) | ||
|
||
# TODO: | ||
# 1. Let user select which subset to operate on. | ||
# 2. Hide angle field when it does not make sense (e.g., circle) | ||
# 3. Grab new values from user inputs | ||
# 4. Apply new values to Subset | ||
|
||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
|
41 changes: 41 additions & 0 deletions
41
jdaviz/configs/imviz/plugins/subset_control/subset_control.vue
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,41 @@ | ||
<template> | ||
<v-card flat tile> | ||
<v-container> | ||
<v-row> | ||
<v-col> | ||
<v-text-field | ||
ref="new_subset_angle" | ||
label="New Angle" | ||
v-model="new_subset_angle" | ||
hint="New angle for subset." | ||
persistent-hint | ||
disabled="True" | ||
></v-text-field> | ||
</v-col> | ||
</v-row> | ||
<v-row> | ||
<v-col> | ||
<v-text-field | ||
ref="new_subset_x" | ||
label="New X" | ||
v-model="new_subset_x" | ||
hint="New X for subset." | ||
persistent-hint | ||
disabled="True" | ||
></v-text-field> | ||
</v-col> | ||
</v-row> | ||
<v-row> | ||
<v-col> | ||
<v-text-field | ||
ref="new_subset_y" | ||
label="New Y" | ||
v-model="new_subset_y" | ||
hint="New Y for subset." | ||
persistent-hint | ||
disabled="True" | ||
</v-col> | ||
</v-row> | ||
</v-container> | ||
</v-card> | ||
</template> |