File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ class Terminal extends React.Component {
9898 this . handleCloseClick = this . handleCloseClick . bind ( this ) ;
9999 this . handlePopoutTerminal = this . handlePopoutTerminal . bind ( this ) ;
100100 this . handleResize = this . handleResize . bind ( this ) ;
101+ this . handleResizeDebounced = _ . debounce ( this . handleResize , 500 ) ;
101102 }
102103
103104 createWebsocket ( term ) {
@@ -204,7 +205,7 @@ class Terminal extends React.Component {
204205
205206 const { characterWidth, characterHeight} = terminalCellSize ( this . term . element ) ;
206207
207- window . addEventListener ( 'resize' , _ . debounce ( this . handleResize , 500 ) ) ;
208+ window . addEventListener ( 'resize' , this . handleResizeDebounced ) ;
208209
209210 this . resizeTimeout = setTimeout ( ( ) => {
210211 this . setState ( {
@@ -223,7 +224,7 @@ class Terminal extends React.Component {
223224 clearTimeout ( this . reconnectTimeout ) ;
224225 clearTimeout ( this . resizeTimeout ) ;
225226
226- window . removeEventListener ( 'resize' , this . handleResize ) ;
227+ window . removeEventListener ( 'resize' , this . handleResizeDebounced ) ;
227228
228229 if ( this . term ) {
229230 log ( 'destroy terminal' ) ;
Original file line number Diff line number Diff line change @@ -990,14 +990,17 @@ h2 {
990990 position : relative ;
991991 // shadow of animation-wrapper is 10px, let it fit in here without being
992992 // overflow hiddened.
993- padding : 10px 0 10px 10px ;
994993 flex : 1 ;
995994 overflow-x : hidden ;
996995 }
997996
998997 &-animation-wrapper {
999- width : 100% ;
1000- height : 100% ;
998+ position : absolute ;
999+ // some room for the drop shadow.
1000+ top : 10px ;
1001+ left : 10px ;
1002+ bottom : 10px ;
1003+ right : 0 ;
10011004 transition : transform 0.5s cubic-bezier (0.230 , 1.000 , 0.320 , 1.000 );
10021005 .shadow-2 ;
10031006 }
@@ -1063,7 +1066,7 @@ h2 {
10631066 bottom : 0 ;
10641067 left : 0 ;
10651068 right : 0 ;
1066- background-color : rgba ( 0 , 0 , 0 , 0.93 ) ;
1069+ background-color : black ;
10671070 padding : 8px ;
10681071 border-radius : 0 0 0 4px ;
10691072
You can’t perform that action at this time.
0 commit comments