[Sie-announce] SIEコード [1112] IE7のバグ対策として、セレクタ処理を切り分けた

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 3月 26日 (木) 23:55:11 JST


Revision: 1112
          http://svn.sourceforge.jp/view?root=sie&view=rev&rev=1112
Author:   dhrname
Date:     2009-03-26 23:55:10 +0900 (Thu, 26 Mar 2009)

Log Message:
-----------
IE7のバグ対策として、セレクタ処理を切り分けた

Modified Paths:
--------------
    branches/04x/046/sie.js

Modified: branches/04x/046/sie.js
===================================================================
--- branches/04x/046/sie.js	2009-03-26 14:08:46 UTC (rev 1111)
+++ branches/04x/046/sie.js	2009-03-26 14:55:10 UTC (rev 1112)
@@ -100,11 +100,15 @@
   document.namespaces.add("v","urn:schemas-microsoft-com:vml");
   document.namespaces.add("o","urn:schemas-microsoft-com:office:office");
   var st = document.createStyleSheet();
-  st.addRule("v\\:rect, v\\:image, v\\:fill, v\\:stroke","behavior: url(#default#VML);display:inline-block;");//inline-blockはIEのバグ対策
-  st.addRule("o\\:opacity2","behavior: url(#default#VML);display:inline-block");
+  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", "behavior: url(#default#VML);display:inline-block;position:relative;width:100%;height:100%;");
-  st.addRule("v\\:shape", "behavior: url(#default#VML);display:inline-block;width:100%;height:100%;");
+  st.addRule("v\\:group", vmlUrl+ "position:relative;width:100%;height:100%;");
+  st.addRule("v\\:shape", vmlUrl+ "width:100%;height:100%;");
 }
 
 //windowに指定したイベントと関数を追加
@@ -345,6 +349,8 @@
 }
 STGroupElement.prototype.set = function (sw,sh) {
   try{
+  var ele = this.tar;
+  ele.style.width = sw+ "px"; ele.style.height = sh +"px";
   stvsetob(this.children,sw,sh);
   delete (this.children);
   } catch(e){stlog.addd(e,3145)}
@@ -632,6 +638,7 @@
     var ele = this.tar;
     ele.setAttribute("path", dat + " e");
     ele.setAttribute("coordsize", w + " " + h);
+    ele.style.width = w+ "px"; ele.style.height = h +"px";
     this.paint.set(w, h, ttm);
     dat = this.paint = this.d = preCom = x = y = x0 = y0 = dx = dy = tma = tmb = tmc = tmd = tme = tmf = null; //解放
   } catch(e) {stlog.add(e,372);}
@@ -838,6 +845,7 @@
     var ele = this.tar;
     ele.setAttribute("path", dat);
     ele.setAttribute("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);}
 }




Sie-announce メーリングリストの案内
Back to archive index