E
E
Egor2015-02-05 12:19:19
css
Egor, 2015-02-05 12:19:19

Angularjs. Why is the tooltip width constantly changing by 1 pixel?

Greetings.
There is a directive that displays the html tooltip above the form inputs. At the moment, each tooltip contains only a line of text.
There is a $watch that keeps track of tooltip resizing. Periodically $watch gives "Infinite $digest Loop".
I messed up the values ​​and it turned out that the sizes of the tooltips are constantly jumping within 1 pixel (for example, 79-80,80-79).
Why is this happening and how can it be overcome?
PS I tried to make $watch a condition not on the width of the tooltip, but on the difference between the old and new widths. This gives too much delay when updating, so this option is not suitable.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Dedukhin, 2015-02-05
@Demetros

How do you calculate the width?
Perhaps you have some kind of animation on the appearance of the tooltip?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question