diff --git a/jquery.flot.js b/jquery.flot.js index e5ee913..453ebc7 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -735,6 +735,9 @@ var c = document.createElement('canvas'); c.className = cls; + if (!c.getContext) // excanvas hack + c = window.G_vmlCanvasManager.initElement(c); + var cctx = c.getContext("2d"); // Increase the canvas density based on the display's pixel ratio; basically @@ -754,9 +757,6 @@ $(c).appendTo(placeholder); - if (!c.getContext) // excanvas hack - c = window.G_vmlCanvasManager.initElement(c); - // Save the context so we can reset in case we get replotted cctx.save();