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