[HepData-svn] r1829 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Nov 3 12:28:16 GMT 2014


Author: whalley
Date: Mon Nov  3 12:28:16 2014
New Revision: 1829

Log:
force at least on figure left of decimal point in the x-axis values

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java	Mon Oct 27 14:42:06 2014	(r1828)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java	Mon Nov  3 12:28:16 2014	(r1829)
@@ -443,7 +443,7 @@
                                     SignificantFigures valx = new SignificantFigures(f);
                                     lsd = valx.getLSD();
                                     msd = valx.getMSD();
-                                    if(msd == 0) msd = 1;
+                                    if(msd <= 0) msd = 1;
                                     if(f.toString().indexOf("9999999") > 0) {
                                         int pos1 =  f.toString().indexOf("9999999");
                                         int pos2 =  f.toString().indexOf(".");
@@ -465,7 +465,7 @@
                                     SignificantFigures vall = new SignificantFigures(low);
                                     lsd = vall.getLSD();
                                     msd = vall.getMSD();
-                                    if(msd == 0) msd = 1;
+                                    if(msd <= 0) msd = 1;
                                     if(low.toString().indexOf("9999999") > 0) {
                                         int pos1 =  low.toString().indexOf("9999999");
                                         int pos2 =  low.toString().indexOf(".");
@@ -484,7 +484,7 @@
                                     SignificantFigures valh = new SignificantFigures(high);
                                     lsd = valh.getLSD();
                                     msd = valh.getMSD();
-                                    if(msd == 0) msd = 1;
+                                    if(msd <= 0) msd = 1;
                                     if(high.toString().indexOf("9999999") > 0) {
                                         int pos1 =  high.toString().indexOf("9999999");
                                         int pos2 =  high.toString().indexOf(".");


More information about the HepData-svn mailing list