diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a80214 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +js/samp.js diff --git a/README.md b/README.md index 8882ce8..24ed9cf 100644 --- a/README.md +++ b/README.md @@ -55,13 +55,14 @@ You can pass options object to initialization function: get Aladin(DSS2) #{coords} 15arcmin;sync;"UCAC3, #{name}" = get VizieR(UCAC3,allcolumns) #{coords} #{radius}arcmin;sync;set "UCAC3, #{name}" shape=triangle color=red -where #{coords}, #{name} and #{radius} are placeholders. +where #{coords}, #{name} and #{radius} are placeholders. IMPORTANT: To be able send scripts to aladin, you must use included in distribution jnlp file as default hub. JSAMP hub used in Topcat restricts by default unknown MTypes, so it is necessary to run it with -web:norestrictmtypes key. e.g. customizing table headings sort icons var tOptions = { sortIcon: { asc: '', desc: '' } }; AstroTools.init({ tableOptions: tOptions }) + Features ======== @@ -165,3 +166,4 @@ Markup Example Table +Contact me anotheroneackap@gmail.com, if you still have a question. diff --git a/js/astrotools.js b/js/astrotools.js index eaaeb67..7d86feb 100644 --- a/js/astrotools.js +++ b/js/astrotools.js @@ -4,7 +4,7 @@ var AstroTools = (function() { ClientTracker, waitingForHubInterval, isHubOnlineInterval, - defaultHubUrl = 'http://www.starlink.ac.uk/topcat/topcat-lite.jnlp', + defaultHubUrl = 'topcat-lite.jnlp', iconUrl = 'img/icon.png', aladinScript = 'get Aladin(DSS2) #{coords} 15arcmin;sync;"UCAC3, #{name}" = get VizieR(UCAC3,allcolumns) #{coords} #{radius}arcmin;sync;set "UCAC3, #{name}" shape=triangle color=red', table, @@ -177,6 +177,7 @@ var AstroTools = (function() { } function noop() { } + function errorHandler( error ) { if ( window.console ) console.error( error ) } function disconnect() { if ( SAMPConnection ) { @@ -225,8 +226,11 @@ var AstroTools = (function() { function declareMetadata() { SAMPConnection.declareMetadata([{ 'samp.name': 'AstroTools', - 'samp.description': 'Simple toolbox', - 'samp.icon.url': absolutizeURL( iconUrl ) + 'samp.description.text': 'Simple toolbox', + 'samp.icon.url': absolutizeURL( iconUrl ), + 'home.page': 'https://github.com/AnotherOneAckap/AstroTools', + 'author.name': 'Askar Timirgazin, Ivan Zolotukhin', + 'author.email': 'anotheroneackap@gmail.com' }], noop, onError ); } @@ -331,7 +335,7 @@ var AstroTools = (function() { 'script': script }); if ( that.SAMPConnection instanceof samp.Connection && ! that.SAMPConnection.closed ) - that.SAMPConnection.notifyAll([message]); + that.SAMPConnection.notifyAll( [message], noop, errorHandler ); // sending to others var @@ -343,7 +347,7 @@ var AstroTools = (function() { 'dec': dec.toString() }); if ( that.SAMPConnection instanceof samp.Connection && ! that.SAMPConnection.closed ) - that.SAMPConnection.notifyAll([message]); + that.SAMPConnection.notifyAll( [message], noop, errorHandler ); }); } diff --git a/topcat-lite.jnlp b/topcat-lite.jnlp new file mode 100755 index 0000000..2b27721 --- /dev/null +++ b/topcat-lite.jnlp @@ -0,0 +1,28 @@ + + + + TOPCAT + Mark Taylor, Bristol University, UK + + "TOPCAT - lite version" + + + + + SUN/253 + Comprehensive user document + + + + + + + + + + + -jsamp + hub + -web:norestrictmtypes + +