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

DM-18167 display_firefly needs to handle viewer_ids properly #28

Merged
merged 2 commits into from
Mar 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 22 additions & 4 deletions python/lsst/display/firefly/firefly.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,15 @@ def _mtv(self, image, mask=None, wcs=None, title=""):
fd.seek(0, 0)
self._fireflyFitsID = _fireflyClient.upload_data(fd, 'FITS')

try:
viewer_id = ('image-' + str(_fireflyClient.render_tree_id) + '-' +
str(self.frame))
except AttributeError:
viewer_id = 'image-' + str(self.frame)
extraParams = dict(Title=title,
MultiImageIdx=0,
PredefinedOverlayIds=' ',
viewer_id='image-' + str(self.frame))
viewer_id=viewer_id)
# Firefly's Javascript API requires a space for parameters;
# otherwise the parameter will be ignored

Expand Down Expand Up @@ -517,12 +522,25 @@ def resetLayout(self):
plot area in upper right, and plots stretch across the bottom
"""
self.clearViewer()
try:
tables_cell_id = 'tables-' + str(_fireflyClient.render_tree_id)
except AttributeError:
tables_cell_id = 'tables'
self._client.add_cell(row=2, col=0, width=4, height=2, element_type='tables',
cell_id='tables')
cell_id=tables_cell_id)
try:
image_cell_id = ('image-' + str(_fireflyClient.render_tree_id) + '-' +
str(self.frame))
except AttributeError:
image_cell_id = 'image-' + str(self.frame)
self._client.add_cell(row=0, col=0, width=2, height=3, element_type='images',
cell_id='image-%s' % str(self.display.frame))
cell_id=image_cell_id)
try:
plots_cell_id = 'plots-' + str(_fireflyClient.render_tree_id)
except AttributeError:
plots_cell_id = 'plots'
self._client.add_cell(row=0, col=2, width=2, height=3, element_type='xyPlots',
cell_id='plots')
cell_id=plots_cell_id)

def overlayFootprints(self, catalog, color='rgba(74,144,226,0.60)',
highlightColor='cyan', selectColor='orange',
Expand Down