mirror of https://github.com/ColorlibHQ/AdminLTE
				
				
				
			Dropdown.js: rename variable (#2780)
						commit
						85d4b6be05
					
				|  | @ -56,28 +56,28 @@ class Dropdown { | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   fixPosition() { |   fixPosition() { | ||||||
|     const elm = $(Selector.DROPDOWN_MENU_ACTIVE) |     const $element = $(Selector.DROPDOWN_MENU_ACTIVE) | ||||||
| 
 | 
 | ||||||
|     if (elm.length !== 0) { |     if ($element.length !== 0) { | ||||||
|       if (elm.hasClass(ClassName.DROPDOWN_RIGHT)) { |       if ($element.hasClass(ClassName.DROPDOWN_RIGHT)) { | ||||||
|         elm.css('left', 'inherit') |         $element.css('left', 'inherit') | ||||||
|         elm.css('right', 0) |         $element.css('right', 0) | ||||||
|       } else { |       } else { | ||||||
|         elm.css('left', 0) |         $element.css('left', 0) | ||||||
|         elm.css('right', 'inherit') |         $element.css('right', 'inherit') | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       const offset = elm.offset() |       const offset = $element.offset() | ||||||
|       const width = elm.width() |       const width = $element.width() | ||||||
|       const windowWidth = $(window).width() |       const windowWidth = $(window).width() | ||||||
|       const visiblePart = windowWidth - offset.left |       const visiblePart = windowWidth - offset.left | ||||||
| 
 | 
 | ||||||
|       if (offset.left < 0) { |       if (offset.left < 0) { | ||||||
|         elm.css('left', 'inherit') |         $element.css('left', 'inherit') | ||||||
|         elm.css('right', (offset.left - 5)) |         $element.css('right', (offset.left - 5)) | ||||||
|       } else if (visiblePart < width) { |       } else if (visiblePart < width) { | ||||||
|         elm.css('left', 'inherit') |         $element.css('left', 'inherit') | ||||||
|         elm.css('right', 0) |         $element.css('right', 0) | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 REJack
						REJack