• R/O
  • HTTP
  • SSH
  • HTTPS

sie: コミット

ブラウザでSVGを表示するSIEの開発 (SIE - to display SVG on legacy browsers)


コミットメタ情報

リビジョン3710ee891f02b1bfb7f03c01c0cd00b8f9cae548 (tree)
日時2016-03-05 21:54:10
作者dhrname <dhrname@user...>
コミッターdhrname

ログメッセージ

Add the setAdd method and the setAccum method to the object

変更サマリ

差分

--- a/org/w3c/dom/smil.js
+++ b/org/w3c/dom/smil.js
@@ -1309,6 +1309,29 @@ base("$calcMode").up("$attribute").mix( {
13091309 whitesmoke: [245,245,245],
13101310 yellow: [255,255,0],
13111311 yellowgreen: [154,205,50]
1312+ },
1313+
1314+ setAdd: function (ele, to) {
1315+ /*additive属性がsum (加法アニメーション)の場合*/
1316+ if (ele.getAttributeNS(null, "additive") === "sum") {
1317+ var attrValue = ele.parentNode.getAttributeNS(null, this.attrName);
1318+ ele.addEventListener("beginEvent", function(evt) {
1319+ to.forEach( function(x) {
1320+ x.to.setAdditive(attrValue);
1321+ } )
1322+ }, false);
1323+ }
1324+ },
1325+ setAccum: function (ele, to) {
1326+ /*accumulate属性がsum (蓄積アニメーション)の場合*/
1327+ if (ele.getAttributeNS(null, "accumulate") === "sum") {
1328+ ele.addEventListener("repeatEvent", function(evt) {
1329+ to.forEach( function(x) {
1330+ x.to.call();
1331+ x.to.setAccumulate(evt.detail);
1332+ } )
1333+ }, false);
1334+ }
13121335 }
13131336
13141337 /*initメソッドに追加処理
@@ -1381,25 +1404,8 @@ base("$calcMode").up("$attribute").mix( {
13811404 return (this.mode !== "spline")
13821405 || (s(0.1) !== Math.PI);
13831406 }, this );
1384-
1385- /*additive属性がsum (加法アニメーション)の場合*/
1386- if (ele.getAttributeNS(null, "additive") === "sum") {
1387- var attrValue = ele.parentNode.getAttributeNS(null, this.attrName);
1388- ele.addEventListener("beginEvent", function(evt) {
1389- to.forEach( function(x) {
1390- x.to.setAdditive(attrValue);
1391- } )
1392- }, false);
1393- }
1394- /*acuumulate属性がsum (蓄積アニメーション)の場合*/
1395- if (ele.getAttributeNS(null, "accumulate") === "sum") {
1396- ele.addEventListener("repeatEvent", function(evt) {
1397- to.forEach( function(x) {
1398- x.to.call();
1399- x.to.setAccumulate(evt.detail);
1400- } )
1401- }, false);
1402- }
1407+ this.setAdd(ele, to);
1408+ this.setAccum(ele, to);
14031409 }
14041410 keywords = toRGB = isColor = void 0;
14051411 } )
旧リポジトリブラウザで表示