• R/O
  • HTTP
  • SSH
  • HTTPS

sie: コミット

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


コミットメタ情報

リビジョン82e3e2ccd7637c981622763e2cd68a55e614a065 (tree)
日時2015-12-02 22:25:13
作者dhrname <dhrname@user...>
コミッターdhrname

ログメッセージ

Modify the additive attribute's problem

変更サマリ

差分

--- a/org/w3c/dom/smil.js
+++ b/org/w3c/dom/smil.js
@@ -534,7 +534,11 @@ base("$from").of( {
534534
535535 /*$toオブジェクトにこのオブジェクトを適用させる関数*/
536536 call: function() {
537- if (this.numList.length) {
537+ if (this.numList.length
538+ && (this.additive[0] === 0)
539+ && (this.accumulate[0] === 0)
540+ ) {
541+ /*配列の項目がundefinedだと困るので、配列を初期化する*/
538542 var additive = [],
539543 accumulate = [];
540544 for (var i=0;i<this.numList.length;++i) {
@@ -633,9 +637,7 @@ base("$from").of( {
633637 }
634638 var from = this.$from.up();
635639 from.string = str;
636- var s = from.call();
637- this.additive = s;
638- return s;
640+ return ( this.additive = from.call() );
639641 },
640642
641643 /*setAccumulate メソッド
@@ -645,11 +647,9 @@ base("$from").of( {
645647 if (!num || isNaN(num)) {
646648 return 0;
647649 }
648- var s = this.numList.map( function(d) {
650+ return ( this.accumulate = this.numList.map( function(d) {
649651 return d * num;
650- } );
651- this.accumulate = s;
652- return s;
652+ } ) );
653653 }
654654 } )
655655 /*fromプロパティの初期化*/
旧リポジトリブラウザで表示