• R/O
  • HTTP
  • SSH
  • HTTPS

sie: コミット

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


コミットメタ情報

リビジョンfbece7487936a5c6941bb37cfacabb79fed2b840 (tree)
日時2015-08-31 22:54:55
作者dhrname <dhrname@user...>
コミッターdhrname

ログメッセージ

Support an eventOffset property

変更サマリ

差分

--- a/org/w3c/dom/smil.js
+++ b/org/w3c/dom/smil.js
@@ -208,7 +208,7 @@ base("$frame").mix ( {
208208 /*現在のフレーム数を改めて初期化*/
209209 currentFrame: 0,
210210
211- /*イベント同期で使う時間差*/
211+ /*イベント同期で使う時間差のフレーム数*/
212212 eventOffset: 0,
213213
214214 /*trim メソッド
@@ -316,7 +316,7 @@ base("$frame").mix ( {
316316 throw new Error();
317317 }
318318 /*イベントのリスナーが遅かった場合の、誤差の演算をしておく*/
319- this.begin += this.$frame.currentFrame - Math.floor( (Date.now() - evt.timeStamp) * this.fpms );
319+ this.begin = this.eventOffset + this.$frame.currentFrame - Math.floor( (Date.now() - evt.timeStamp) * this.fpms );
320320 var s = this.$activate;
321321 s.begin = this.begin;
322322 this.activeTime = s.call();
@@ -452,7 +452,7 @@ base("$frame").mix ( {
452452 /*強制的に終了させる*/
453453 this.$frame.removeLine(this.$begin);
454454 }
455- this.begin += this.$frame.currentFrame - Math.floor( (Date.now() - evt.timeStamp) * this.fpms );
455+ this.begin = this.eventOffset + this.$frame.currentFrame - Math.floor( (Date.now() - evt.timeStamp) * this.fpms );
456456 var s = this.$begin.$activate;
457457 s.end = this.begin;
458458 this.$begin.activeTime = s.call();
@@ -1030,7 +1030,7 @@ base("$calcMode").up("$attribute").mix( {
10301030 );
10311031 /*activeTimeとbeginとsimpleDurプロパティは_setEndFrame関数内で使うため、コピーしておく*/
10321032 this.activeTime = line.activeTime;
1033- this.begin = line.begin;
1033+ this.begin = this.eventOffset = line.begin;
10341034 this.simpleDuration = line.simpleDuration;
10351035 base("$frame").addLine(
10361036 { setFrame: this._setEndFrame.bind(this),
--- a/tool/Spec/spec/SvgDomSpec.js
+++ b/tool/Spec/spec/SvgDomSpec.js
@@ -2454,6 +2454,7 @@ describe("SMIL Animation Spec", function() {
24542454
24552455 obj.up().mix( {
24562456 begin: 1,
2457+ eventOffset: 1,
24572458 $activate: begin.$activate.up().mix( {
24582459 dur: "12"
24592460 } )
@@ -2470,6 +2471,7 @@ describe("SMIL Animation Spec", function() {
24702471 it("should be this for the value (the valid partion)", function() {
24712472 obj.up().mix( {
24722473 begin: 1,
2474+ eventOffset: 1,
24732475 $activate: begin.$activate.up().mix( {
24742476 end: begin.$activate.end.up().mix( {
24752477 string: "1s"
@@ -2486,6 +2488,7 @@ describe("SMIL Animation Spec", function() {
24862488
24872489 obj.up().mix( {
24882490 begin: 1,
2491+ eventOffset: 1,
24892492 $activate: begin.$activate.up().mix( {
24902493 end: begin.$activate.end.up().mix( {
24912494 string: "1s"
旧リポジトリブラウザで表示