bjornd / jvectormap

jvectormap.com
GNU Affero General Public License v3.0
1.38k stars 431 forks source link

Error when resizing window with hidden map #438

Closed pettrz closed 6 years ago

pettrz commented 6 years ago

I'm using different tabs which hides the map with display: none;. When the map gets hidden it gives me the same error multiple times while resizing.

This is what I see in console: ` Error: attribute transform: Expected number, "scale(NaN) translate(N…".

  jvm.SVGCanvasElement.applyTransformParams @ jquery-jvectormap-2.0.3.min.js:1
  applyTransform @ jquery-jvectormap-2.0.3.min.js:2
  updateSize @ jquery-jvectormap-2.0.3.min.js:2
  onResize @ jquery-jvectormap-2.0.3.min.js:2
  dispatch @ jquery.min.js:2
  y.handle @ jquery.min.js:2

`

Any idea? Thank you

pettrz commented 6 years ago

Seems like I was using a newer version of jquery which the map wasn't fully compatible with. RESOLVED

sliterok commented 5 years ago

There's nothing to do with jQuery version. Do not hide map with display: none, hide it with visibility: hidden Chrome is fine with display: none, because it doesn't follow SVG spec, but firefox is more into that, so this trick doesn't work