JVectorMap Reverse projection not working in Firefox

336 Views Asked by At

quick question. Any ideas why this http://jvectormap.com/examples/reverse-projection/ isn't working in Firefox? It works in every other browser but Firefox. thanks,

2

There are 2 best solutions below

0
On BEST ANSWER

because Firefox sucks

<html> = nothing
0
On

i hope it's still interesting, since the question is marked as solved. I found a dirty little workaround to come around this issue.

jvectormap consumes the "mouseover" event for all objects on the map (markers, regions) and on the container itself. In case of the markers a callback is defined which just does something without a return. In case of the container it "returns" some coordinates.

ElementEvents:

    bindElementEvents:function(){
        var e=this,t;

        this.container.mousemove(function(){
            t=!0
        })
        ...

ContainerEvents:

    bindContainerEvents:function(){
        var e=!1,t,n,r=this;

        this.container.mousemove(function(i){
            return e&&(r.transX-=(t-i.pageX)/r.scale,r.transY-=(n-i.pageY)/r.scale,r.applyTransform(),t=i.pageX,n=i.pageY),!1
        })
        ...

Comment out that return and it works in FF and not in IE.

I am not sure what the real purpose of the function is and don't wnt to invest time to figure out, but besides the fact that IE is not working then, i can not see any broken functionality. Hope that helps.