crccheck / raphael-svg-import-classic

Import SVG files to Raphael
MIT License
98 stars 40 forks source link

svg import fails on ie <= 8 #21

Closed izyl closed 9 years ago

izyl commented 9 years ago

map() is not availabe in ie <=8 At line 127

      matrix = matrix.substring(7, matrix.length-1).split(' ')
               .map(function(x){ return parseFloat(x); });

replace with a simple for each :

    matrix = matrix.substring(7, matrix.length - 1).split(' ');
    for(var e in matrix){
        matrix[e] = parseFloat(matrix[e]);
    }
crccheck commented 9 years ago

I can't believe I didn't catch that. Also cannot believe I did .map(function(x){ return parseFloat(x); })