From 5dccd24ea96c0bff249394cb432db464e4745cb5 Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Wed, 7 Dec 2016 13:14:11 -0800 Subject: [PATCH 1/5] feat(tooltip): add input for delaying show and hide --- src/demo-app/tooltip/tooltip-demo.html | 16 +++++++- src/demo-app/tooltip/tooltip-demo.ts | 2 + src/lib/tooltip/tooltip.spec.ts | 46 ++++++++++++++++++++-- src/lib/tooltip/tooltip.ts | 54 +++++++++++++++++--------- 4 files changed, 94 insertions(+), 24 deletions(-) diff --git a/src/demo-app/tooltip/tooltip-demo.html b/src/demo-app/tooltip/tooltip-demo.html index 6da3a8b8efc6..da2965962171 100644 --- a/src/demo-app/tooltip/tooltip-demo.html +++ b/src/demo-app/tooltip/tooltip-demo.html @@ -6,7 +6,9 @@

Tooltip Demo

md-raised-button color="primary" [md-tooltip]="message" - [tooltip-position]="position"> + [tooltip-position]="position" + [tooltip-show-delay]="showDelay" + [tooltip-hide-delay]="hideDelay"> Mouse over to see the tooltip

@@ -27,11 +29,21 @@

Tooltip Demo

+

+ Show Delay (ms): + +

+ +

+ Hide Delay (ms): + +

+ Mouse over to -

diff --git a/src/lib/tooltip/tooltip.ts b/src/lib/tooltip/tooltip.ts index 342ac3b7f41f..c14536da593d 100644 --- a/src/lib/tooltip/tooltip.ts +++ b/src/lib/tooltip/tooltip.ts @@ -75,10 +75,10 @@ export class MdTooltip { } /** The default delay in ms before showing the tooltip after show is called */ - @Input('tooltip-show-delay') showDelay = 0; + @Input('tooltipShowDelay') showDelay = 0; /** The default delay in ms before hiding the tooltip after hide is called */ - @Input('tooltip-hide-delay') hideDelay = 0; + @Input('tooltipHideDelay') hideDelay = 0; /** The message to be displayed in the tooltip */ private _message: string;