Hareeshchandera / jsplumb

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

Allow VML in IE9 #222

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Due to the bug with jQuery with SVG + IE9, as discussed before in issue 166, I 
request to allow VML in IE9. Also, this improves testing possibilities. 

Now if VML is selected as renderer, it switches to SVG in IE9. Of course we 
like to promote SVG :)  - But VML should be possible. 

My proposal:
- When SVG is set as setRenderMode, switch IE9 to SVG.
- When VML is set as setRenderMode, switch IE9 to VML.

Useful links/quotes from issue 166.
"VML is still available in IE9 but Microsoft expects web sites to transition to 
SVG in the future"
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5224
(http://en.wikipedia.org/wiki/Vector_Markup_Language#cite_note-7)

Official jQuery bug report:
http://bugs.jquery.com/ticket/10832

Original issue reported on code.google.com by j.verdur...@2bmore.nl on 12 Mar 2012 at 9:04

GoogleCodeExporter commented 8 years ago
How do you detect support for VML or SVG in a browser:
http://stackoverflow.com/questions/654112/how-do-you-detect-support-for-vml-or-s
vg-in-a-browser

or just use jQuery.browser ;)

Original comment by j.verdur...@2bmore.nl on 12 Mar 2012 at 9:05

GoogleCodeExporter commented 8 years ago
i can't use jQuery.browser.  jsPlumb runs on YUI and MooTools aswell.

Original comment by simon.po...@gmail.com on 12 Mar 2012 at 9:17

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
true, I forgot. Sorry :)

Original comment by j.verdur...@2bmore.nl on 12 Mar 2012 at 9:19

GoogleCodeExporter commented 8 years ago
i'll add this to 1.3.8, using the VML detector function in the link you 
provided.  

Original comment by simon.po...@gmail.com on 12 Mar 2012 at 9:55

GoogleCodeExporter commented 8 years ago
Great, I hope it doens't 'eat' a lot of performance :)

Original comment by j.verdur...@2bmore.nl on 12 Mar 2012 at 10:02

GoogleCodeExporter commented 8 years ago
more ugly, but probably faster:

function IsIE9Browser() {

    var ua = navigator.userAgent;

    var regex = new RegExp("Trident\/([0-9]{1,}[\.0-9]{0,})");

    if (regex.exec(ua) != null) {

      var rv = parseInt(RegExp.$1,10);
      return (rv == 5);

    }
    return false;

}

Original comment by j.verdur...@2bmore.nl on 12 Mar 2012 at 10:08

GoogleCodeExporter commented 8 years ago
i'm using the feature detection version rather than the browser sniff - it gets 
run only one time, at page load, so there's a negligible performance hit.

logic will be as you suggested - the priorities will be, for each request:

CANVAS : Canvas, SVG, VML

SVG : SVG, Canvas, VML   (remains the default)

VML : VML, SVG, Canvas

Original comment by simon.po...@gmail.com on 13 Mar 2012 at 1:00

GoogleCodeExporter commented 8 years ago
i made this change in development and loaded it up into IE9, and lo and behold 
the coordinate space was all mashed up.

i need to do a release of jsPlumb soon, so i'm not sure this will make it into 
1.3.8 after all.  it might have to get pushed out to 1.3.9.

Original comment by simon.po...@gmail.com on 31 Mar 2012 at 7:04

GoogleCodeExporter commented 8 years ago
i figured out what the problems were. this will be in 1.3.8.

Original comment by simon.po...@gmail.com on 31 Mar 2012 at 11:56

GoogleCodeExporter commented 8 years ago
1.3.8 was released today.

Original comment by simon.po...@gmail.com on 1 Apr 2012 at 7:52

GoogleCodeExporter commented 8 years ago
Hi!

Have you seen that the bug (http://bugs.jquery.com/ticket/10832) has now the 
status 'fixed'? Although I did not tested it, it should work in jQuery 
1.7.1/1.7.2?

Original comment by j.verdur...@2bmore.nl on 1 Jul 2012 at 3:14