Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tom Dwelly
speccy
Commits
b2ac032a
Commit
b2ac032a
authored
Jun 10, 2020
by
Tom Dwelly
Browse files
fix to plate/png naming
parent
027f9ab5
Changes
1
Show whitespace changes
Inline
Side-by-side
js/speccy.js
View file @
b2ac032a
...
@@ -668,10 +668,11 @@ function plotData() {
...
@@ -668,10 +668,11 @@ function plotData() {
var
mjd
=
parseInt
(
document
.
getElementById
(
"
pipeParams_MJD
"
).
innerHTML
);
var
mjd
=
parseInt
(
document
.
getElementById
(
"
pipeParams_MJD
"
).
innerHTML
);
var
fiberid
=
parseInt
(
document
.
getElementById
(
"
pipeParams_FIBERID
"
).
innerHTML
);
var
fiberid
=
parseInt
(
document
.
getElementById
(
"
pipeParams_FIBERID
"
).
innerHTML
);
var
run2d
=
document
.
getElementById
(
"
pipeParams_RUN2D
"
).
innerHTML
;
var
run2d
=
document
.
getElementById
(
"
pipeParams_RUN2D
"
).
innerHTML
;
var
str_plate
=
(
plate
<
10000
?
(
"
0000
"
+
plate
).
slice
(
-
4
)
:
(
"
00000
"
+
plate
).
slice
(
-
5
));
ctx
.
font
=
"
18px Arial
"
;
ctx
.
font
=
"
18px Arial
"
;
ctx
.
textAlign
=
"
left
"
;
ctx
.
textAlign
=
"
left
"
;
ctx
.
beginPath
();
ctx
.
beginPath
();
var
str_label
=
(
"
0000
"
+
plate
).
slice
(
-
4
)
+
"
-
"
+
mjd
+
"
-
"
+
(
"
0000
"
+
fiberid
).
slice
(
-
4
)
+
"
(
"
+
run2d
+
"
)
"
;
var
str_label
=
str_plate
+
"
-
"
+
mjd
+
"
-
"
+
(
"
0000
"
+
fiberid
).
slice
(
-
4
)
+
"
(
"
+
run2d
+
"
)
"
;
ctx
.
fillText
(
str_label
,
5.0
+
xsize
*
0.005
,
10.0
+
ysize
*
0.01
);
ctx
.
fillText
(
str_label
,
5.0
+
xsize
*
0.005
,
10.0
+
ysize
*
0.01
);
ctx
.
stroke
();
ctx
.
stroke
();
ctx
.
closePath
();
ctx
.
closePath
();
...
@@ -1344,8 +1345,8 @@ function downloadPng(){
...
@@ -1344,8 +1345,8 @@ function downloadPng(){
var
plate
=
parseInt
(
document
.
getElementById
(
"
pipeParams_PLATE
"
).
innerHTML
);
var
plate
=
parseInt
(
document
.
getElementById
(
"
pipeParams_PLATE
"
).
innerHTML
);
var
mjd
=
parseInt
(
document
.
getElementById
(
"
pipeParams_MJD
"
).
innerHTML
);
var
mjd
=
parseInt
(
document
.
getElementById
(
"
pipeParams_MJD
"
).
innerHTML
);
var
fiberid
=
parseInt
(
document
.
getElementById
(
"
pipeParams_FIBERID
"
).
innerHTML
);
var
fiberid
=
parseInt
(
document
.
getElementById
(
"
pipeParams_FIBERID
"
).
innerHTML
);
document
.
getElementById
(
"
downloader
"
).
download
=
"
spec-
"
+
(
"
0000
"
+
plate
).
slice
(
-
4
)
+
"
-
"
+
mjd
+
"
-
"
+
(
"
0000
"
+
fiberid
).
slice
(
-
4
)
+
"
.png
"
;
var
str_plate
=
(
plate
<
10000
?
(
"
0000
"
+
plate
).
slice
(
-
4
)
:
(
"
0000
0
"
+
plate
).
slice
(
-
5
))
;
document
.
getElementById
(
"
downloader
"
).
download
=
"
spec-
"
+
str_plate
+
"
-
"
+
mjd
+
"
-
"
+
(
"
0000
"
+
fiberid
).
slice
(
-
4
)
+
"
.png
"
;
document
.
getElementById
(
"
downloader
"
).
href
=
document
.
getElementById
(
"
myCanvas
"
).
toDataURL
(
"
image/png
"
).
replace
(
/^data:image
\/[^
;
]
/
,
'
data:application/octet-stream
'
);
document
.
getElementById
(
"
downloader
"
).
href
=
document
.
getElementById
(
"
myCanvas
"
).
toDataURL
(
"
image/png
"
).
replace
(
/^data:image
\/[^
;
]
/
,
'
data:application/octet-stream
'
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment