Bug 1032 - ROICircle javascript code bug (cwc_roi.js file)
: ROICircle javascript code bug (cwc_roi.js file)
Status: RESOLVED FIXED
: Chameleon
Widget
: 2.2
: PC Windows XP
: P2 normal
: ---
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2005-05-15 07:31 by
Modified: 2005-05-16 07:33 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-05-15 07:31:24
Bug is in 2.0 and 2.2 versions.

There is a bug in the ROICircle javascript code. I am using the ROICircle
javascript code not through the ROICircle widget but from a custom javascript
code sniplet.

The bug is in:
CWCCircleROI_Serialize

The values were just added together as strings, so if I had a click at X 250
pixels and a radius defined of 50, the x coordinate going into the Pix2Geo
function would be 25050!

The fix is using parseInt:

aRadius = this.manager.Pix2Geo( parseInt(this.centerX) + parseInt(this.radius), 
 this.centerY );
------- Comment #1 From 2005-05-16 07:15:27 -------
I will take care of this today.
------- Comment #2 From 2005-05-16 07:33:18 -------
Fixed in both 2.0 and 2.2.

2.0: revision 1.25.2.1
2.2: revision 1.27