Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR #3276 on branch v4.0.x (Footprints plugin: handle subsets/markers when linking by WCS) #3280

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ Imviz

- Remove "From File.." option when running on an external server. [#3239]

- Button in the footprints plugin to change the link-type now redirects to the orientation plugin
when the change fails due to the presence of subsets or markers. [#3276]

- Updates UI language in the orientation plugin to better match API. [#3276]

Mosviz
^^^^^^

Expand Down
6 changes: 5 additions & 1 deletion jdaviz/configs/imviz/plugins/footprints/footprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ def vue_link_by_wcs(self, *args):
# call other plugin so that other options (wcs_fast_approximation, wcs_use_fallback)
# are retained. Remove this method if support for plotting footprints
# when pixel-linked is reintroduced.
self.app._jdaviz_helper.plugins['Orientation'].align_by = 'WCS'
op = self.app._jdaviz_helper.plugins['Orientation']
if op._obj.need_clear_astrowidget_markers or op._obj.need_clear_subsets:
op.open_in_tray()
else:
op.align_by = 'WCS'

def _ensure_first_overlay(self):
if not len(self._overlays):
Expand Down
17 changes: 11 additions & 6 deletions jdaviz/configs/imviz/plugins/orientation/orientation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@
</v-alert>

<v-alert
v-if="wcs_linking_available"
v-if="wcs_linking_available && !need_clear_astrowidget_markers && !need_clear_subsets"
type='warning'
class="ignore-api-hints"
style="margin-left: -12px; margin-right: -12px"
>
Switching link type will reset zoom.
Switching alignment will reset zoom.
</v-alert>

<v-alert
v-if="plugin_markers_exist && !need_clear_astrowidget_markers && !need_clear_subsets"
type='warning'
style="margin-left: -12px; margin-right: -12px"
>
Marker positions may not be pixel-perfect when changing alignment/linking options.
</v-alert>

<v-alert v-if="need_clear_astrowidget_markers" type='warning' style="margin-left: -12px; margin-right: -12px">
Expand All @@ -38,12 +46,9 @@
</v-row>
</v-alert>

<v-alert v-if="plugin_markers_exist" type='warning' style="margin-left: -12px; margin-right: -12px">
Marker positions may not be pixel-perfect when changing alignment/linking options.
</v-alert>

<v-alert v-if="need_clear_subsets" type='warning' style="margin-left: -12px; margin-right: -12px">
Existing subsets will be deleted on changing alignment/linking options.
Existing subsets must be deleted before changing alignment/linking options.
<v-row justify="end" style="margin-right: 2px; margin-top: 16px">
<v-btn @click="delete_subsets">
{{ api_hints_enabled ?
Expand Down
Loading