Opened 13 years ago
Closed 12 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
- click redline
- new redline
- add to map
- digitize redline point
- enter label name
- click ok
- the object is crated and labeled
- 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)
Change History (3)
by , 13 years ago
comment:1 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
the wrong image