forked from bolidozor/js9
-
Notifications
You must be signed in to change notification settings - Fork 0
/
js9bespoke.html
executable file
·186 lines (176 loc) · 5.13 KB
/
js9bespoke.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge;chrome=1" >
<link type="image/x-icon" rel="shortcut icon" href="./favicon.ico">
<link type="text/css" rel="stylesheet" href="js9support.css">
<link type="text/css" rel="stylesheet" href="js9.css">
<script type="text/javascript" src="js9support.min.js"></script>
<script type="text/javascript" src="js9.js"></script>
<script type="text/javascript" src="js9plugins.js"></script>
<style type="text/css">
#centerdiv {
width: 512px;
margin-left: auto ;
margin-right: auto ;
}
</style>
<title>JS9 bespoke</title>
</head>
<body onload="JS9.Preload('./png/casa.png'); return false">
<div id="centerdiv">
<center><font size="+1">
<b>JS9 Demo: an HTML interface (instead of a menubar) </b>
</font></center>
<p>
The menubar is only one way to interface with JS9.
Web designers can create their own graphical inteface, using standard
HTML elements that call the
<a href="help/publicapi.html" target="_blank">JS9 Public API</a>
to perform the appropriate actions.
<table cellspacing="15">
<tr valign="bottom">
<td>
<table cellspacing="3">
<tr valign="bottom">
<td colspan="4">
Choose a JS9 menu action to perform:
</td>
</tr>
<tr valign="top">
<td>
zoom:
</td>
<td>
<button id="z1" class="zoom">zoom1</button>
</td>
<td>
<button id="z2" class="zoom">zoom2</button>
</td>
<td>
<button id="z4" class="zoom">zoom4</button>
</td>
</tr>
<tr valign="top">
<td>
scale:
</td>
<td>
<button id="log" class="scale">log</button>
</td>
<td>
<button id="linear" class="scale">linear</button>
</td>
<td>
<button id="squared" class="scale">squared</button>
</td>
</tr>
<tr valign="top">
<td>
cmap:
</td>
<td>
<button id="grey" class="color">grey</button>
</td>
<td>
<button id="heat" class="color">heat</button>
</td>
<td>
<button id="cool" class="color">cool</button>
</td>
</tr>
<tr valign="top">
<td>
regions:
</td>
<td>
<button id="circle" class="region">circle</button>
</td>
<td>
<button id="box" class="region">box</button>
</td>
<td>
<button id="ellipse" class="region">ellipse</button>
</td>
</tr>
<tr valign="top">
<td>
analysis:
</td>
<td>
<button id="counts" class="analysis">counts</button>
</td>
<td>
<button id="energyplot" class="analysis">spectrum</button>
</td>
<td>
<button id="fitshead" class="analysis">fitsheader</button>
</td>
</tr>
</table>
<td>
<div class="JS9Panner" data-width="200px" data-height="200px"></div>
</td>
</tr>
</table>
<p>
<div class="JS9"></div>
</div>
<script type="text/javascript">
var click;
if( "ontouchstart" in document.documentElement ){
click = "touchstart";
} else {
click = "click";
}
$(".zoom").on(click, function(evt){
var s = $(evt.currentTarget).attr("id");
JS9.SetZoom(s.charAt(1));
return false;
});
$(".scale").on(click, function(evt){
var s = $(evt.currentTarget).attr("id");
JS9.SetScale(s);
return false;
});
$(".color").on(click, function(evt){
var s = $(evt.currentTarget).attr("id");
JS9.SetColormap(s);
return false;
});
$(".region").on(click, function(evt){
var s = $(evt.currentTarget).attr("id");
JS9.AddRegions(s);
return false;
});
$(".analysis").on(click, function(evt){
var s = $(evt.currentTarget).attr("id");
JS9.RunAnalysis(s);
return false;
});
JS9.Panner.HTML = "";
</script>
<p>
JS9 Demos:
<ul>
<li><a href='js9basics.html'>JS9 Demo: the basics</a>
<li><a href='js9bespoke.html'>JS9 Demo: web page control of JS9</a>
<li><a href='js9sizes.html'>JS9 Demo: setting the size of the JS9 display</a>
<li><a href='js9plugins.html'>JS9 Demo: adding plugins to JS9</a>
<li><a href='js9imexam.html'>JS9 Demo: the imexam plugin for JS9</a>
<li><a href='js9blend.html'>JS9 Demo: image blending</a>
<li><a href='js9cat.html'>JS9 Demo: overlaying catalogs</a>
<li><a href='js9panzoom.html'>JS9 Demo: pan and zoom</a>
<li><a href='js9rgb.html'>JS9 Demo: RGB composite images</a>
<li><a href='js9multi.html'>JS9 Demo: independent instances of JS9</a>
<li><a href='js9analysis.html'>JS9 Demo: remote data analysis</a>
<li><a href='js9onchange.html'>JS9 Demo: running tasks when a region changes</a>
<li><a href='js9create.html'>JS9 Demo: creating a JS9 instance dynamically</a>
<li><a href='js9preload.html'>JS9 Demo: preloading images into JS9</a>
<li><a href='js9bitpix.html'>JS9 Demo: displaying different FITS datatypes</a>
<li><a href='js9pngvsfits.html'>JS9 Demo: PNG representation files vs FITS files</a>
</ul>
</body>
</html>