Skip to content

Commit

Permalink
tweak html and fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
sglasberg committed Jul 10, 2024
1 parent 379f0be commit 6779830
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 5 additions & 11 deletions tom_targets/templates/tom_targets/partials/aladin_skymap.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- insert this snippet where you want Aladin Lite viewer to appear -->
<div id="aladin-lite-div" style="width:500px;height:400px;"></div>
<script type="text/javascript" src="https://aladin.cds.unistra.fr/AladinLite/api/v3/3.2.0/aladin.js" charset="utf-8"></script>
<div id="aladin-lite-div" style="width:auto; height:800px; margin:auto; margin-top: 10px;" ></div>
<script type="text/javascript" src="https://aladin.cds.unistra.fr/AladinLite/api/v3/latest/aladin.js" charset="utf-8"></script>
<script type="text/javascript">

let aladin;
Expand All @@ -11,10 +11,11 @@
fov:350,
projection:"MOL",
showReticle: false,
showCooGrid: false,
showCooGrid: true,
showCooGridControl: true,
});

aladin.setCooGrid({ color: 'red', labelSize: 10 });

var targets = {{ targets|safe }}; //targets cannot be a queryset; here it is a list of dictionaries

Expand All @@ -24,7 +25,7 @@
//console.log(target);
var cat = A.catalog({name: 'Some markers', color: 'blue', sourceSize: 18});
aladin.addCatalog(cat);
popup_info = ['RA: ', target.ra, '<br>' , 'Dec: ', target.dec];
popup_info = ['RA: '.concat(target.ra, '<br>', 'Dec: ', target.dec)];
cat.addSources([A.marker(target.ra, target.dec, {popupTitle: target.name, popupDesc: popup_info})]);

}
Expand All @@ -35,10 +36,3 @@
});
</script>


{% for target in targets %}
{{target.name}}<br>
RA: {{target.ra}}<br>
Dec: {{target.dec}}<br>
{% endfor %}

2 changes: 1 addition & 1 deletion tom_targets/templates/tom_targets/target_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>
</div>
{% select_target_js %}
{% target_distribution filter.qs %}
<!-- {% target_distribution filter.qs %} -->
{% aladin_skymap object_list %}
{% bootstrap_pagination page_obj extra=request.GET.urlencode %}
<label id="displaySelected"></label>
Expand Down

0 comments on commit 6779830

Please sign in to comment.