svnno****@sourc*****
svnno****@sourc*****
2009年 4月 17日 (金) 23:49:52 JST
Revision: 1124 http://svn.sourceforge.jp/view?root=sie&view=rev&rev=1124 Author: dhrname Date: 2009-04-17 23:49:52 +0900 (Fri, 17 Apr 2009) Log Message: ----------- document.namespaces.addメソッドの第三引数を削除することで、図形の非表示バグを解決 Modified Paths: -------------- branches/04x/046/sie.js Modified: branches/04x/046/sie.js =================================================================== --- branches/04x/046/sie.js 2009-04-16 14:23:58 UTC (rev 1123) +++ branches/04x/046/sie.js 2009-04-17 14:49:52 UTC (rev 1124) @@ -98,19 +98,19 @@ //vmlの名前空間をセット(必須) function setVMLNameSpace() { if (!document.namespaces["v"]) { - document.namespaces.add("v","urn:schemas-microsoft-com:vml", "#default#VML"); - document.namespaces.add("o","urn:schemas-microsoft-com:office:office", "#default#VML"); + document.namespaces.add("v","urn:schemas-microsoft-com:vml"); + document.namespaces.add("o","urn:schemas-microsoft-com:office:office"); + var st = document.createStyleSheet(); + var vmlUrl = "behavior: url(#default#VML);display:inline-block;"; //inline-blockはIEのバグ対策 + st.addRule("v\\:rect",vmlUrl); + st.addRule("v\\:image",vmlUrl); + st.addRule("v\\:fill",vmlUrl); + st.addRule("v\\:stroke",vmlUrl); + st.addRule("o\\:opacity2",vmlUrl); + st.addRule("dn\\:defs","display:none"); + st.addRule("v\\:group", vmlUrl+ "position:relative;width:100%;height:100%;"); + st.addRule("v\\:shape", vmlUrl+ "width:100%;height:100%;"); } - var st = document.createStyleSheet(); - var vmlUrl = "behavior: url(#default#VML);display:inline-block;"; //inline-blockはIEのバグ対策 - st.addRule("v\\:rect",vmlUrl); - st.addRule("v\\:image",vmlUrl); - st.addRule("v\\:fill",vmlUrl); - st.addRule("v\\:stroke",vmlUrl); - st.addRule("o\\:opacity2",vmlUrl); - st.addRule("dn\\:defs","display:none"); - st.addRule("v\\:group", vmlUrl+ "position:relative;width:100%;height:100%;"); - st.addRule("v\\:shape", vmlUrl+ "width:100%;height:100%;"); } //windowに指定したイベントと関数を追加 @@ -761,7 +761,6 @@ try { var ele = this.tar; ele.path = dat; - ele.style.width = w+ "px"; ele.style.height = h +"px"; ele.coordsize = w + " " + h; this.paint.set(w, h, ttm); } catch(e) {stlog.add(e,479);} @@ -794,7 +793,6 @@ try { var ele = this.tar; ele.path = dat; - ele.style.width = w+ "px"; ele.style.height = h +"px"; ele.coordsize = w + " " + h; this.paint.set(w, h, ttm); } catch(e) {stlog.add(e,519);} @@ -846,7 +844,6 @@ var ele = this.tar; ele.path = dat; ele.coordsize = w + " " + h; - ele.style.width = w+ "px"; ele.style.height = h +"px"; this.paint.set(w, h, ttm); } catch(ee) {stlog.add(ee,576);} } @@ -1019,7 +1016,7 @@ el.fillcolor = this.color(this.fill); var fillOpacity = this.fillopacity * this.opacity; //opacityを掛け合わせる if (fillOpacity < 1) { - fillElement.setAttribute("opacity", fillOpacity); + fillElement.opacity = fillOpacity; } } } catch(e) {stlog.add(e,682); fillElement.on = "true";