|
@@ -38,13 +38,18 @@ function toggle (object, selector, onOpenComplete,
|
38
|
38
|
queue: false,
|
39
|
39
|
duration: 500
|
40
|
40
|
});
|
|
41
|
+
|
41
|
42
|
$(selector).hide("slide", {
|
42
|
43
|
direction: "right",
|
43
|
44
|
queue: false,
|
44
|
|
- duration: 500
|
|
45
|
+ duration: 500,
|
|
46
|
+ // Set the size to 0 at the end of the animation to ensure that
|
|
47
|
+ // the is(":visible") function on this selector will return {false}
|
|
48
|
+ // when the element is hidden.
|
|
49
|
+ complete: function() {$(selector).css("width", "0");}
|
45
|
50
|
});
|
46
|
51
|
|
47
|
|
- resizeVideoArea(isSideBarVisible, onVideoResizeComplete);
|
|
52
|
+ resizeVideoArea(false, onVideoResizeComplete);
|
48
|
53
|
|
49
|
54
|
if(typeof onClose === "function") {
|
50
|
55
|
onClose();
|
|
@@ -52,7 +57,7 @@ function toggle (object, selector, onOpenComplete,
|
52
|
57
|
|
53
|
58
|
currentlyOpen = null;
|
54
|
59
|
} else {
|
55
|
|
- resizeVideoArea(isSideBarVisible, onVideoResizeComplete);
|
|
60
|
+ resizeVideoArea(true, onVideoResizeComplete);
|
56
|
61
|
|
57
|
62
|
// Undock the toolbar when the chat is shown and if we're in a
|
58
|
63
|
// video mode.
|
|
@@ -76,6 +81,12 @@ function toggle (object, selector, onOpenComplete,
|
76
|
81
|
queue: false,
|
77
|
82
|
duration: 500
|
78
|
83
|
});
|
|
84
|
+ // Set the size dynamically (not in the css), so that we're sure that
|
|
85
|
+ // when is(":visible") is called on this selector the result is {false}
|
|
86
|
+ // before it's actually visible.
|
|
87
|
+ // (Chrome seems to return {true} for an element which is in the DOM and
|
|
88
|
+ // has non-null size set).
|
|
89
|
+ $(selector).css("width", "20%");
|
79
|
90
|
$(selector).show("slide", {
|
80
|
91
|
direction: "right",
|
81
|
92
|
queue: false,
|
|
@@ -91,9 +102,9 @@ function toggle (object, selector, onOpenComplete,
|
91
|
102
|
}
|
92
|
103
|
|
93
|
104
|
function resizeVideoArea(isSidePanelVisible, completeFunction) {
|
94
|
|
- VideoLayout.resizeVideoArea(!isSidePanelVisible,
|
95
|
|
- false,
|
96
|
|
- false,
|
|
105
|
+ VideoLayout.resizeVideoArea(isSidePanelVisible,
|
|
106
|
+ false,//don't force thumbnail count update
|
|
107
|
+ true, //animate
|
97
|
108
|
completeFunction);
|
98
|
109
|
}
|
99
|
110
|
|