Demo/bin/Debug/front_end/animation/AnimationModel.js
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @constructor
* @extends {WebInspector.SDKModel}
* @param {!WebInspector.Target} target
*/
WebInspector.AnimationModel = function(target)
{
WebInspector.SDKModel.call(this, WebInspector.AnimationModel, target);
this._agent = target.animationAgent();
target.registerAnimationDispatcher(new WebInspector.AnimationDispatcher(this));
}
WebInspector.AnimationModel.Events = {
AnimationCreated: "AnimationCreated",
AnimationCanceled: "AnimationCanceled"
}
WebInspector.AnimationModel.prototype = {
/**
* @param {!AnimationAgent.Animation} payload
* @param {boolean} resetTimeline
*/
animationCreated: function(payload, resetTimeline)
{
var player = WebInspector.AnimationModel.Animation.parsePayload(this.target(), payload);
this.dispatchEventToListeners(WebInspector.AnimationModel.Events.AnimationCreated, { "player": player, "resetTimeline": resetTimeline });
},
/**
* @param {string} id
*/
animationCanceled: function(id)
{
this.dispatchEventToListeners(WebInspector.AnimationModel.Events.AnimationCanceled, { "id": id });
},
/**
* @param {number} playbackRate
*/
setPlaybackRate: function(playbackRate)
{
this._agent.setPlaybackRate(playbackRate);
},
ensureEnabled: function()
{
if (this._enabled)
return;
this._agent.enable();
this._enabled = true;
},
__proto__: WebInspector.SDKModel.prototype
}
后面还有 414 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。