Browse Source

Merge pull request #591 from jitsi/fix-black-stripe

Fix black stripe and side panel animations
j8
damencho 9 years ago
parent
commit
a112b10a36
2 changed files with 18 additions and 7 deletions
  1. 1
    1
      css/main.css
  2. 17
    6
      modules/UI/side_pannels/SidePanelToggler.js

+ 1
- 1
css/main.css View File

20
     top: 0px;
20
     top: 0px;
21
     bottom: 0px;
21
     bottom: 0px;
22
     right: 0px;
22
     right: 0px;
23
-    width: 20%;
23
+    width: 0px;
24
     max-width: 200px;
24
     max-width: 200px;
25
     overflow: hidden;
25
     overflow: hidden;
26
     /* background-color:#dfebf1;*/
26
     /* background-color:#dfebf1;*/

+ 17
- 6
modules/UI/side_pannels/SidePanelToggler.js View File

38
             queue: false,
38
             queue: false,
39
             duration: 500
39
             duration: 500
40
         });
40
         });
41
+
41
         $(selector).hide("slide", {
42
         $(selector).hide("slide", {
42
             direction: "right",
43
             direction: "right",
43
             queue: false,
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
         if(typeof onClose === "function") {
54
         if(typeof onClose === "function") {
50
             onClose();
55
             onClose();
52
 
57
 
53
         currentlyOpen = null;
58
         currentlyOpen = null;
54
     } else {
59
     } else {
55
-        resizeVideoArea(isSideBarVisible, onVideoResizeComplete);
60
+        resizeVideoArea(true, onVideoResizeComplete);
56
 
61
 
57
         // Undock the toolbar when the chat is shown and if we're in a
62
         // Undock the toolbar when the chat is shown and if we're in a
58
         // video mode.
63
         // video mode.
76
             queue: false,
81
             queue: false,
77
             duration: 500
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
         $(selector).show("slide", {
90
         $(selector).show("slide", {
80
             direction: "right",
91
             direction: "right",
81
             queue: false,
92
             queue: false,
91
 }
102
 }
92
 
103
 
93
 function resizeVideoArea(isSidePanelVisible, completeFunction) {
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
         completeFunction);
108
         completeFunction);
98
 }
109
 }
99
 
110
 

Loading…
Cancel
Save