Commit 36d27f04 authored by Caillat Michel's avatar Caillat Michel
Browse files

Code cleanup and new include

parent abc91c38
...@@ -179,10 +179,16 @@ th, td { ...@@ -179,10 +179,16 @@ th, td {
<div id="FITSHDR" class="overlay" style="overflow:scroll"></div> <div id="FITSHDR" class="overlay" style="overflow:scroll"></div>
<% include olqv_infosblock %> <% include olqv_infosblock %>
<% include olqv_navbar_external_content %> <% include olqv_navbar_external_content %>
<% include olqv_settings %>
<% include olqv_customcontrols %> <% include olqv_customcontrols %>
<% include olqv_reset %> <% include olqv_reset %>
<% include olqv_samp_publisher %> <% include olqv_samp_publisher %>
<% include olqv_shapes %>
<% include olqv_contours %>
<% include olqv_boxes %> <% include olqv_boxes %>
<% include olqv_markers %>
<% include olqv_keyboardevents %>
<div id="fullscreen" class="fullscreen"> <div id="fullscreen" class="fullscreen">
<div class="sidepanel"> <div class="sidepanel">
<nav class="navbar navbar-dark bg-dark"> <nav class="navbar navbar-dark bg-dark">
...@@ -251,12 +257,13 @@ var _imageLoadFunction_1 = function(image, src) { ...@@ -251,12 +257,13 @@ var _imageLoadFunction_1 = function(image, src) {
** one image built from the content of a 2D FITS file ** one image built from the content of a 2D FITS file
*/ */
var _canvasContext = null; var _canvasContext = null;
var yAFITSContoursViewer; var contoursFactory;
var yaFITSContoursGUI; var contoursFactoryGUI;
var reset; var reset;
var settings; var settings;
var boxTool; var boxTool;
var keyCodeProcessor;
var format = function(floatValue) { var format = function(floatValue) {
let result = floatValue; let result = floatValue;
...@@ -609,7 +616,7 @@ var _marker_styles_f = function(feature) { ...@@ -609,7 +616,7 @@ var _marker_styles_f = function(feature) {
let properties = selectedFeature.get("properties"); let properties = selectedFeature.get("properties");
let level = properties["level"]["value"].toExponential(3); let level = properties["level"]["value"].toExponential(3);
if ("measurements" in properties) { if ("measurements" in properties) {
yAFITSContoursViewer.selected(selectedFeature); contoursFactory.selected(selectedFeature);
} }
else { else {
document.getElementById('loading').style.display="block"; document.getElementById('loading').style.display="block";
...@@ -624,7 +631,7 @@ var _marker_styles_f = function(feature) { ...@@ -624,7 +631,7 @@ var _marker_styles_f = function(feature) {
console.log(resp["result"]); console.log(resp["result"]);
properties["measurements"]=resp["result"]; properties["measurements"]=resp["result"];
selectedFeature.set("properties",properties); selectedFeature.set("properties",properties);
yAFITSContoursViewer.selected(selectedFeature); contoursFactory.selected(selectedFeature);
} }
console.log('measureContour callback : exiting'); console.log('measureContour callback : exiting');
}); });
...@@ -1115,7 +1122,10 @@ $( document ).ready(function() { ...@@ -1115,7 +1122,10 @@ $( document ).ready(function() {
sliceViewer = new SliceViewer (relFITSFilePath, width, height, RADECRangeInDegrees, header, "slice"); sliceViewer = new SliceViewer (relFITSFilePath, width, height, RADECRangeInDegrees, header, "slice");
sliceViewer.display(); sliceViewer.display();
document.addEventListener('keydown', sliceViewer.processKeyCode, false); //document.addEventListener('keydown', sliceViewer.processKeyCode, false);
keyCodeProcessor = new KeyCodeProcessor(sliceViewer);
keyCodeProcessor.open();
infosBlock = new InfosBlock(sliceViewer); infosBlock = new InfosBlock(sliceViewer);
...@@ -1135,11 +1145,11 @@ $( document ).ready(function() { ...@@ -1135,11 +1145,11 @@ $( document ).ready(function() {
markerFactory = new MarkerFactory(sliceViewer); markerFactory = new MarkerFactory(sliceViewer);
customControls.addButton(markerFactory.getButton()); customControls.addButton(markerFactory.getButton());
yAFITSContoursViewer = new ContoursViewer(sliceViewer, infosBlock); contoursFactory = new ContoursFactory(sliceViewer, infosBlock);
customControls.addButton(yAFITSContoursViewer.getButton()); customControls.addButton(contoursFactory.getButton());
yAFITSContoursGUI = new ContoursGUI(); contoursFactoryGUI = new ContoursFactoryGUI();
yAFITSContoursGUI.connect(yAFITSContoursViewer, sliceViewer); contoursFactoryGUI.connect(contoursFactory, sliceViewer);
boxFactory = new BoxFactory(sliceViewer, infosBlock); boxFactory = new BoxFactory(sliceViewer, infosBlock);
customControls.addButton(boxFactory.getButton()); customControls.addButton(boxFactory.getButton());
......
<% include olqv_settings %>
<% include olqv_markers %>
<% include olqv_contours %>
<div class="pos-f-t"> <div class="pos-f-t">
<div class="collapse" id="sampRegistry"></div> <div class="collapse" id="sampRegistry"></div>
<div class="collapse" id="navbarToggleExternalContent"> <div class="collapse" id="navbarToggleExternalContent">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment