@@ -119,11 +119,11 @@ export const SELECT_ITEM_HEIGHT_EM = 3;
119
119
* multi-selection mode.
120
120
*
121
121
* Calculated as:
122
- * (SELECT_PANEL_PADDING_X * 1.5) + 20 = 44
122
+ * (SELECT_PANEL_PADDING_X * 1.5) + 16 = 40
123
123
* The padding is multiplied by 1.5 because the checkbox's margin is half the padding.
124
124
* The checkbox width is 16px.
125
125
*/
126
- export let SELECT_MULTIPLE_PANEL_PADDING_X = 0 ;
126
+ export const SELECT_MULTIPLE_PANEL_PADDING_X = SELECT_PANEL_PADDING_X * 1.5 + 16 ;
127
127
128
128
/**
129
129
* The select panel will only "fit" inside the viewport if it is positioned at
@@ -805,7 +805,6 @@ export class MatSelect extends _MatSelectMixinBase implements AfterContentInit,
805
805
*/
806
806
_onAttached ( ) : void {
807
807
this . overlayDir . positionChange . pipe ( take ( 1 ) ) . subscribe ( ( ) => {
808
- this . _setPseudoCheckboxPaddingSize ( ) ;
809
808
this . _changeDetectorRef . detectChanges ( ) ;
810
809
this . _calculateOverlayOffsetX ( ) ;
811
810
this . panel . nativeElement . scrollTop = this . _scrollTop ;
@@ -817,17 +816,6 @@ export class MatSelect extends _MatSelectMixinBase implements AfterContentInit,
817
816
return this . _parentFormField ? `mat-${ this . _parentFormField . color } ` : '' ;
818
817
}
819
818
820
- // TODO(josephperrott): Remove after 2018 spec updates are fully merged.
821
- /** Sets the pseudo checkbox padding size based on the width of the pseudo checkbox. */
822
- private _setPseudoCheckboxPaddingSize ( ) {
823
- if ( ! SELECT_MULTIPLE_PANEL_PADDING_X && this . multiple ) {
824
- const pseudoCheckbox = this . panel . nativeElement . querySelector ( '.mat-pseudo-checkbox' ) ;
825
- if ( pseudoCheckbox ) {
826
- SELECT_MULTIPLE_PANEL_PADDING_X = SELECT_PANEL_PADDING_X * 1.5 + pseudoCheckbox . offsetWidth ;
827
- }
828
- }
829
- }
830
-
831
819
/** Whether the select has a value. */
832
820
get empty ( ) : boolean {
833
821
return ! this . _selectionModel || this . _selectionModel . isEmpty ( ) ;
0 commit comments