Bug 1032

Summary: ROICircle javascript code bug (cwc_roi.js file)
Product: Chameleon Reporter: Bart van den Eijnden <bartvde@osgis.nl>
Component: WidgetAssignee: Bart van den Eijnden <bartvde@osgis.nl>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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