Bug 1431573 - Part 0: Make functions in animation.js alphabetize. r?gl
MozReview-Commit-ID: BbTjVnc5qqv
--- a/devtools/client/inspector/animation/animation.js
+++ b/devtools/client/inspector/animation/animation.js
@@ -186,16 +186,45 @@ class AnimationInspector {
}
isPanelVisible() {
return this.inspector && this.inspector.toolbox && this.inspector.sidebar &&
this.inspector.toolbox.currentToolId === "inspector" &&
this.inspector.sidebar.getCurrentTabID() === "newanimationinspector";
}
+ onElementPickerStarted() {
+ this.inspector.store.dispatch(updateElementPickerEnabled(true));
+ }
+
+ onElementPickerStopped() {
+ this.inspector.store.dispatch(updateElementPickerEnabled(false));
+ }
+
+ onSidebarSelect() {
+ this.update();
+ this.onSidebarResized(null, this.inspector.getSidebarSize());
+ }
+
+ onSidebarResized(type, size) {
+ if (!this.isPanelVisible()) {
+ return;
+ }
+
+ this.inspector.store.dispatch(updateSidebarSize(size));
+ }
+
+ selectAnimation(animation) {
+ this.inspector.store.dispatch(updateSelectedAnimation(animation));
+ }
+
+ setDetailVisibility(isVisible) {
+ this.inspector.store.dispatch(updateDetailVisibility(isVisible));
+ }
+
/**
* Returns simulatable animation by given parameters.
* The returned animation is implementing Animation interface of Web Animation API.
* https://drafts.csswg.org/web-animations/#the-animation-interface
*
* @param {Array} keyframes
* e.g. [{ opacity: 0 }, { opacity: 1 }]
* @param {Object} effectTiming
@@ -255,40 +284,11 @@ class AnimationInspector {
this.inspector.store.dispatch(updateAnimations(animations));
this.animations = animations;
// If number of displayed animations is one, we select the animation automatically.
this.selectAnimation(animations.length === 1 ? animations[0] : null);
}
done();
}
-
- selectAnimation(animation) {
- this.inspector.store.dispatch(updateSelectedAnimation(animation));
- }
-
- setDetailVisibility(isVisible) {
- this.inspector.store.dispatch(updateDetailVisibility(isVisible));
- }
-
- onElementPickerStarted() {
- this.inspector.store.dispatch(updateElementPickerEnabled(true));
- }
-
- onElementPickerStopped() {
- this.inspector.store.dispatch(updateElementPickerEnabled(false));
- }
-
- onSidebarSelect() {
- this.update();
- this.onSidebarResized(null, this.inspector.getSidebarSize());
- }
-
- onSidebarResized(type, size) {
- if (!this.isPanelVisible()) {
- return;
- }
-
- this.inspector.store.dispatch(updateSidebarSize(size));
- }
}
module.exports = AnimationInspector;