g3ortega / polygonzo

Automatically exported from code.google.com/p/polygonzo
Other
0 stars 0 forks source link

Polygon fill color not working in IE9 RC1 #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Load test.html in IE9 RC1. The polygons are filled in white instead of random 
colors. Works OK if you switch the browser mode to IE8.

Original issue reported on code.google.com by m...@mg.to on 2 Mar 2011 at 7:32

GoogleCodeExporter commented 9 years ago
This is because IE9 has support both SVG and VML. 
In this case browser detection should be more strict.

I have a quick fix for you ;) its not very good but it works

in http://code.google.com/p/polygonzo/source/browse/trunk/code/polygonzo.js 
replace line 155

PolyGonzo.msie = !! document.namespaces;

with

PolyGonzo.useVML = (/msie ([\w.]+)/i.exec(navigator.userAgent)||[,10])[1] < 9;

also replace all PolyGonzo.msie with PolyGonzo.useVML

here is working example

http://mabp.kiev.ua/map/code/index.html

PS Sorry for my english

Original comment by CTAPbIuMABP on 7 Mar 2011 at 7:18

GoogleCodeExporter commented 9 years ago
Thanks so much for tracking that down - it does get the polygons to display in 
IE9.

One remaining problem: the polygons are displaying, but mouse events aren't 
coming through. I'm investigating that now.

Also marking bug as critical since IE9 is being released very soon.

p.s. Your English is fine!

Original comment by m...@mg.to on 11 Mar 2011 at 8:20

GoogleCodeExporter commented 9 years ago
Fixed in rev 53. Thanks again for the Canvas tip. The one remaining bit to get 
the events working was to give the tracker element which receives mouse events) 
a background color with zero transparency - which was really just a lucky guess.

Original comment by m...@mg.to on 14 Mar 2011 at 2:38