I created a JQuery plugin to display a map (xy) that is draggable.
On Firefox it works flawless but on any other browsers there is a bug.
Bug:
Normaly the map should be displayed when the site loads.
But on all browser except firefox there is only a black screen until you drag the map, then
it works.
I have no clue how i can fix that.
Example: http://jsfiddle.net/X42Wf/
I hope you understand what i mean, if not look at the example (not with firefox), run it and then drag the black output.
The
innerDiv.css('left')is set toautoon initialization (means before a first drag). So in thegetVisibleTilesfunction,mapXequals toNaNso the double for loop is not executedYou just have to edit this:
with this:
Also, if you want to avoid side effects on IE, you should remove trailing comma at the end of objects declaration, like in those 2 examples: