| 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 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 UI.BezierEditor = class extends UI.VBox { | 7 UI.BezierEditor = class extends UI.VBox { |
| 8 constructor() { | 8 constructor() { |
| 9 super(true); | 9 super(true); |
| 10 this.registerRequiredCSS('ui/bezierEditor.css'); | 10 this.registerRequiredCSS('ui/bezierEditor.css'); |
| 11 this.contentElement.tabIndex = 0; | 11 this.contentElement.tabIndex = 0; |
| 12 this.setDefaultFocusedElement(this.contentElement); |
| 12 | 13 |
| 13 // Preview UI | 14 // Preview UI |
| 14 this._previewElement = this.contentElement.createChild('div', 'bezier-previe
w-container'); | 15 this._previewElement = this.contentElement.createChild('div', 'bezier-previe
w-container'); |
| 15 this._previewElement.createChild('div', 'bezier-preview-animation'); | 16 this._previewElement.createChild('div', 'bezier-preview-animation'); |
| 16 this._previewElement.addEventListener('click', this._startPreviewAnimation.b
ind(this)); | 17 this._previewElement.addEventListener('click', this._startPreviewAnimation.b
ind(this)); |
| 17 this._previewOnion = this.contentElement.createChild('div', 'bezier-preview-
onion'); | 18 this._previewOnion = this.contentElement.createChild('div', 'bezier-preview-
onion'); |
| 18 this._previewOnion.addEventListener('click', this._startPreviewAnimation.bin
d(this)); | 19 this._previewOnion.addEventListener('click', this._startPreviewAnimation.bin
d(this)); |
| 19 | 20 |
| 20 this._outerContainer = this.contentElement.createChild('div', 'bezier-contai
ner'); | 21 this._outerContainer = this.contentElement.createChild('div', 'bezier-contai
ner'); |
| 21 | 22 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 {name: 'ease-out', value: 'ease-out'}, {name: 'Out · Sine', value: 'cubic-be
zier(0.39, 0.58, 0.57, 1)'}, | 262 {name: 'ease-out', value: 'ease-out'}, {name: 'Out · Sine', value: 'cubic-be
zier(0.39, 0.58, 0.57, 1)'}, |
| 262 {name: 'Out · Quadratic', value: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)'}, | 263 {name: 'Out · Quadratic', value: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)'}, |
| 263 {name: 'Out · Cubic', value: 'cubic-bezier(0.22, 0.61, 0.36, 1)'}, | 264 {name: 'Out · Cubic', value: 'cubic-bezier(0.22, 0.61, 0.36, 1)'}, |
| 264 {name: 'Linear Out, Slow In', value: 'cubic-bezier(0, 0, 0.2, 1)'}, | 265 {name: 'Linear Out, Slow In', value: 'cubic-bezier(0, 0, 0.2, 1)'}, |
| 265 {name: 'Out · Back', value: 'cubic-bezier(0.18, 0.89, 0.32, 1.28)'} | 266 {name: 'Out · Back', value: 'cubic-bezier(0.18, 0.89, 0.32, 1.28)'} |
| 266 ] | 267 ] |
| 267 ]; | 268 ]; |
| 268 | 269 |
| 269 /** @typedef {{presets: !Array.<{name: string, value: string}>, icon: !Element,
presetIndex: number}} */ | 270 /** @typedef {{presets: !Array.<{name: string, value: string}>, icon: !Element,
presetIndex: number}} */ |
| 270 UI.BezierEditor.PresetCategory; | 271 UI.BezierEditor.PresetCategory; |
| OLD | NEW |