File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 6464 } ;
6565 domUtilityService . getRealWidth = function ( obj ) {
6666 var width = 0 ;
67+ var name , old = { } ;
6768 var props = { visibility : "hidden" , display : "block" } ;
6869 var hiddenParents = obj . parents ( ) . andSelf ( ) . not ( ':visible' ) ;
69- $ . swap ( hiddenParents [ 0 ] , props , function ( ) {
70- width = obj . outerWidth ( ) ;
71- } ) ;
70+ var elem = hiddenParents [ 0 ] ;
71+
72+ // Remember the old values, and insert the new ones
73+ for ( name in props ) {
74+ old [ name ] = elem . style [ name ] ;
75+ elem . style [ name ] = props [ name ] ;
76+ }
77+
78+ width = obj . outerWidth ( ) ;
79+
80+ // Revert the old values
81+ for ( name in props ) {
82+ elem . style [ name ] = old [ name ] ;
83+ }
84+
7285 return width ;
7386 } ;
7487 domUtilityService . UpdateGridLayout = function ( $scope , grid ) {
You can’t perform that action at this time.
0 commit comments