Archive

Archive for June, 2009

Using dynamic canvas creation with google excanvas using IE

June 30th, 2009 No comments

When you are using IE and ExplorerCanvas, dynamically created canvas with document.createElement are not working. They’re are not extending the ExplorerCanvas functionnality by default.

Include this script after excanvas.js in your html header to extend the created element at creation:

if ( /MSIE/.test(navigator.userAgent) )
{
document._createElement = document.createElement;
document.createElement = function( tag )
{
var element = document._createElement( tag );
if ( tag == “canvas” )
{
//width and height are required for initElement
element.width = 1;
element.height = 1;
G_vmlCanvasManager.initElement(element);
}

return element;
}
}

Now you’re dynamically created canvas will actually work. This is surelly not the best way to do it, because of performance overhead, but at least it works. Plus, you rarely use tons of canvas in the same document.

if ( /MSIE/.test(navigator.userAgent) )
{
document._createElement = document.createElement;
document.createElement = function( tag )
{
var element = document._createElement( tag );
if ( tag == “canvas” )
{
//width and height are required for initElement
element.width = 1;
element.height = 1;
G_vmlCanvasManager.initElement(element);
}

return element;
}
}

WordPress

June 1st, 2009 No comments

WordPress est maintenant la plateforme officielle de mon site web.

————————————

WordPress is now the main platform for my website.

Categories: Others Tags:

Reportage sur mon employeur

June 1st, 2009 No comments
Categories: Others Tags: ,