#326 closed defect (fixed)
Query: One error happened once completing the Polygon drawn in previous Query condition.
Reported by: | jennyhe | Owned by: | madair |
---|---|---|---|
Priority: | P2 | Milestone: | Future |
Component: | Widgets | Version: | 1.1.1 |
Severity: | Major | Keywords: | |
Cc: | christine.bao@… | Browser: | All |
External ID: | 1277664 | Operating System: | All |
state: | Committed |
Description
Report from Autodesk QA Steps:
- Open one flexible web layout.
- Query->Check Spatial Filter -> Polygon, click 2 points in map
- Uncheck Spatial Filter -> Check again -> Rectangle -> Draw rectangle
- Complete the Polygon drawn in Step2.
Results: One error happened in IE. Please refer to the attached png file.
Expected results: No error happened.
Attachments (2)
Change History (7)
by , 15 years ago
Attachment: | Polygon_Error.PNG added |
---|
comment:1 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 15 years ago
The key point of this defect is:
- Start draw polygon, but not double click to finish it.
- Draw a rectangle.
- Continue step 1 to finish the polygon.
It will call MapGuideViewerApi.js:
function mgApiDeactivate() { mgApiActiveControl.deactivate(); mgApiActiveControl = null; if (mgApiActiveWidget) { var Fusion = window.top.Fusion; var mapWidget = Fusion.getWidgetById(mgApiMapWidgetId); mapWidget.activateWidget(mgApiActiveWidget); mgApiActiveWidget = null; } }
And in this case mgApiActiveControl is null, thus cause the defect.
comment:3 by , 15 years ago
To prevent IE from null object error, add a check for whether mgApiActiveControl is null. Please see the attached patch.
This user scenario is weird, and it's not the expected behavior. Query should only have one geometry for spatial filter, either polygon or rectangle. When start drawing polygon, it records the points to form the polygon, and finally use these points as spatial filter; When start drawing rectangle, it records the points of the rectangle for spatial filter. It's impossible to both query polygon and rectangle.
However in this defect, there will be two geometries left. As the last point is ended by polygon, Query will use the points of polygon for spatial filter, while ignoring rectangle. After discussing with QA, this behavior is treated as acceptable, as 1) it's not a common user behavior. 2) it's ok as long as no error happens.
by , 15 years ago
Attachment: | Fix326.patch added |
---|
After fixing ticket http://trac.osgeo.org/fusion/ticket/322, this defect is not reproducible.