[Sie-announce] SIEコード [1523] Opera10. xのSVGをなかなか読み込まない現象を解決するため、処理をずらした

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 1月 3日 (日) 21:03:37 JST


Revision: 1523
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1523
Author:   dhrname
Date:     2010-01-03 21:03:37 +0900 (Sun, 03 Jan 2010)

Log Message:
-----------
Opera10.xのSVGをなかなか読み込まない現象を解決するため、処理をずらした

Modified Paths:
--------------
    branches/05x/057/sie.js

Modified: branches/05x/057/sie.js
===================================================================
--- branches/05x/057/sie.js	2010-01-03 11:41:30 UTC (rev 1522)
+++ branches/05x/057/sie.js	2010-01-03 12:03:37 UTC (rev 1523)
@@ -95,7 +95,8 @@
     if (/a/[-1] === 'a'){ //Firefoxだったらtrueを返す
       NAIBU.STObject.ffnext();
     }
-    setTimeout(_noie_svgfont, 500);
+    var off = (!!window.opera)? 2000 : 500;
+    setTimeout(_noie_svgfont, off);
     if (navigator.appVersion.indexOf("Version/3") > -1) { //Safariがバージョン3ならば
       NAIBU.STObject.startAnime();
     }
@@ -341,7 +342,7 @@
 };
 NAIBU.svgNameSpace = "http://www.w3.org/2000/svg";
 //embed要素をobject要素に変える(Firefoxのみ)
-Objectembeds.prototype.ffnext = function (){
+Objectembeds.prototype.ffnext = function(){
   try{
     for (var i=0,teli=this.emd.length;i<teli;++i) {
       var s = document.createElement("object"), tei = this.emd[i];
@@ -357,7 +358,7 @@
   } catch(e) {stlog.add(e,294);}
 };
 //アニメーションをスタートさせる
-Objectembeds.prototype.startAnime = function (){
+Objectembeds.prototype.startAnime = function(){
   for (var i=0;i<this.obj.length;++i) {
     var doc = (this.obj[i].getSVGDocument === void 0) ? this.obj[i].contentDocument : this.obj[i].getSVGDocument();
     var sets = doc.getElementsByTagNameNS(NAIBU.svgNameSpace, "set"), s;
@@ -382,7 +383,7 @@
   } catch(e){stlog.add(e,3144);}
   return this;
 }
-STGroupElement.prototype.set = function (sw,sh) {
+STGroupElement.prototype.set = function(sw,sh) {
   try{
     var _stvsetob = stvsetob;
     _stvsetob(this.children,sw,sh);
@@ -593,7 +594,7 @@
   this.transformable = _ni.transformToCTM(ele,matrix);
   return this;
 };
-(function (){
+(function(){
   var a =  /^\],/,
       b = /\s*$/,
       c = /[\s,]{2,}|\s/g,
@@ -601,7 +602,7 @@
         "c" : 1,
         "q" : 1
       };
-STPath.prototype.set = function ( /*float*/ w, /*float*/ h) {
+STPath.prototype.set = function( /*float*/ w, /*float*/ h) {
   var dat = "", _isCorQ = isCorQ, _parseInt = parseInt, _eval = eval;
   try {
     var dd = this.d
@@ -701,7 +702,7 @@
 };
 })();
 //QからCに変換
-NAIBU.qtoc = function (/*float*/ x, /*float*/ y, /*Array*/ F) {
+NAIBU.qtoc = function(/*float*/ x, /*float*/ y, /*Array*/ F) {
   F[0] = "c";
   for (var i = 1; i < F.length; i += 6) {
     var x1 = F[i], y1 = F[i+1], x2 = F[i+2], y2 = F[i+3];
@@ -712,7 +713,7 @@
 };
 
 //前回の座標を反転させる。それを挿入
-NAIBU.nst = function ( /*int*/ skip, /*Array*/ F, /*float*/ x1, /*float*/ y1) {
+NAIBU.nst = function( /*int*/ skip, /*Array*/ F, /*float*/ x1, /*float*/ y1) {
   F.splice(1, 0, x1, y1);
   for (var i = skip+1; i < F.length; i += skip) {
     x1 = 2 * F[i-2] - F[i-4];
@@ -723,7 +724,7 @@
 };
 
 //相対座標を絶対座標に変換
-NAIBU.reltoabs = function (/*float*/ x, /*float*/ y, /*Array*/ F) {
+NAIBU.reltoabs = function(/*float*/ x, /*float*/ y, /*Array*/ F) {
   var skip = 2;
   if (F[0] === "c") { 
     skip = 6;
@@ -1081,7 +1082,7 @@
     return cache[id];
   }
 };
-NAIBU.PaintColor.prototype.getAttribute = function ( /*string*/ name) {
+NAIBU.PaintColor.prototype.getAttribute = function( /*string*/ name) {
   try {
     var element = this.tar;
     var style = element.style[name];
@@ -1105,7 +1106,7 @@
   } catch(e) {stlog.add(e,899); return "";}
 };
 NAIBU.PaintColor.prototype._urlreg = /url\(#([^)]+)/;
-NAIBU.PaintColor.prototype.set = function (/*float*/ w, /*float*/ h, /*Matrix*/ matrix) {
+NAIBU.PaintColor.prototype.set = function(/*float*/ w, /*float*/ h, /*Matrix*/ matrix) {
   var el = this.tar;
   if (this.fill === "none") {
     el.filled = "false";
@@ -1329,7 +1330,7 @@
   return color;
 };
 //linearGradient、radialGradient要素を処理
-NAIBU.PaintColor.prototype.gradient = function ( /*element*/ ele, /*string*/ id, /*Matrix*/ matrix) {
+NAIBU.PaintColor.prototype.gradient = function( /*element*/ ele, /*string*/ id, /*Matrix*/ matrix) {
   var grad = document.getElementById(id);
   if (grad) {
   var grad2 = grad;
@@ -1521,7 +1522,7 @@
 NAIBU.comaR = /[A-Za-z]+(?=\s*\()/g;
 NAIBU.listR = /\([^\)]+\)/g;
 NAIBU.degR = /[\-\d\.e]+/g;
-NAIBU.transformToCTM = function ( /*element*/ ele, /*Matrix*/ matrix) {
+NAIBU.transformToCTM = function( /*element*/ ele, /*Matrix*/ matrix) {
   try {
   var tft = ele.getAttribute("transform");
   if (tft) {
@@ -1611,7 +1612,7 @@
   this.y = y;
   return this;
 }
-Point.prototype.matrixTransform = function ( /*Matrix*/ m) {
+Point.prototype.matrixTransform = function( /*Matrix*/ m) {
   var x = parseInt(m.a * this.x + m.c * this.y + m.e);
   var y = parseInt(m.b * this.x + m.d * this.y + m.f);
   if (-1 < x && x < 1) {x=1;}
@@ -1653,7 +1654,7 @@
   return this;
 }
 //Matrix同士の積を算出
-Matrix.prototype.multiply = function ( /*Matrix*/ m) {
+Matrix.prototype.multiply = function( /*Matrix*/ m) {
   var s = new Matrix(this.a * m.a + this.c * m.b, this.b * m.a + this.d * m.b, this.a * m.c + this.c * m.d,
                      this.b * m.c + this.d * m.d, this.a * m.e + this.c * m.f + this.e, this.b * m.e + this.d * m.f + this.f);
   return s;
@@ -1899,14 +1900,14 @@
   "px": 5,
   "%":  2
 };
-STLength.prototype.newValueSpecifiedUnits = function ( /*number*/ ut, /*number*/ value) {
+STLength.prototype.newValueSpecifiedUnits = function( /*number*/ ut, /*number*/ value) {
   this.unitType = ut;
   this.value = value * this._n[ut-1];
   this.valueInSpecifiedUnits = value;
   this._n[1] = 0.01; //初期化
 };
 //単位がemの場合、変換を行う。変換するとtrueを返す
-STLength.prototype._emToUnits = function ( /*number*/ fontSize) {
+STLength.prototype._emToUnits = function( /*number*/ fontSize) {
   if (this.unitType === 3) {
     this.value *= fontSize;
     return true;
@@ -2446,7 +2447,7 @@
 };
 //プロトタイプチェーンで省略化を行う
 _noie_STSetElement.prototype = new STSetElement();
-_noie_STSetElement.prototype.set = function (){
+_noie_STSetElement.prototype.set = function(){
   this.to = this.tar.getAttributeNS(null, "to");
   var offset = 0;
   try {




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