simplegeo / polymaps

Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers.
http://polymaps.org/
Other
1.6k stars 213 forks source link

Firefox 11 map.size Issue #115

Closed ghost closed 12 years ago

ghost commented 12 years ago

Firefox 11 update breaks longstanding SVG transformation. This seems to suggest Firefox is enforcing something not enforced in the past, and so ignoring certain statements.

vkdot commented 12 years ago

In FF 10 it was working. FF 11 Issue can be fixed by adding width and height attributes to root SVG element.

Possible work-around:

Instead of: var map = po.map() .container(document.getElementById("map").appendChild(po.svg("svg"))) .add(po.interact()) .add(po.hash());

Use: var svg = po.svg("svg"); svg.setAttribute('width', '100%'); svg.setAttribute('height', '100%'); var map = po.map() .container(document.getElementById("map").appendChild(svg)) .add(po.interact()) .add(po.hash());

ghost commented 12 years ago

The fix above didn't work for me. This was a easy css fix to the svg tag, added width & height 100%. This created an issue with the fullscreen toggle button.

Update: var f = n$(document.body), c = n$("#map").style("visibility", "visible"), b = false, a = c.add("svg:svg").style("position", "absolute").style("right", "-16px").style("top", "-16px").style("visibility", "visible").style("width", "32px").style("height", "32px").on("mousedown", d);

(changed .attr to .style)

pjvpjv commented 12 years ago

I wouldn't call this closed yet. The code to polymaps should be updated to fix this... not just an acceptable workaround in place. MultimediaDeveloper, I have no clue what your code does, however I was able to make it work by using the solution from vkdot.

gouldingken commented 12 years ago

I second that - and also had success with the first solution. I don't think any issues should be marked as resolved until they are included in the main trunk - and until the issues can't be replicated simply by going to the examples section of the polymaps site!

bigethan commented 12 years ago

I would like to third that this is not a closed issue.

sidkshatriya commented 12 years ago

I had success with the first solution also.