material icon indicating copy to clipboard operation
material copied to clipboard

mdFabSpeedDial combined with mdTooltip conjunctions

Open noamamit92 opened this issue 11 years ago • 6 comments

Hi,

I am trying to achieve a speed Dial implementation with tooltips

My requirements:

  1. Each action (including trigger) will have a tooltip
  2. Initial presentation is : speedDIal closed with the trigger tooltip displayed
  3. When speed dial opens - all spedddial actions have a tooltip
  4. all tooltips must stay visible (no autohide) as long as the action itself is visible

In other words I want the tooltips to always show (not just on hover) but only when the actual action is visible

The problems are:

  1. Once I define the tooltips as md-visible - they are visible even if the action is not
  2. After I close and open the speeddial the tooltips are all hidden
  3. md-autohide = false does not seem to work well inside the speed dial

I have a codepen for this:

http://codepen.io/noamamit92/pen/RPZLLa

noamamit92 avatar Jun 16 '15 06:06 noamamit92

+1

david-gang avatar Jun 16 '15 07:06 david-gang

Hi all, there appear to be a number of issues with using the tooltip inside of the speed dial. I will take a look and see if I can correct them.

@noamamit92 I am having trouble using the codepen you provided. It appears that none of the tooltip radio buttons affect the demo. Am I doing something wrong?

topherfangio avatar Jun 23 '15 18:06 topherfangio

@noamamit92 I was attempting to create an example to demonstrate your requirements. I got something mostly working, but I ran into a small issue.

If you use the md-visible attribute of the tooltips, you can bind this to the is-open attribute of the speed dial. This makes the tooltips visible whenever the component is open.

Small problem: the tooltips appear immediately when the speed dial begins opening, so they have an incorrect position even if you use the md-delay attribute. I think this is the correct behavior though, because if your code programmatically specifies that it should be displayed, I do not think it should wait on the delay.

Unfortunately, what this means is that you may need to setup a watcher on a variable bound to the is-open property, and use $timeout to set another variable a second or so later to make the tooltips visible.

Here is a codepen to demonstrate: http://codepen.io/topherfangio/pen/xGPLRg

topherfangio avatar Jun 24 '15 04:06 topherfangio

Thanks @topherfangio , not sure what went wrong in my codepen...

Tried your solution and it works great,

Do you happen to know how to prevent the toolTips from flickering when you move from one button to another, and make them stay visible whenever the button is visible?

noamamit92 avatar Jun 24 '15 05:06 noamamit92

Yup, I fixed that in a5807e0 by adding some better mouse event handling. Should be pushed soon, I just have to speak with the team this morning about some code questions :-)

topherfangio avatar Jun 24 '15 14:06 topherfangio

Thanks, great job

noamamit92 avatar Jun 24 '15 17:06 noamamit92