ブラウザでSVGを表示するSIEの開発 (SIE - to display SVG on legacy browsers)
| リビジョン | 0489d85aad56a49c8f9dc1fb76fd470f96a09dd1 (tree) |
|---|---|
| 日時 | 2016-04-07 20:02:14 |
| 作者 | dhrname <dhrname@user...> |
| コミッター | dhrname |
Remove the isEnd property from the object
| @@ -1084,11 +1084,8 @@ base("$calcMode").up("$attribute").mix( { | ||
| 1084 | 1084 | this.setAttribute(this.to); |
| 1085 | 1085 | }, |
| 1086 | 1086 | |
| 1087 | - /*アニメーションが終了したかどうか*/ | |
| 1088 | - isEnd: false, | |
| 1089 | - | |
| 1090 | 1087 | /*アニメーション中かどうかの判別 |
| 1091 | - * 1, idling アニメがまだ始まっていない待機状態 | |
| 1088 | + * 1, idling アニメがまだ始まっていない待機状態 (規定値) | |
| 1092 | 1089 | * 2, playing アニメーションの再生中 |
| 1093 | 1090 | */ |
| 1094 | 1091 | state: "idling", |
| @@ -1099,16 +1096,16 @@ base("$calcMode").up("$attribute").mix( { | ||
| 1099 | 1096 | /*アニメが終了した際の後処理 |
| 1100 | 1097 | * 終了処理をしたいときは、falseを値として返す*/ |
| 1101 | 1098 | _setEndFrame: function(frame) { |
| 1102 | - var line = this.timeline; | |
| 1103 | - if (!line.isResolved || isNaN(line.begin + line.activeTime)) { | |
| 1099 | + var line = this.timeline, | |
| 1100 | + end = line.begin + line.activeTime; | |
| 1101 | + if (!line.isResolved || isNaN(end)) { | |
| 1104 | 1102 | /*未解決など問題が発生したとき*/ |
| 1105 | 1103 | line = frame = void 0; |
| 1106 | 1104 | return true; |
| 1107 | 1105 | } else if ( |
| 1108 | 1106 | ( ( frame < line.begin ) |
| 1109 | - || ( (line.begin + line.activeTime) <= frame ) | |
| 1107 | + || ( (end) <= frame ) | |
| 1110 | 1108 | ) && (this.state === "playing") ) { |
| 1111 | - this.isEnd = true; | |
| 1112 | 1109 | /*removeの場合、アニメーションを凍結せずに、もとに戻す*/ |
| 1113 | 1110 | if (this.fill === "remove") { |
| 1114 | 1111 | this.removeAttribute(); |
| @@ -1152,8 +1149,8 @@ base("$calcMode").up("$attribute").mix( { | ||
| 1152 | 1149 | } |
| 1153 | 1150 | ); |
| 1154 | 1151 | } |
| 1155 | - /*アニメーションが再起動する可能性もあるため、isEndプロパティはここで初期化*/ | |
| 1156 | - this.isEnd = false; | |
| 1152 | + /*アニメーションが再起動する可能性もあるため、stateプロパティはここで初期化*/ | |
| 1153 | + this.state = "idling"; | |
| 1157 | 1154 | line = thisele = void 0; |
| 1158 | 1155 | } |
| 1159 | 1156 | }).up("$animateElement").mix( { |