Index: Source/devtools/front_end/animation/AnimationModel.js |
diff --git a/Source/devtools/front_end/animation/AnimationModel.js b/Source/devtools/front_end/animation/AnimationModel.js |
index 09e30fd25b2c5d91cbdc8010c7291169f674bedb..b692148699caf0b34fa738014f2e3bcd7a7c8669 100644 |
--- a/Source/devtools/front_end/animation/AnimationModel.js |
+++ b/Source/devtools/front_end/animation/AnimationModel.js |
@@ -22,7 +22,7 @@ WebInspector.AnimationModel = function(target) |
} |
WebInspector.AnimationModel.Events = { |
- AnimationCreated: "AnimationCreated", |
+ AnimationGroupStarted: "AnimationGroupStarted", |
AnimationCanceled: "AnimationCanceled" |
} |
@@ -51,9 +51,7 @@ WebInspector.AnimationModel.prototype = { |
while (this._pendingAnimations.length) { |
var group = this._createGroupFromPendingAnimations(); |
this._animationGroups.set(group.id(), group); |
- // TODO(samli): Dispatch single group event. |
- for (var anim of group.animations()) |
- this.dispatchEventToListeners(WebInspector.AnimationModel.Events.AnimationCreated, { "player": anim, "resetTimeline": anim.id() === group.id() }); |
+ this.dispatchEventToListeners(WebInspector.AnimationModel.Events.AnimationGroupStarted, group); |
} |
}, |
@@ -519,6 +517,14 @@ WebInspector.AnimationModel.AnimationGroup.prototype = { |
return this._animations; |
}, |
+ /** |
+ * @return {number} |
+ */ |
+ startTime: function() |
+ { |
+ return this._animations[0].startTime(); |
+ }, |
+ |
__proto__: WebInspector.SDKObject.prototype |
} |