svnno****@sourc*****
svnno****@sourc*****
2011年 10月 5日 (水) 19:28:35 JST
Revision: 2974 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2974 Author: dhrname Date: 2011-10-05 19:28:34 +0900 (Wed, 05 Oct 2011) Log Message: ----------- polyline, polygon要素のpoints属性をアニメーションする際に発生するバグを一部修正 Modified Paths: -------------- branches/08x/086/org/w3c/dom/svg.js Modified: branches/08x/086/org/w3c/dom/svg.js =================================================================== --- branches/08x/086/org/w3c/dom/svg.js 2011-10-03 14:36:58 UTC (rev 2973) +++ branches/08x/086/org/w3c/dom/svg.js 2011-10-05 10:28:34 UTC (rev 2974) @@ -5355,7 +5355,15 @@ v2 = tanni = void 0; } } - if (!!tta) { + if ("animatedPoints" in ttr) { + ttr.animatedPoints = vi.points; + for (var i=0, tav=tar._values, tvli=tav.length;i<tvli;++i) { + var vir = ttr.cloneNode(false); + delete vir._tar; + vir.setAttributeNS(null, "points", tav[i]); + tar._valueList[tar._valueList.length] = vir.points; + } + } else if (!!tta) { tta.animVal = vi[attrName].baseVal; for (var i=0, tav=tar._values, tvli=tav.length;i<tvli;++i) { var vir = ttr.cloneNode(false); //仮の要素 @@ -5372,14 +5380,6 @@ tar._valueList[i] = parseFloat(tav[i]); } } - } else if ("animatedPoints" in ttr) { - ttr.animatedPoints = vi.points; - for (var i=0, tav=tar._values, tvli=tav.length;i<tvli;++i) { - var vir = ttr.cloneNode(false); - delete vir._tar; - vir.setAttributeNS(null, "points", tav[i]); - tar._valueList[tar._valueList.length] = vir.points; - } } else if ("normalizedPathSegList" in ttr) { ttr.animatedNormalizedPathSegList = vi.normalizedPathSegList; for (var i=0, tav=tar._values, tvli=tav.length;i<tvli;++i) { @@ -5427,7 +5427,13 @@ var di = d / n; //keyTimesがなければ均等に時間を配分しておく var ti = ii / n; } - if (!!tta) { + if ("animatedPoints" in ttr) { + var base = ttr.points; + ttr.points = ttr.animatedPoints; + ttr.dispatchEvent(evt); + ttr.animatedPoints = ttr.points; + ttr.points = base; + } else if (!!tta) { var base = tta.baseVal, tanim = tta.animVal; var v1 = tar._valueList[ii].value; /*vを求める公式に関しては、SMIL2.0 Animation Moduleの単純アニメーション関数の項を参照 @@ -5457,12 +5463,6 @@ } else { var v = v1; } - } else if ("animatedPoints" in ttr) { - var base = ttr.points; - ttr.points = ttr.animatedPoints; - ttr.dispatchEvent(evt); - ttr.animatedPoints = ttr.points; - ttr.points = base; } else if ("normalizedPathSegList" in ttr) { var base = ttr.normalizedPathSegList; ttr.normalizedPathSegList = ttr.animatedNormalizedPathSegList;