This commit is contained in:
Paulo Veiga 2009-07-10 00:02:00 +00:00
parent 1f2f240ef7
commit cb8f1478f6
2 changed files with 34 additions and 5 deletions

View File

@ -24,10 +24,39 @@ web2d.peer.ToolkitVML =
var domDocument = window.document;
//ownerDocument;
// Add VML includes and namespace
domDocument.namespaces.add("v", "urn:schemas-microsoft-com:vml");
var style = domDocument.createStyleSheet();
style.addRule("v\\:*", "behavior:url(#default#VML); display:inline-block");
try
{
domDocument.namespaces.add("v", "urn:schemas-microsoft-com:vml");
} catch(j)
{
try
{
domDocument.namespaces.add("v", "urn:schemas-microsoft-com:vml", "#default#VML");
} catch(k)
{
}
}
try
{
style.addRule("v\\:*", "behavior:url(#default#VML); display:inline-block");
} catch(e)
{
style.addRule('v\\:polyline', 'behavior: url(#default#VML);display:inline-block');
style.addRule('v\\:fill', 'behavior: url(#default#VML);display:inline-block');
style.addRule('v\\:stroke', 'behavior: url(#default#VML);display:inline-block');
style.addRule('v\\:oval', 'behavior: url(#default#VML);display:inline-block');
style.addRule('v\\:group', 'behavior: url(#default#VML);display:inline-block');
style.addRule('v\\:image', 'behavior: url(#default#VML);display:inline-block');
style.addRule('v\\:line', 'behavior: url(#default#VML);display:inline-block');
style.addRule('v\\:rect', 'behavior: url(#default#VML);display:inline-block');
style.addRule('v\\:roundrect', 'behavior: url(#default#VML);display:inline-block');
style.addRule('v\\:shape', 'behavior: url(#default#VML);display:inline-block');
style.addRule('v\\:textbox', 'behavior: url(#default#VML);display:inline-block');
}
},
createWorkspace: function(element)
{

View File

@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<script type="text/javascript">
web2d = {