|
@@ -16,17 +16,27 @@ const SideContainerToggler = {
|
16
|
16
|
init(eventEmitter) {
|
17
|
17
|
this.eventEmitter = eventEmitter;
|
18
|
18
|
|
19
|
|
- // Adds a listener for the animation end event that would take care
|
20
|
|
- // of hiding all internal containers when the extendedToolbarPanel is
|
|
19
|
+ // We may not have a side toolbar container, for example, in
|
|
20
|
+ // filmstrip-only mode.
|
|
21
|
+ const sideToolbarContainer
|
|
22
|
+ = document.getElementById("sideToolbarContainer");
|
|
23
|
+
|
|
24
|
+ if (!sideToolbarContainer)
|
|
25
|
+ return;
|
|
26
|
+
|
|
27
|
+ // Adds a listener for the animationend event that would take care of
|
|
28
|
+ // hiding all internal containers when the extendedToolbarPanel is
|
21
|
29
|
// closed.
|
22
|
|
- document.getElementById("sideToolbarContainer")
|
23
|
|
- .addEventListener("animationend", function(e) {
|
24
|
|
- if(e.animationName === "slideOutExt")
|
|
30
|
+ sideToolbarContainer.addEventListener(
|
|
31
|
+ "animationend",
|
|
32
|
+ function(e) {
|
|
33
|
+ if (e.animationName === "slideOutExt")
|
25
|
34
|
$("#sideToolbarContainer").children().each(function() {
|
26
|
35
|
if ($(this).hasClass("show"))
|
27
|
36
|
SideContainerToggler.hideInnerContainer($(this));
|
28
|
37
|
});
|
29
|
|
- }, false);
|
|
38
|
+ },
|
|
39
|
+ false);
|
30
|
40
|
},
|
31
|
41
|
|
32
|
42
|
/**
|
|
@@ -134,4 +144,4 @@ const SideContainerToggler = {
|
134
|
144
|
}
|
135
|
145
|
};
|
136
|
146
|
|
137
|
|
-export default SideContainerToggler;
|
|
147
|
+export default SideContainerToggler;
|