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

Fixes error : summed slice was not sent correctly via samp

parent d4b101a3
......@@ -365,6 +365,7 @@ class Slice {
* Creates default buttons on the slice viewer
*/
_initControl() {
console.log("### TEST");
let self = this;
let builder = new ImgControlBuilder();
let controls = [];
......@@ -405,18 +406,6 @@ class Slice {
controls.push(imgZoomOut);
controls.push(imgReset);
// samp button
builder.buttonCss = "samp-publish-png";
builder.buttonInnerHTML = "&#8663";
builder.topPosition = "130px";
builder.title = "Send with SAMP";
this._sampButton = builder.build();
if(withSAMP){
this._sampButton.setHandler(sAMPPublisher.sendPNGSlice);
controls.push(this._sampButton);
}
return controls;
}
......@@ -519,10 +508,22 @@ class SingleSlice extends Slice {
window.open(url, '_blank');
});
});
controls.push(imgView);
controls.push(imgDownload);
// samp button
builder.buttonCss = "samp-publish-png";
builder.buttonInnerHTML = "&#8663";
builder.topPosition = "130px";
builder.title = "Send with SAMP";
this._sampButton = builder.build();
if(withSAMP){
this._sampButton.setHandler(sAMPPublisher.sendPNGSlice);
controls.push(this._sampButton);
}
return controls;
}
......@@ -778,6 +779,18 @@ class SummedSlice extends Slice {
controls.push(imgView);
controls.push(imgDownload);
// samp button
builder.buttonCss = "samp-publish-png";
builder.buttonInnerHTML = "&#8663";
builder.topPosition = "130px";
builder.title = "Send with SAMP";
this._sampButton = builder.build();
if(withSAMP){
this._sampButton.setHandler(sAMPPublisher.sendPNGSummedSlices);
controls.push(this._sampButton);
}
return controls;
}
......
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