When it is initialised in a 0px canvas, the scale calculus provides a
scale of 0. When the scale of 0 is applyed on SVG, it perform a divide
by 0 which returns infinite. The SVG translate attribute expect number.
It receives "Infinity".
Fix:
I proposes the attached patch which check scale == 0 and force 1. I tested it and it work, and I check grunt build.
Hi, I found a bug when JQVMap is initialized in a canvas with height or width whoch is 0px
Overview:
In some case, the map can be initialised in a 0px canvas. The JQVMap throws an exception like this:
When it is initialised in a 0px canvas, the scale calculus provides a scale of 0. When the scale of 0 is applyed on SVG, it perform a divide by 0 which returns infinite. The SVG translate attribute expect number. It receives "Infinity".
Fix:
I proposes the attached patch which check scale == 0 and force 1. I tested it and it work, and I check grunt build.
0001-Bug-Minor-revent-divide-by-0.patch.txt
Thierry