1
1
function get_js_version() {
2
- return "JS2023-11-01.0 ";
2
+ return "JS2023-11-01.2 ";
3
3
}
4
4
5
5
function uuidv4() {
@@ -1069,7 +1069,7 @@ function pv_axes(left, top, width, height, vmin, vmax, pmin, pmax, pmean, pstd,
1069
1069
console.log("P-V Line offset [arcsec] dmin:", -Math.abs(dmin), "dmax:", Math.abs(dmax));
1070
1070
1071
1071
var xR = d3.scaleLinear()
1072
- .range([2 * emFontSize, 2 * emFontSize + svg_width - 1 ])
1072
+ .range([2 * emFontSize, 2 * emFontSize + svg_width])
1073
1073
.domain([-Math.abs(dmin), Math.abs(dmax)]);
1074
1074
1075
1075
pvxR = xR;
@@ -1109,7 +1109,7 @@ function pv_axes(left, top, width, height, vmin, vmax, pmin, pmax, pmean, pstd,
1109
1109
.call(xAxis);
1110
1110
1111
1111
var yR = d3.scaleLinear()
1112
- .range([emFontSize + svg_height - 1 , emFontSize])
1112
+ .range([emFontSize + svg_height, emFontSize])
1113
1113
.domain([vmin, vmax]);
1114
1114
1115
1115
pvyR = yR;
@@ -1749,7 +1749,7 @@ function crosshair_move(event) {
1749
1749
let x = offset[0];
1750
1750
let y = offset[1];
1751
1751
1752
- // make sure the line lies within the SVG
1752
+ // make sure the line lies FIRMLY within the SVG
1753
1753
x = Math.min(Math.max(x, 1), _svg_width - 1);
1754
1754
y = Math.min(Math.max(y, 1), _svg_height - 1);
1755
1755
@@ -5744,11 +5744,11 @@ function display_gridlines() {
5744
5744
var y_offset = parseFloat(elem.attr("y"));
5745
5745
5746
5746
var x = d3.scaleLinear()
5747
- .range([x_offset, x_offset + width - 1 ])
5747
+ .range([x_offset, x_offset + width])
5748
5748
.domain([0, 1]);
5749
5749
5750
5750
var y = d3.scaleLinear()
5751
- .range([y_offset + height - 1 , y_offset])
5751
+ .range([y_offset + height, y_offset])
5752
5752
.domain([0, 1]);
5753
5753
5754
5754
var svg = d3.select("#BackgroundSVG");
@@ -5958,11 +5958,11 @@ function display_cd_gridlines() {
5958
5958
var y_offset = parseFloat(elem.attr("y"));
5959
5959
5960
5960
var x = d3.scaleLinear()
5961
- .range([0, width - 1 ])
5961
+ .range([0, width])
5962
5962
.domain([-1, 1]);
5963
5963
5964
5964
var y = d3.scaleLinear()
5965
- .range([height - 1 , 0])
5965
+ .range([height, 0])
5966
5966
.domain([-1, 1]);
5967
5967
5968
5968
var svg = d3.select("#BackgroundSVG");
@@ -13982,31 +13982,6 @@ async function fetch_image_spectrum(_datasetId, index, fetch_data, add_timestamp
13982
13982
xmlhttp.send();
13983
13983
}
13984
13984
13985
- function fetch_contours(datasetId) {
13986
- var xmlhttp = new XMLHttpRequest();
13987
-
13988
- var url = 'get_contours?datasetId=' + encodeURIComponent(datasetId) + '&' + encodeURIComponent(get_js_version());
13989
-
13990
- xmlhttp.onreadystatechange = function () {
13991
- if (xmlhttp.readyState == 4 && xmlhttp.status == 502) {
13992
- console.log("Connection error, re-fetching contours after 1 second.");
13993
- setTimeout(function () {
13994
- fetch_contours(datasetId);
13995
- }, 1000);
13996
- }
13997
-
13998
- if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
13999
- var response = JSON.parse(xmlhttp.responseText);
14000
-
14001
- console.log(response);
14002
- }
14003
- }
14004
-
14005
- xmlhttp.open("GET", url, true);
14006
- xmlhttp.timeout = 0;
14007
- xmlhttp.send();
14008
- };
14009
-
14010
13985
function refresh_tiles(index) {
14011
13986
if (zoom_scale < 1)
14012
13987
return;
@@ -14999,16 +14974,16 @@ function pv_contour(left, top, width, height, pvCanvas, flipY, pv_width, pv_heig
14999
14974
console.log("PVContourSVG width = ", width, " height = ", height);
15000
14975
15001
14976
var x = d3.scaleLinear()
15002
- .range([width - 1 , 0]) // flip the x-axis
14977
+ .range([width, 0]) // flip the x-axis
15003
14978
.domain([0, data[0].length - 1]);
15004
14979
15005
14980
if (flipY) {
15006
14981
var y = d3.scaleLinear()
15007
- .range([height - 1 , 0])
14982
+ .range([height, 0])
15008
14983
.domain([0, data.length - 1]);
15009
14984
} else {
15010
14985
var y = d3.scaleLinear()
15011
- .range([0, height - 1 ])
14986
+ .range([0, height])
15012
14987
.domain([0, data.length - 1]);
15013
14988
}
15014
14989
@@ -15025,8 +15000,8 @@ function pv_contour(left, top, width, height, pvCanvas, flipY, pv_width, pv_heig
15025
15000
15026
15001
d3.select("#PVContourSVG").append("svg")
15027
15002
.attr("id", "PVContourPlot")
15028
- .attr("x", elem.attr("x"))
15029
- .attr("y", elem.attr("y"))
15003
+ .attr("x", parseFloat( elem.attr("x") ))
15004
+ .attr("y", parseFloat( elem.attr("y") ))
15030
15005
.attr("width", width)
15031
15006
.attr("height", height)
15032
15007
.selectAll("path")
@@ -18022,17 +17997,17 @@ function contour_surface_webworker() {
18022
17997
var height = parseFloat(elem.attr("height"));
18023
17998
18024
17999
var x = d3.scaleLinear()
18025
- .range([0, width - 1 ])
18000
+ .range([0, width])
18026
18001
.domain([0, data[0].length - 1]);
18027
18002
18028
18003
var y = d3.scaleLinear()
18029
- .range([height - 1 , 0])
18004
+ .range([height, 0])
18030
18005
.domain([0, data.length - 1]);
18031
18006
18032
18007
d3.select("#ContourSVG").append("svg")
18033
18008
.attr("id", "contourPlot")
18034
- .attr("x", elem.attr("x"))
18035
- .attr("y", elem.attr("y"))
18009
+ .attr("x", parseFloat( elem.attr("x") ))
18010
+ .attr("y", parseFloat( elem.attr("y") ))
18036
18011
.attr("width", width)
18037
18012
.attr("height", height)
18038
18013
.selectAll("path")
0 commit comments