This repository was archived by the owner on Jun 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
src/assets/lib/multiple-select Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 11/**
22 * @author zhixin wen <[email protected] > 3- * @version 1.3.9
3+ * @version 1.3.10
44 *
55 * http://wenzhixin.net.cn/p/multiple-select/
66 *
631631 var msDropHeight = this . $drop . outerHeight ( ) || 0 ;
632632 var msDropWidth = this . $drop . outerWidth ( ) || 0 ;
633633 var selectOffsetTop = this . $parent . offset ( ) . top ;
634+ var selectOffsetLeft = this . $parent . offset ( ) . left ;
634635 var selectParentWidth = this . $parent . width ( ) ;
635636 var spaceBottom = this . availableSpaceBottom ( ) ;
636- var spaceLeft = this . availableSpaceLeft ( ) ;
637637 var spaceTop = this . availableSpaceTop ( ) ;
638638 var windowWidth = $ ( window ) . width ( ) ;
639639
662662 }
663663
664664 // auto-adjust left/right position
665- if ( ( windowWidth - msDropWidth ) < spaceLeft ) {
666- var newLeftOffset = spaceLeft - ( msDropWidth - selectParentWidth ) ;
665+ if ( ( windowWidth - msDropWidth ) < selectOffsetLeft ) {
666+ var newLeftOffset = selectOffsetLeft - ( msDropWidth - selectParentWidth ) ;
667667 this . $drop . offset ( { left : newLeftOffset } ) ;
668668 }
669669
725725 return windowHeight - ( msDropOffsetTop - pageScroll ) ;
726726 } ,
727727
728- availableSpaceLeft : function ( ) {
729- var pageScrollLeft = $ ( window ) . scrollLeft ( ) || 0 ;
730- var msDropOffsetLeft = this . $parent . offset ( ) . left ;
731- return msDropOffsetLeft - pageScrollLeft ;
732- } ,
733-
734728 availableSpaceTop : function ( ) {
735729 var pageScroll = $ ( window ) . scrollTop ( ) || 0 ;
736730 var msDropOffsetTop = this . $parent . offset ( ) . top ;
You can’t perform that action at this time.
0 commit comments