Ticket #326 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

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@… External ID: 1277664
state: Committed Browser: All
Operating System: All

Description

Report from Autodesk QA Steps: 1. Open one flexible web layout. 2. Query->Check Spatial Filter -> Polygon, click 2 points in map 3. Uncheck Spatial Filter -> Check again -> Rectangle -> Draw rectangle 4. 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

Polygon_Error.PNG Download (8.2 KB) - added by jennyhe 4 years ago.
Fix326.patch Download (0.6 KB) - added by christinebao 4 years ago.

Change History

Changed 4 years ago by jennyhe

Changed 4 years ago by christinebao

  • status changed from new to closed
  • resolution set to fixed

After fixing ticket http://trac.osgeo.org/fusion/ticket/322, this defect is not reproducible.

Changed 4 years ago by christinebao

The key point of this defect is:
1. Start draw polygon, but not double click to finish it.
2. Draw a rectangle.
3. 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.

Changed 4 years ago by christinebao

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.

Changed 4 years ago by christinebao

Changed 4 years ago by liuar

Reviewed. Please submit the code. Thanks.

Changed 4 years ago by christinebao

  • state changed from New to Committed

Submit the patch for fixing this defect.

Note: See TracTickets for help on using tickets.