There was an error while loading. Please reload this page.
1 parent 3be45a6 commit aaf68e0Copy full SHA for aaf68e0
js/sigplot.js
@@ -8606,11 +8606,19 @@
8606
Gx.iabsc = 2;
8607
} // R/I mode
8608
if (Gx.iabsc === 1) { // index
8609
- Gx.aretx = Math.round((Gx.aretx - Gx.xstart) / Gx.xdelta);
+ // if there is more than one layer index is ambiguous, so use the first layer only
8610
+ var hcb = plot.get_hcb_by_lyrn(0);
8611
+ if (hcb) {
8612
+ Gx.aretx = Math.round((Gx.aretx - hcb.xstart) / hcb.xdelta);
8613
+ Gx.dretx = Math.round(Gx.dretx / hcb.xdelta);
8614
+ } else {
8615
+ Gx.aretx = 0;
8616
+ Gx.dretx = 1;
8617
+ }
8618
if (!Gx.index) {
8619
Gx.aretx += 1;
8620
}
- Gx.dretx = Math.round(Gx.dretx / Gx.xdelta);
8621
+
8622
} else if (Gx.iabsc === 2) { // 1/absc
8623
if (Gx.aretx !== 0.0) {
8624
Gx.aretx = 1.0 / Gx.aretx;
0 commit comments