ブラウザでSVGを表示するSIEの開発 (SIE - to display SVG on legacy browsers)
| リビジョン | b5a08effdcb005713e82364161bdec76c383dccf (tree) |
|---|---|
| 日時 | 2016-05-18 23:03:29 |
| 作者 | dhrname <dhrname@user...> |
| コミッター | dhrname |
Start to support the animateMOtion element
| @@ -798,7 +798,7 @@ base("$calcMode").up("$attribute").mix( { | ||
| 798 | 798 | return view.getComputedStyle(this._ele, "").getPropertyValue("color"); |
| 799 | 799 | } |
| 800 | 800 | } |
| 801 | - /*DOM Level2やIE11では、getAttributeNSメソッドは空文字を返す。他のブラウザではnullを返すことが多い | |
| 801 | + /*DOM Level2やIE11では、getAttributeNSメソッドは空文字列を返す。他のブラウザではnullを返すことが多い | |
| 802 | 802 | * |
| 803 | 803 | * >the empty string if that attribute does not have a specified or default value |
| 804 | 804 | * http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-ElGetAttrNS*/ |
| @@ -1808,11 +1808,13 @@ function getDocument() | ||
| 1808 | 1808 | |
| 1809 | 1809 | /*文書からアニメーション関連要素を取り出して、オブジェクトを初期化*/ |
| 1810 | 1810 | function getElement (svgDoc) { |
| 1811 | - var $set = base("$calcMode").$attribute.$setElement; | |
| 1811 | + var $set = base("$calcMode").$attribute.$setElement, | |
| 1812 | + $animate = $set.$animateElement; | |
| 1812 | 1813 | init($set, "set"); |
| 1813 | - init($set.$animateElement, "animate"); | |
| 1814 | - init($set.$animateElement, "animateColor"); | |
| 1815 | - init($set.$animateElement.$animateTransformElement, "animateTransform"); | |
| 1814 | + init($animate, "animate"); | |
| 1815 | + init($animate, "animateColor"); | |
| 1816 | + init($animate.$animateTransformElement, "animateTransform"); | |
| 1817 | + init($animate.$animateTransformElement.$motionElement, "animateMotion"); | |
| 1816 | 1818 | /*リンクのハッシュ読み取りで、ハイパーリンクのイベント処理 |
| 1817 | 1819 | * たとえば、a要素のxlink:href="#hoge"で、<animate id="hoge"のとき、 |
| 1818 | 1820 | * animate要素がハイパーリンク作動と同時に動くようになる |
| @@ -2818,6 +2818,7 @@ describe("SMIL Animation Spec", function() { | ||
| 2818 | 2818 | expect(p.__transformList).toBeUndefined(); |
| 2819 | 2819 | expect($animate.isCSS).toBeFalsy(); |
| 2820 | 2820 | expect($animate.isSum).toBeFalsy(); |
| 2821 | + expect($animate.attrName).toBe("transform"); | |
| 2821 | 2822 | |
| 2822 | 2823 | $animate.init(); |
| 2823 | 2824 | expect($animate.numberOfList).toBe(-1); |
| @@ -3014,6 +3015,7 @@ describe("SMIL Animation Spec", function() { | ||
| 3014 | 3015 | } ); |
| 3015 | 3016 | afterEach( function() { |
| 3016 | 3017 | $animate.numberOfList = -1; |
| 3018 | + delete $animate.element; | |
| 3017 | 3019 | p.__transformList = null; |
| 3018 | 3020 | } ); |
| 3019 | 3021 | /*境界条件を調べておく (limit value analysis)*/ |