svnno****@sourc*****
svnno****@sourc*****
2010年 10月 25日 (月) 21:51:32 JST
Revision: 2090 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2090 Author: dhrname Date: 2010-10-25 21:51:32 +0900 (Mon, 25 Oct 2010) Log Message: ----------- text2SVG機能を修正して実装 Modified Paths: -------------- branches/06x/062/org/w3c/dom/svg.js Modified: branches/06x/062/org/w3c/dom/svg.js =================================================================== --- branches/06x/062/org/w3c/dom/svg.js 2010-10-23 14:56:05 UTC (rev 2089) +++ branches/06x/062/org/w3c/dom/svg.js 2010-10-25 12:51:32 UTC (rev 2090) @@ -5167,9 +5167,10 @@ } } NAIBU.xmlhttp = xmlhttp; - NAIBU.doc = new ActiveXObject("MSXML2.DomDocument"); - var nd = NAIBU.doc; - if (!document.namespaces["v"]) { + var nd; + if (("namespaces" in document) && !document.namespaces["v"]) { + NAIBU.doc = new ActiveXObject("MSXML2.DomDocument"); + nd = NAIBU.doc; document.namespaces.add("v","urn:schemas-microsoft-com:vml"); document.namespaces.add("o","urn:schemas-microsoft-com:office:office"); var st = document.createStyleSheet(); @@ -5202,7 +5203,7 @@ } else { var base = location.href.replace(/\/[^\/]+?$/,"/"); //URIの最後尾にあるファイル名は消す。例: /n/sie.js -> /n/ ait = ait.replace(/\shref=(['"a-z]+?):\/\//g, " target='_top' xlink:href=$1://").replace(/\shref=(.)/g, " target='_top' xlink:href=$1"+base); - var s = textToSVG(ait,ary[i].getAttribute("width"),ary[i].getAttribute("height")); + var s = NAIBU.textToSVG(ait,ary[i].getAttribute("width"),ary[i].getAttribute("height")); ary[i].parentNode.insertBefore(s,ary[i]); } ait = null;