Commit f4e5928e authored by Moreau Nicolas's avatar Moreau Nicolas
Browse files

Removes now unused file

parent 1992d796
class SAMPPublisher {
static enter(what) {
console.group(this.name + "." + what);
}
static exit() {
console.groupEnd();
}
constructor(FITSHeader, urlRoot, connector) {
SAMPPublisher.enter(this.constructor.name);
this.FITSHeader = FITSHeader;
this.connector = connector;
this.relSlicePNGPath = "";
this.urlRoot = urlRoot;
SAMPPublisher.exit();
}
isPublishable() {
return (_FITSHeader["CTYPE3"] === "FREQ" || _FITSHeader["CTYPE3"] === "VRAD") && _FITSHeader["NAXIS3"] > 1;
}
sendPNGSlice() {
//_connector.runWithConnection(_sendPNGSlice);
SAMPPublisher.enter(this.sendPNGSlice.name);
var baseUrl = window.location.origin;
var pngUrl = this.urlRoot + "/" + this.relSlicePNGPath;
console.log("About to send this message 'load " + pngUrl + "' to the HUB");
var msg = new samp.Message("script.aladin.send", { "script": "load " + pngUrl });
this.connector.connection.notifyAll([msg]);
SAMPPublisher.exit();
}
setSliceRelPNGPath = function(relSlicePNGPath) {
SAMPPublisher.enter(this.setSliceRelPNGPath.name);
console.log("SAMPPublisher.setSliceRelPNGPath: entering");
this.relSlicePNGPath = relSlicePNGPath;
SAMPPublisher.exit();
};
}
class PublishSAMP {
constructor(sAMPPublisher) {
this.publisher = sAMPPublisher;
this.button = document.createElement("button");
this.button.setAttribute("type", "button");
this.button.setAttribute("class", "btn btn-primary btn-sm");
this.button.setAttribute("data-tooltip", "tooltip");
this.button.setAttribute("title", "Publish image via a SAMP hub");
let x = document.createElement("span");
x.setAttribute("class", "fas fa-location-arrow");
this.button.appendChild(x);
$(this.button).on("click", function(event) {
sAMPPublisher.sendPNGSlice();
});
}
getButton() {
return this.button;
}
}
export {
PublishSAMP
//SAMPPublisher
}
\ No newline at end of file
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