Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 7b8f625

Browse files
committed
perf: remove duplicate function calls
1 parent 4fb0979 commit 7b8f625

File tree

5 files changed

+2
-12
lines changed

5 files changed

+2
-12
lines changed

src/lib/flex/flex-align/flex-align.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ export class FlexAlignDirective extends BaseDirective implements OnInit, OnChang
8181
this._listenForMediaQueryChanges('align', 'stretch', (changes: MediaChange) => {
8282
this._updateWithValue(changes.value);
8383
});
84-
this._updateWithValue();
8584
}
8685

8786
// *********************************************

src/lib/flex/flex-order/flex-order.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ export class FlexOrderDirective extends BaseDirective implements OnInit, OnChang
7878
this._listenForMediaQueryChanges('order', '0', (changes: MediaChange) => {
7979
this._updateWithValue(changes.value);
8080
});
81-
this._updateWithValue();
8281
}
8382

8483
// *********************************************

src/lib/flex/flex/flex.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ export class FlexDirective extends BaseDirective implements OnInit, OnChanges, O
116116
this._listenForMediaQueryChanges('flex', '', (changes: MediaChange) => {
117117
this._updateStyle(changes.value);
118118
});
119-
this._updateStyle();
120119

121120
if (this._container) {
122121
// If this flex item is inside of a flex container marked with

src/lib/flex/layout-align/layout-align.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ export class LayoutAlignDirective extends BaseDirective implements OnInit, OnCha
9494
this._listenForMediaQueryChanges('align', 'start stretch', (changes: MediaChange) => {
9595
this._updateWithValue(changes.value);
9696
});
97-
this._updateWithValue();
9897
}
9998

10099
ngOnDestroy() {

src/lib/flex/layout/layout.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,8 @@ export class LayoutDirective extends BaseDirective implements OnInit, OnChanges,
6868
@Input('fxLayout.lt-md') set layoutLtMd(val) { this._cacheInput('layoutLtMd', val); };
6969
@Input('fxLayout.lt-lg') set layoutLtLg(val) { this._cacheInput('layoutLtLg', val); };
7070
@Input('fxLayout.lt-xl') set layoutLtXl(val) { this._cacheInput('layoutLtXl', val); };
71-
7271
/* tslint:enable */
73-
/**
74-
*
75-
*/
72+
7673
constructor(monitor: MediaMonitor,
7774
elRef: ElementRef,
7875
styleUtils: StyleUtils) {
@@ -106,16 +103,13 @@ export class LayoutDirective extends BaseDirective implements OnInit, OnChanges,
106103
this._listenForMediaQueryChanges('layout', 'row', (changes: MediaChange) => {
107104
this._updateWithDirection(changes.value);
108105
});
109-
this._updateWithDirection();
110106
}
111107

112108
// *********************************************
113109
// Protected methods
114110
// *********************************************
115111

116-
/**
117-
* Validate the direction value and then update the host's inline flexbox styles
118-
*/
112+
/** Validate the direction value and then update the host's inline flexbox styles */
119113
protected _updateWithDirection(value?: string) {
120114
value = value || this._queryInput('layout') || 'row';
121115
if (this._mqActivation) {

0 commit comments

Comments
 (0)