File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -333,19 +333,24 @@ define([
333
333
}
334
334
} ,
335
335
"mouseenter .ui-menu-item" : function ( event ) {
336
- var target = $ ( event . currentTarget ) ;
337
-
338
- if ( target . has ( 'ul' ) ) {
339
- var ulElement = target . find ( 'ul' ) ,
340
- ulElementWidth = target . find ( 'ul' ) . outerWidth ( true ) ,
341
- width = target . outerWidth ( ) * 2 ,
342
- targetPageX = target . offset ( ) . left ,
343
- rightBound = screen . width ;
344
-
345
- if ( ( ulElementWidth + width + targetPageX ) > rightBound ) {
336
+ var target = $ ( event . currentTarget ) ,
337
+ ulElement ,
338
+ ulElementWidth ,
339
+ width ,
340
+ targetPageX ,
341
+ rightBound ;
342
+
343
+ if ( target . has ( 'ul' ) ) {
344
+ ulElement = target . find ( 'ul' ) ;
345
+ ulElementWidth = target . find ( 'ul' ) . outerWidth ( true ) ;
346
+ width = target . outerWidth ( ) * 2 ;
347
+ targetPageX = target . offset ( ) . left ;
348
+ rightBound = screen . width ;
349
+
350
+ if ( ( ulElementWidth + width + targetPageX ) > rightBound ) {
346
351
ulElement . addClass ( 'submenu-reverse' ) ;
347
352
}
348
- if ( targetPageX - ulElementWidth < 0 ) {
353
+ if ( ( targetPageX - ulElementWidth ) < 0 ) {
349
354
ulElement . removeClass ( 'submenu-reverse' ) ;
350
355
}
351
356
}
You can’t perform that action at this time.
0 commit comments