| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
| 8 */ | 8 */ |
| 9 WebInspector.BezierEditor = function() | 9 WebInspector.BezierEditor = function() |
| 10 { | 10 { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 }, | 91 }, |
| 92 | 92 |
| 93 /** | 93 /** |
| 94 * @return {!WebInspector.Geometry.CubicBezier} | 94 * @return {!WebInspector.Geometry.CubicBezier} |
| 95 */ | 95 */ |
| 96 bezier: function() | 96 bezier: function() |
| 97 { | 97 { |
| 98 return this._bezier; | 98 return this._bezier; |
| 99 }, | 99 }, |
| 100 | 100 |
| 101 /** |
| 102 * @override |
| 103 */ |
| 101 wasShown: function() | 104 wasShown: function() |
| 102 { | 105 { |
| 103 this._unselectPresets(); | 106 this._unselectPresets(); |
| 104 // Check if bezier matches a preset | 107 // Check if bezier matches a preset |
| 105 for (var category of this._presetCategories) { | 108 for (var category of this._presetCategories) { |
| 106 for (var i = 0; i < category.presets.length; i++) { | 109 for (var i = 0; i < category.presets.length; i++) { |
| 107 if (this._bezier.asCSSText() === category.presets[i].value) { | 110 if (this._bezier.asCSSText() === category.presets[i].value) { |
| 108 category.presetIndex = i; | 111 category.presetIndex = i; |
| 109 this._presetCategorySelected(category); | 112 this._presetCategorySelected(category); |
| 110 } | 113 } |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 var slice = this._previewOnion.createChild("div", "bezier-preview-an
imation"); | 276 var slice = this._previewOnion.createChild("div", "bezier-preview-an
imation"); |
| 274 var player = slice.animate([{ transform: "translateX(0px)", easing:
this._bezier.asCSSText() }, { transform: "translateX(218px)" }], | 277 var player = slice.animate([{ transform: "translateX(0px)", easing:
this._bezier.asCSSText() }, { transform: "translateX(218px)" }], |
| 275 { duration: animationDuration, fill: "forwards" }); | 278 { duration: animationDuration, fill: "forwards" }); |
| 276 player.pause(); | 279 player.pause(); |
| 277 player.currentTime = animationDuration * i / numberOnionSlices; | 280 player.currentTime = animationDuration * i / numberOnionSlices; |
| 278 } | 281 } |
| 279 }, | 282 }, |
| 280 | 283 |
| 281 __proto__: WebInspector.VBox.prototype | 284 __proto__: WebInspector.VBox.prototype |
| 282 }; | 285 }; |
| OLD | NEW |