Skip to content

Commit

Permalink
fix samp send sources
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatthieu3 committed Feb 2, 2024
1 parent b4c1473 commit 2f9923b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/al-easy-access-simbad-ned.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
showShareControl: true,
showStatusBar: true,
showStackLayerControl: true,
samp: true,
});

aladin.addCatalog(A.catalogFromSimbad('09 55 52.4 +69 40 47', 0.1, {onClick: 'showTable', limit: 1000}));
Expand Down
3 changes: 2 additions & 1 deletion src/js/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,7 @@ export let View = (function () {

this.aladin.measurementTable.showMeasurement(tables);
let a = this.aladin;
let self = this;
const sampBtn = new SAMPActionButton({
tooltip: {content: 'Send a table through SAMP Hub'},
action(conn) {
Expand All @@ -1326,7 +1327,7 @@ export let View = (function () {
return s;
};

for (const objects of objList) {
for (const objects of self.selection) {
let s0 = getSource(objects[0]);
const cat = s0.catalog;
const {url, name} = cat;
Expand Down
6 changes: 2 additions & 4 deletions src/js/gui/Button/SAMP.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,9 @@ options = {

if (hubRunning !== isHubRunning) {
let newOptions = {
disable: !isHubRunning
disable: !isHubRunning,
tooltip: isHubRunning ? {content: 'Connect to SAMP hub'} : {content: 'No hub running found'}
};
if (!isHubRunning) {
newOptions['tooltip'] = {content: 'No hub running found'};
}

self.update(newOptions)
if (isHubRunning === false) {
Expand Down

0 comments on commit 2f9923b

Please sign in to comment.