Skip to content

refactor(tooltip): remove 6.0.0 deletion targets #10344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions src/lib/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,11 @@ export class MatTooltip implements OnDestroy {
}
}

/**
* @deprecated
* @deletion-target 6.0.0
*/
@Input('tooltip-position')
get _positionDeprecated(): TooltipPosition { return this._position; }
set _positionDeprecated(value: TooltipPosition) { this._position = value; }

/** The default delay in ms before showing the tooltip after show is called */
@Input('matTooltipShowDelay') showDelay =
this._defaultOptions ? this._defaultOptions.showDelay : 0;
@Input('matTooltipShowDelay') showDelay = this._defaultOptions.showDelay;

/** The default delay in ms before hiding the tooltip after hide is called */
@Input('matTooltipHideDelay') hideDelay =
this._defaultOptions ? this._defaultOptions.hideDelay : 0;
@Input('matTooltipHideDelay') hideDelay = this._defaultOptions.hideDelay;

private _message = '';

Expand Down Expand Up @@ -204,10 +194,7 @@ export class MatTooltip implements OnDestroy {
@Inject(MAT_TOOLTIP_SCROLL_STRATEGY) private _scrollStrategy,
@Optional() private _dir: Directionality,
@Optional() @Inject(MAT_TOOLTIP_DEFAULT_OPTIONS)
private _defaultOptions?: MatTooltipDefaultOptions) {

// TODO(crisbeto): make the `_defaultOptions` a required param next time we do breaking changes.
// @deletion-target 6.0.0
private _defaultOptions: MatTooltipDefaultOptions) {

const element: HTMLElement = _elementRef.nativeElement;

Expand Down Expand Up @@ -306,7 +293,7 @@ export class MatTooltip implements OnDestroy {

/** Handles the touchend events on the host element. */
_handleTouchend() {
this.hide(this._defaultOptions ? this._defaultOptions.touchendHideDelay : 1500);
this.hide(this._defaultOptions.touchendHideDelay);
}

/** Create the overlay config and position strategy */
Expand Down