- From: ak.miller at auckland.ac.nz (Andrew Miller)
- Subject: [cellml-dev] r2393 - in pce/trunk/chrome/content: controls util
- Date: Thu, 03 Jul 2008 17:57:36 +1200
CellML Automated Notifications wrote:
>
Author: jmar150
>
Date: 2008-07-03 17:46:27 +1200 (Thu, 03 Jul 2008)
>
New Revision: 2393
>
>
Modified:
>
pce/trunk/chrome/content/controls/graph.xml
>
pce/trunk/chrome/content/util/GraphSupport.js
>
Log:
>
Modifications taken from Andrew Miller's comments on Revision
>
2392, in order to get nicer graph scaling for plotted constants.
>
>
>
>
Modified: pce/trunk/chrome/content/controls/graph.xml
>
===================================================================
>
--- pce/trunk/chrome/content/controls/graph.xml 2008-07-03 04:48:36
>
UTC (rev 2392)
>
+++ pce/trunk/chrome/content/controls/graph.xml 2008-07-03 05:46:27
>
UTC (rev 2393)
>
@@ -1610,10 +1610,11 @@
>
this.my = -this.my;
>
if (this.xMax == this.xMin)
>
{
>
- var q = this.xMax > 0 ? 2: -1;
>
- var u = this.xMax > 0 ? -1: 2;
>
- this.xMax = (q * this.xMax) + 1;
>
- this.xMin = (u * this.xMin) - 1;
>
+ var halfrange = Math.abs(this.yMax) * 0.05;
>
+ if (halfrange == 0)
>
+ halfrange = 0.5;
>
+ this.yMin = this.yMax - halfrange;
>
+ this.yMax = this.yMax + halfrange;
>
}
>
Hi,
I may be totally confused here, but isn't that code supposed to be
computing xMin and xMax, and shouldn't the code to compute yMax and yMin
be moved up into the if (this.yMax == this.yMin) block?
Best regards,
Andrew
- [cellml-dev] r2393 - in pce/trunk/chrome/content: controls util, Andrew Miller, 07/03/2008
Archive powered by MHonArc 2.6.18.