@@ -146,6 +146,9 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
146
146
if ( hasEnableExp && ! scope . $eval ( attrs [ prefix + 'Enable' ] ) ) {
147
147
return ;
148
148
}
149
+
150
+ prepareTooltip ( ) ;
151
+
149
152
if ( scope . tt_popupDelay ) {
150
153
// Do nothing if the tooltip was already scheduled to pop-up.
151
154
// This happens if show is triggered multiple times before any hide is triggered.
@@ -242,6 +245,11 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
242
245
}
243
246
}
244
247
248
+ function prepareTooltip ( ) {
249
+ prepPlacement ( ) ;
250
+ prepPopupDelay ( ) ;
251
+ }
252
+
245
253
/**
246
254
* Observe the relevant attributes.
247
255
*/
@@ -257,14 +265,16 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
257
265
scope . tt_title = val ;
258
266
} ) ;
259
267
260
- attrs . $observe ( prefix + 'Placement' , function ( val ) {
268
+ function prepPlacement ( ) {
269
+ var val = attrs [ prefix + 'Placement' ] ;
261
270
scope . tt_placement = angular . isDefined ( val ) ? val : options . placement ;
262
- } ) ;
271
+ }
263
272
264
- attrs . $observe ( prefix + 'PopupDelay' , function ( val ) {
273
+ function prepPopupDelay ( ) {
274
+ var val = attrs [ prefix + 'PopupDelay' ] ;
265
275
var delay = parseInt ( val , 10 ) ;
266
276
scope . tt_popupDelay = ! isNaN ( delay ) ? delay : options . popupDelay ;
267
- } ) ;
277
+ }
268
278
269
279
var unregisterTriggers = function ( ) {
270
280
element . unbind ( triggers . show , showTooltipBind ) ;
0 commit comments