Procházet zdrojové kódy

Hides all side panels before showing new one.

master
damencho před 8 roky
rodič
revize
91340a5268
1 změnil soubory, kde provedl 10 přidání a 0 odebrání
  1. 10
    0
      modules/UI/side_pannels/SideContainerToggler.js

+ 10
- 0
modules/UI/side_pannels/SideContainerToggler.js Zobrazit soubor

@@ -109,6 +109,16 @@ const SideContainerToggler = {
109 109
      * element to show
110 110
      */
111 111
     showInnerContainer(containerSelector) {
112
+
113
+        // Before showing the container, make sure there is no other visible.
114
+        // If we quickly show a container, while another one is animating
115
+        // and animation never ends, so we do not really hide the first one and
116
+        // we end up with to shown panels
117
+        $("#sideToolbarContainer").children().each(function() {
118
+            if ($(this).hasClass("show"))
119
+                SideContainerToggler.hideInnerContainer($(this));
120
+        });
121
+
112 122
         containerSelector.removeClass("hide").addClass("show");
113 123
 
114 124
         this.eventEmitter.emit(UIEvents.SIDE_TOOLBAR_CONTAINER_TOGGLED,

Načítá se…
Zrušit
Uložit