Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: angular/components
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7.3.1
Choose a base ref
...
head repository: angular/components
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7.3.2
Choose a head ref

Commits on Feb 11, 2019

  1. fix(slide-toggle): input element should use switch role (#15073)

    Based on the discussion in #14949
    and the feedback from a Google a11y expert on what role the underlying
    input of the `slide-toggle` should use, we now explicitly specify the
    new `switch` role.
    
    This is should improve accessibility because practically the `slide-toggle`
    is neither always causing an immediately effective value change
    (like a `button`), nor does its value only become effective on form
    submission (like a `role="checkbox`)
    
    Read more here: https://www.w3.org/TR/wai-aria-1.1/#switch
    
    Fixes #14949.
    devversion authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    3af7748 View commit details
  2. fix(checkbox): unable to click to select if text is marked (#15062)

    Fixes not being able to select a checkbox button by clicking on it, if part of the text of the label is marked. Also fixes text inside the checkbox being marked if the user clicks on it quickly.
    
    Relates to #14967.
    crisbeto authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    4819c5b View commit details
  3. fix(menu): prevent removal of mat-elevation class (#15035)

    Fixes a bug to prevent mat-elevation classes from being removed from menu panel after `MatMenu`'s `panelClass` input is updated
    swseverance authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    8069641 View commit details
  4. Copy the full SHA
    1099c79 View commit details
  5. build: publish script should not print error if tag does not exist (#…

    …15080)
    
    Currently the publish script prints an error if the release tag does not exist locally yet. This is not expected since the function
    that calls `git` to check if a given tag exists, returns a boolean and should not additionally print the git `stderr`.
    
    Note we can also look into attaching the release notes automatically, but since the release notes are making the URL too large and Github denies too large URL's, this is something we can explore in a follow-ups.
    devversion authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    155a0cb View commit details
  6. build: shard component e2e tests with bazel (#15078)

    Currently running the e2e tests with Bazel takes about ~6 minutes. This is pretty slow in comparison to how fast the tests ran with our gulp setup.
    
    In order to speed up the tests with Bazel by taking advantage of RBE's parallelism, we shard the e2e tests by creating a Bazel test target for each e2e spec file.
    devversion authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    42c4aa7 View commit details
  7. Copy the full SHA
    a537819 View commit details
  8. build: fix dev app fullscreen styles (#15061)

    Fixes not being able to debug fullscreen behavior properly in the dev app, because the fullscreen element uses a black background and isn't scrolling.
    crisbeto authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    6a310d4 View commit details
  9. build: branch manager should use "7.3.x" as patch branch (#15097)

    Updates the branch manager to validate patch PRs against the
    `7.3.x` branch. This is necessary because currently some PRs
    are marked as failing because they no longer apply to the
    outdated `7.2.x` branch.
    devversion authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    8c9919e View commit details
  10. Copy the full SHA
    241dc94 View commit details
  11. Copy the full SHA
    74cb278 View commit details
  12. Copy the full SHA
    4775043 View commit details
  13. fix(icon): add notranslate class (#14889)

    Prevents translation services (like Google Translate) from translating icon ligatures used in mat-icon.
    pavel-agarkov authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    39fa928 View commit details
  14. fix(autocomplete): set aria-haspopup (#15079)

    Based on the [autocomplete example from the a11y guidelines](https://www.w3.org/TR/wai-aria-practices-1.1/examples/combobox/aria1.0pattern/combobox-autocomplete-both.html), adds `aria-haspopup` to the autocomplete trigger input.
    crisbeto authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    45bd5d4 View commit details
  15. Don't recalculate rippleRadius when its 0 (#14875)

    * Don't recalculate rippleRadius when its 0
    
    * Update checkbox.ts
    
    * Delete _calculateRippleRadius instead.
    
    * Update golden
    
    * Update golden, again
    
    * Re-add AfterViewChecked to checkbox.ts
    
    * Update golden
    alur authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    d32f699 View commit details
  16. fix(tree): opposite direction padding not being reset on change (#14816)

    Fixes the left padding on a tree not being reset when going from LTR to RTL which causes a padding on both sides.
    crisbeto authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    ae4a5ae View commit details
  17. refactor(paginator): remove extra exposed properties (#14809)

    Makes the `_pageIndex` and `_length` properties private so they don't pollute the public API and because they already have public getters.
    crisbeto authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    c7dad7a View commit details
  18. fix(drag-drop): set class when item or list is disabled (#14769)

    Sets a class on disabled `CdkDrag` and `CdkDropList` to make it easier to style the elements while they're disabled.
    
    Fixes #14760.
    crisbeto authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    c543cf6 View commit details
  19. fix(drag-drop): standalone draggable drag class not being applied wit…

    …h OnPush change detection (#14727)
    
    Fixes the styling that is applied while an item is dragged not being applied with `OnPush` change detection.
    crisbeto authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    2f63195 View commit details
  20. docs(snack-bar): make custom component example more user-friendly (#1…

    …5116)
    
    Adds the ability to control the duration of the snack bar in the custom snack bar demo. Also bumps the default duration so people have more time to read it.
    
    Fixes #15043.
    crisbeto authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    6f04e65 View commit details
  21. Copy the full SHA
    7c832fd View commit details
  22. docs(radio): add aria labelling to examples (#15150)

    Adds the missing labels to a couple of the radio button live examples.
    
    Fixes #15026.
    crisbeto authored and jelbourn committed Feb 11, 2019
    Copy the full SHA
    57a09bb View commit details
  23. Copy the full SHA
    6b699ce View commit details
Showing with 497 additions and 122 deletions.
  1. +3 −1 .clang-format
  2. +1 −1 .github/branch-manager.yml
  3. +5 −0 .huskyrc.json
  4. +16 −0 CHANGELOG.md
  5. +22 −6 e2e/BUILD.bazel
  6. +1 −1 guides/theming-your-components.md
  7. +5 −2 package.json
  8. +39 −0 src/cdk/drag-drop/directives/drag.spec.ts
  9. +22 −8 src/cdk/drag-drop/directives/drag.ts
  10. +1 −0 src/cdk/drag-drop/directives/drop-list.ts
  11. +4 −2 src/cdk/drag-drop/drag-drop.md
  12. +1 −0 src/cdk/tree/BUILD.bazel
  13. +6 −3 src/cdk/tree/padding.ts
  14. +26 −3 src/cdk/tree/tree.spec.ts
  15. +1 −1 src/dev-app/dev-app.html
  16. +1 −0 src/dev-app/dev-app.scss
  17. +1 −0 src/lib/autocomplete/autocomplete-trigger.ts
  18. +9 −0 src/lib/autocomplete/autocomplete.spec.ts
  19. +12 −0 src/lib/checkbox/checkbox.scss
  20. +2 −23 src/lib/checkbox/checkbox.ts
  21. +15 −20 src/lib/chips/chip-list.spec.ts
  22. +22 −11 src/lib/icon/icon.spec.ts
  23. +1 −1 src/lib/icon/icon.ts
  24. +14 −4 src/lib/menu/menu-directive.ts
  25. +25 −1 src/lib/menu/menu.spec.ts
  26. +2 −2 src/lib/paginator/paginator.ts
  27. +2 −0 src/lib/slide-toggle/slide-toggle.html
  28. +4 −0 src/lib/slide-toggle/slide-toggle.spec.ts
  29. +4 −0 src/material-examples/badge-overview/badge-overview-example.html
  30. +5 −0 src/material-examples/cdk-drag-drop-disabled/cdk-drag-drop-disabled-example.css
  31. +2 −5 src/material-examples/radio-ng-model/radio-ng-model-example.css
  32. +6 −2 src/material-examples/radio-ng-model/radio-ng-model-example.html
  33. +1 −1 src/material-examples/radio-overview/radio-overview-example.html
  34. +5 −0 src/material-examples/snack-bar-component/snack-bar-component-example.html
  35. +3 −1 src/material-examples/snack-bar-component/snack-bar-component-example.ts
  36. +1 −1 src/material-examples/table-sticky-columns/table-sticky-columns-example.ts
  37. +1 −1 tools/public_api_guard/cdk/drag-drop.d.ts
  38. +0 −2 tools/public_api_guard/lib/paginator.d.ts
  39. +6 −2 tools/release/extract-release-notes.ts
  40. +16 −5 tools/release/git/git-client.ts
  41. +7 −3 tools/release/git/github-urls.ts
  42. +16 −0 tools/release/prompt/upstream-remote-prompt.ts
  43. +28 −8 tools/release/publish-release.ts
  44. +133 −1 yarn.lock
4 changes: 3 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -4,9 +4,11 @@ ColumnLimit: 100

TabWidth: 2
ContinuationIndentWidth: 4
MaxEmptyLinesToKeep : 2
MaxEmptyLinesToKeep: 2

AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
JavaScriptWrapImports: true

2 changes: 1 addition & 1 deletion .github/branch-manager.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
enabled: true

branches:
- branchName: 7.2.x
- branchName: 7.3.x
label: "target: patch"
- branchName: 7.x
label: "target: minor"
5 changes: 5 additions & 0 deletions .huskyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"pre-commit": "check-clang-format \"\\`yarn format\\`\""
}
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 7.3.2 "jute-box" (2019-02-11)


### Bug Fixes

* **autocomplete:** set aria-haspopup ([#15079](https://github.com/angular/material2/issues/15079)) ([45bd5d4](https://github.com/angular/material2/commit/45bd5d4))
* **checkbox:** unable to click to select if text is marked ([#15062](https://github.com/angular/material2/issues/15062)) ([4819c5b](https://github.com/angular/material2/commit/4819c5b)), closes [#14967](https://github.com/angular/material2/issues/14967)
* **drag-drop:** set class when item or list is disabled ([#14769](https://github.com/angular/material2/issues/14769)) ([c543cf6](https://github.com/angular/material2/commit/c543cf6)), closes [#14760](https://github.com/angular/material2/issues/14760)
* **drag-drop:** standalone draggable drag class not being applied with OnPush change detection ([#14727](https://github.com/angular/material2/issues/14727)) ([2f63195](https://github.com/angular/material2/commit/2f63195))
* **icon:** add notranslate class ([#14889](https://github.com/angular/material2/issues/14889)) ([39fa928](https://github.com/angular/material2/commit/39fa928))
* **menu:** prevent removal of mat-elevation class ([#15035](https://github.com/angular/material2/issues/15035)) ([8069641](https://github.com/angular/material2/commit/8069641))
* **slide-toggle:** input element should use switch role ([#15073](https://github.com/angular/material2/issues/15073)) ([3af7748](https://github.com/angular/material2/commit/3af7748)), closes [#14949](https://github.com/angular/material2/issues/14949)
* **tree:** opposite direction padding not being reset on change ([#14816](https://github.com/angular/material2/issues/14816)) ([ae4a5ae](https://github.com/angular/material2/commit/ae4a5ae))



## 7.3.1 "liquidcrystal-sandwich" (2019-02-04)


28 changes: 22 additions & 6 deletions e2e/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -4,27 +4,43 @@ load("@angular//:index.bzl", "protractor_web_test_suite")
load("//tools:defaults.bzl", "ts_library")

ts_library(
name = "e2e_specs_lib",
srcs = glob(["**/*.ts"]),
name = "e2e_utils_lib",
srcs = glob(["util/**/*.ts"]),
tsconfig = ":tsconfig.json",
deps = [
"@matdeps//@types/jasmine",
"@matdeps//protractor"
]
)

protractor_web_test_suite(
name = "e2e",
# For each spec file in the "components/" folder, we declare a Bazel target
# that builds the JavaScript outputs for the e2e spec file.
[ts_library(
name = "%s_specs_lib" % spec_file,
srcs = [spec_file],
tsconfig = ":tsconfig.json",
deps = [
"@matdeps//@types/jasmine",
"@matdeps//protractor",
":e2e_utils_lib",
]
) for spec_file in glob(["components/**/*.spec.ts"])]

# For each spec file in the "components/" folder, we declare a Protractor web test
# suite target that runs the given e2e spec against the e2e-app devserver.
[protractor_web_test_suite(
name = "%s_e2e" % spec_file,
configuration = ":protractor.conf.js",
on_prepare = ":start-devserver.js",
server = "//src/e2e-app:devserver",
deps = [
"@matdeps//protractor",
":e2e_specs_lib"
":%s_specs_lib" % spec_file,
":e2e_utils_lib",
],
data = [
"@angular//packages/bazel/src/protractor/utils",
"//tools/axe-protractor",
],
)
) for spec_file in glob(["components/**/*.spec.ts"])]

2 changes: 1 addition & 1 deletion guides/theming-your-components.md
Original file line number Diff line number Diff line change
@@ -94,6 +94,6 @@ For example:
outline-color: mat-color($accent, lighter);

// Get a constrast color for a hue by adding `-contrast` to any other key.
border-color: mat-color($primary, '100-constrast');
border-color: mat-color($primary, '100-contrast');
}
```
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -24,9 +24,10 @@
"stage-release": "ts-node --project tools/release/ tools/release/stage-release.ts",
"publish-release": "ts-node --project tools/release/ tools/release/publish-release.ts",
"check-release-output": "ts-node --project tools/release tools/release/check-release-output.ts",
"preinstall": "node ./tools/npm/check-npm.js"
"preinstall": "node ./tools/npm/check-npm.js",
"format": "git-clang-format"
},
"version": "7.3.1",
"version": "7.3.2",
"requiredAngularVersion": ">=7.0.0",
"dependencies": {
"@angular/animations": "^7.2.1",
@@ -79,6 +80,7 @@
"axe-webdriverjs": "^1.1.1",
"browser-sync": "^2.26.3",
"chalk": "^1.1.3",
"clang-format": "^1.2.4",
"codelyzer": "^4.5.0",
"conventional-changelog": "^3.0.5",
"dgeni": "^0.4.10",
@@ -98,6 +100,7 @@
"hammerjs": "^2.0.8",
"highlight.js": "^9.11.0",
"http-rewrite-middleware": "^0.1.6",
"husky": "^1.3.1",
"inquirer": "^6.2.0",
"jasmine-core": "^3.3.0",
"karma": "^3.1.4",
39 changes: 39 additions & 0 deletions src/cdk/drag-drop/directives/drag.spec.ts
Original file line number Diff line number Diff line change
@@ -461,6 +461,25 @@ describe('CdkDrag', () => {
expect(element.classList).not.toContain('cdk-drag-dragging');
}));

it('should add a class while an element is being dragged with OnPush change detection',
fakeAsync(() => {
const fixture = createComponent(StandaloneDraggableWithOnPush);
fixture.detectChanges();

const element = fixture.componentInstance.dragElement.nativeElement;

expect(element.classList).not.toContain('cdk-drag-dragging');

startDraggingViaMouse(fixture, element);

expect(element.classList).toContain('cdk-drag-dragging');

dispatchMouseEvent(document, 'mouseup');
fixture.detectChanges();

expect(element.classList).not.toContain('cdk-drag-dragging');
}));

it('should not add a class if item was not dragged more than the threshold', fakeAsync(() => {
const fixture = createComponent(StandaloneDraggable, [], 5);
fixture.detectChanges();
@@ -536,8 +555,12 @@ describe('CdkDrag', () => {
fixture.detectChanges();
const dragElement = fixture.componentInstance.dragElement.nativeElement;

expect(dragElement.classList).not.toContain('cdk-drag-disabled');

fixture.componentInstance.dragInstance.disabled = true;
fixture.detectChanges();

expect(dragElement.classList).toContain('cdk-drag-disabled');
expect(dragElement.style.transform).toBeFalsy();
dragElementViaMouse(fixture, dragElement, 50, 100);
expect(dragElement.style.transform).toBeFalsy();
@@ -2115,9 +2138,14 @@ describe('CdkDrag', () => {
const fixture = createComponent(DraggableInDropZone);
fixture.detectChanges();
const dragItems = fixture.componentInstance.dragItems;
const dropElement = fixture.componentInstance.dropInstance.element.nativeElement;

expect(dropElement.classList).not.toContain('cdk-drop-list-disabled');

fixture.componentInstance.dropInstance.disabled = true;
fixture.detectChanges();

expect(dropElement.classList).toContain('cdk-drop-list-disabled');
expect(dragItems.map(drag => drag.element.nativeElement.textContent!.trim()))
.toEqual(['Zero', 'One', 'Two', 'Three']);

@@ -2821,6 +2849,17 @@ class StandaloneDraggable {
boundarySelector: string;
}

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<div cdkDrag #dragElement style="width: 100px; height: 100px; background: red;"></div>
`
})
class StandaloneDraggableWithOnPush {
@ViewChild('dragElement') dragElement: ElementRef<HTMLElement>;
@ViewChild(CdkDrag) dragInstance: CdkDrag;
}

@Component({
template: `
<svg><g
30 changes: 22 additions & 8 deletions src/cdk/drag-drop/directives/drag.ts
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@ import {
ViewContainerRef,
OnChanges,
SimpleChanges,
ChangeDetectorRef,
} from '@angular/core';
import {coerceBooleanProperty} from '@angular/cdk/coercion';
import {Observable, Observer, Subject, merge} from 'rxjs';
@@ -69,6 +70,7 @@ export function CDK_DRAG_CONFIG_FACTORY(): DragRefConfig {
exportAs: 'cdkDrag',
host: {
'class': 'cdk-drag',
'[class.cdk-drag-disabled]': 'disabled',
'[class.cdk-drag-dragging]': '_dragRef.isDragging()',
},
providers: [{provide: CDK_DRAG_PARENT, useExisting: CdkDrag}]
@@ -174,11 +176,12 @@ export class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {
@Optional() private _dir: Directionality,

/**
* @deprecated `viewportRuler` and `dragDropRegistry` parameters
* @deprecated `viewportRuler`, `dragDropRegistry` and `_changeDetectorRef` parameters
* to be removed. Also `dragDrop` parameter to be made required.
* @breaking-change 8.0.0.
*/
dragDrop?: DragDrop) {
dragDrop?: DragDrop,
private _changeDetectorRef?: ChangeDetectorRef) {


// @breaking-change 8.0.0 Remove null check once the paramter is made required.
@@ -191,7 +194,7 @@ export class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {

this._dragRef.data = this;
this._syncInputs(this._dragRef);
this._proxyEvents(this._dragRef);
this._handleEvents(this._dragRef);
}

/**
@@ -312,13 +315,17 @@ export class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {
});
}

/**
* Proxies the events from a DragRef to events that
* match the interfaces of the CdkDrag outputs.
*/
private _proxyEvents(ref: DragRef<CdkDrag<T>>) {
/** Handles the events from the underlying `DragRef`. */
private _handleEvents(ref: DragRef<CdkDrag<T>>) {
ref.started.subscribe(() => {
this.started.emit({source: this});

// Since all of these events run outside of change detection,
// we need to ensure that everything is marked correctly.
if (this._changeDetectorRef) {
// @breaking-change 8.0.0 Remove null check for _changeDetectorRef
this._changeDetectorRef.markForCheck();
}
});

ref.released.subscribe(() => {
@@ -327,6 +334,13 @@ export class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {

ref.ended.subscribe(() => {
this.ended.emit({source: this});

// Since all of these events run outside of change detection,
// we need to ensure that everything is marked correctly.
if (this._changeDetectorRef) {
// @breaking-change 8.0.0 Remove null check for _changeDetectorRef
this._changeDetectorRef.markForCheck();
}
});

ref.entered.subscribe(event => {
1 change: 1 addition & 0 deletions src/cdk/drag-drop/directives/drop-list.ts
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@ export interface CdkDropListInternal extends CdkDropList {}
host: {
'class': 'cdk-drop-list',
'[id]': 'id',
'[class.cdk-drop-list-disabled]': 'disabled',
'[class.cdk-drop-list-dragging]': '_dropListRef.isDragging()',
'[class.cdk-drop-list-receiving]': '_dropListRef.isReceiving()',
}
6 changes: 4 additions & 2 deletions src/cdk/drag-drop/drag-drop.md
Original file line number Diff line number Diff line change
@@ -70,12 +70,14 @@ by the directives:

| Selector | Description |
|---------------------|--------------------------------------------------------------------------|
| `.cdk-drop-list` | Corresponds to the `cdkDropList` container. |
| `.cdk-drop-list` | Corresponds to the `cdkDropList` container. |
| `.cdk-drag` | Corresponds to a `cdkDrag` instance. |
| `.cdk-drag-disabled`| Class that is added to a disabled `cdkDrag`. |
| `.cdk-drag-preview` | This is the element that will be rendered next to the user's cursor as they're dragging an item in a sortable list. By default the element looks exactly like the element that is being dragged. |
| `.cdk-drag-placeholder` | This is element that will be shown instead of the real element as it's being dragged inside a `cdkDropList`. By default this will look exactly like the element that is being sorted. |
| `.cdk-drop-list-dragging` | A class that is added to `cdkDropList` while the user is dragging an item. |
| `.cdk-drop-list-receiving` | A class that is added to `cdkDropList` when it can receive an item that is being dragged inside a connected drop list. |
| `.cdk-drop-list-disabled` | A class that is added to `cdkDropList` when it is disabled. |
| `.cdk-drop-list-receiving`| A class that is added to `cdkDropList` when it can receive an item that is being dragged inside a connected drop list. |

### Animations
The drag-and-drop module supports animations both while sorting an element inside a list, as well as
1 change: 1 addition & 0 deletions src/cdk/tree/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ ng_test_library(
"@rxjs",
"@rxjs//operators",
"//src/cdk/collections",
"//src/cdk/bidi",
":tree",
],
)
9 changes: 6 additions & 3 deletions src/cdk/tree/padding.ts
Original file line number Diff line number Diff line change
@@ -67,8 +67,8 @@ export class CdkTreeNodePadding<T> implements OnDestroy {
private _element: ElementRef<HTMLElement>,
@Optional() private _dir: Directionality) {
this._setPadding();
if (this._dir) {
this._dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => this._setPadding());
if (_dir) {
_dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => this._setPadding());
}
}

@@ -87,9 +87,12 @@ export class CdkTreeNodePadding<T> implements OnDestroy {
}

_setPadding() {
const element = this._element.nativeElement;
const padding = this._paddingIndent();
const paddingProp = this._dir && this._dir.value === 'rtl' ? 'paddingRight' : 'paddingLeft';
const resetProp = paddingProp === 'paddingLeft' ? 'paddingRight' : 'paddingLeft';

this._renderer.setStyle(this._element.nativeElement, paddingProp, padding);
this._renderer.setStyle(element, paddingProp, padding);
this._renderer.setStyle(element, resetProp, '');
}
}
Loading