[mapguide-users] [ajaxViewer] Digitizer mouseUp problem with IExplorer7 / IE8 ("patch included")

David Hequet david.hequet at free.fr
Wed Oct 28 11:32:21 EDT 2009


When you use the viewer api (DigitizeRectangle...) with IExplorer 7/8, on
mouseUp you're callback function is thrown but the "mouse" is not well
released. 
I explain: the digitizer work, call the callback function, but the mouse
seems to be "traped" in the mapspace:
when i move the mouse pointer in the legend frame (or other frame if my
viewer is in a frameset) i can see the x/y mouse position of the status bar
been updated. 
If i move the pointer over an hyperlink or simply a mapguide toolbar button,
the hover event is not fired.

after one click everything work well again.

On webApplication where i used a custom overviewmap (my overviewmap use the
DigitizeRectangle), the behavior is worst..

i found a trick that could help: after hours on this problem i found that
the bug is in wz_jsgraphic in the clear function. when the shape div has it
innerHtml reseted..

as solution i replaced these digitizer function:

    this.InitFeedback = function()
    {

        var rd = document.getElementById(this.fbDiv).style;
        rd.position = "absolute";
        rd.left = this.fbPos + "px";
        rd.top = "0px";
        rd.width = this.fbW + "px";
        rd.height = this.fbW + "px";
        rd.visibility = "visible";
        rd.clip = "rect(0px " + this.fbW + "px " + this.fbH + "px " +
"0px)";

    }
    this.ClearFeedback = function()
    {
    	  
        if(this.fbDiv)
            document.getElementById(this.fbDiv).style.visibility = "hidden";
        if(this.fbShape)
            this.fbShape.clear();
    }

by

    this.InitFeedback = function()
    {
        if(this.fbShape)
           this.fbShape.clear();    	
        var rd = document.getElementById(this.fbDiv).style;
        rd.position = "absolute";
        rd.left = this.fbPos + "px";
        rd.top = "0px";
        rd.width = this.fbW + "px";
        rd.height = this.fbW + "px";
        rd.visibility = "visible";
        rd.clip = "rect(0px " + this.fbW + "px " + this.fbH + "px " +
"0px)";

    }
    this.ClearFeedback = function()
    {
    	  
        if(this.fbDiv)
            document.getElementById(this.fbDiv).style.visibility = "hidden";
    }


The div innerhtml is cleared when the digitizer start instead of digitizer
end.
It works for me.

Good luck with digitize!

David
-- 
View this message in context: http://n2.nabble.com/ajaxViewer-Digitizer-mouseUp-problem-with-IExplorer7-IE8-patch-included-tp3906244p3906244.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list