Opened 13 years ago

Closed 11 years ago

#515 closed defect (fixed)

Redline: The mouse is still in drawing mode after digitize first redline object

Reported by: yangte Owned by: yangte
Priority: P3 Milestone: Future
Component: Widgets Version: 2.0
Severity: Major Keywords:
Cc: Browser: All
External ID: 1435834 Operating System: All
state: New

Description

Steps to recreate:
open FWL

  1. click redline
  2. new redline
  3. add to map
  4. digitize redline point
  5. enter label name
  6. click ok
  7. the object is crated and labeled
  8. then click the mouse


Result:
You can also draw weird things on the map, see the snapshot 1.png

Expectation:
After finishing drawing, the cursor is back to normal (can't draw any more)

The cause of this defect:
in MapGuideViewerApi.js,function mgApiCallHandler will call the function mgApiDeactivate use this way:
window.setTimeout(mgApiDeactivate, 100); However, the mgApiDeactivate doesn't work. so the mgApiControl is still in active mode after the redline digitize finished.

Proposed solution:
add a new api in MapGuideViewerApi.js,

	function DeactiveCurrentControl()
	{
		if (mgApiActiveControl) 
		{
			mgApiActiveControl.deactivate();
			mgApiActiveControl = null;
		}
	}

call it in editmarkup.php:

	function PromptAndSetMarkupText()
	{
		var textInput = document.getElementById("textInput");

		textLabel = window.prompt("<?=$promptLabelLocal?>", "");
		textInput.value = (textLabel != null) ? textLabel : "";
                DeactiveCurrentControl();
                ClearDigitization();
        }

Attachments (2)

1.PNG (29.0 KB ) - added by yangte 13 years ago.
the wrong image
FusionTicket515.patch (1.0 KB ) - added by yangte 13 years ago.
patch for the ticket

Download all attachments as: .zip

Change History (3)

by yangte, 13 years ago

Attachment: 1.PNG added

the wrong image

by yangte, 13 years ago

Attachment: FusionTicket515.patch added

patch for the ticket

comment:1 by jng, 11 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.