浏览代码

Hides all side panels before showing new one.

master
damencho 9 年前
父节点
当前提交
91340a5268
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10
    0
      modules/UI/side_pannels/SideContainerToggler.js

+ 10
- 0
modules/UI/side_pannels/SideContainerToggler.js 查看文件

109
      * element to show
109
      * element to show
110
      */
110
      */
111
     showInnerContainer(containerSelector) {
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
         containerSelector.removeClass("hide").addClass("show");
122
         containerSelector.removeClass("hide").addClass("show");
113
 
123
 
114
         this.eventEmitter.emit(UIEvents.SIDE_TOOLBAR_CONTAINER_TOGGLED,
124
         this.eventEmitter.emit(UIEvents.SIDE_TOOLBAR_CONTAINER_TOGGLED,

正在加载...
取消
保存