File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ define(['jquery'], function($) {
4141 function setPosition ( pos ) {
4242 var toLeft = bg . settings . get ( 'thickFrameBorders' ) ? 5 : 1 ;
4343 if ( this . layout == 'vertical' ) {
44+ this . resizer . style . width = this . $el . width ( ) + 'px' ;
4445 this . resizer . style . left = this . el . offsetLeft + 'px' ;
4546 this . resizer . style . top = pos - Math . round ( resizeWidth / 2 ) - toLeft + 'px' ;
4647 } else {
@@ -94,7 +95,8 @@ define(['jquery'], function($) {
9495 }
9596
9697 if ( layout == 'vertical' ) {
97- this . resizer . style . width = '100%' ;
98+ //this.resizer.style.width = '100%';
99+ this . resizer . style . width = this . $el . width ( ) + 'px' ;
98100 this . resizer . style . cursor = 'n-resize' ;
99101 this . resizer . style . height = resizeWidth + 'px' ;
100102 } else {
@@ -118,6 +120,9 @@ define(['jquery'], function($) {
118120 document . addEventListener ( 'mouseup' , function ( e ) {
119121 handleMouseUp . call ( that , e ) ;
120122 } ) ;
123+ window . addEventListener ( 'resize' , function ( e ) {
124+ resetPositions . call ( that , e ) ;
125+ } ) ;
121126
122127 document . body . appendChild ( this . resizer ) ;
123128 } ,
You can’t perform that action at this time.
0 commit comments