@@ -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
popupTimeout = $timeout ( show , scope . tt_popupDelay , false ) ;
151
154
popupTimeout . then ( function ( reposition ) { reposition ( ) ; } ) ;
@@ -163,6 +166,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
163
166
// Show the tooltip popup element.
164
167
function show ( ) {
165
168
169
+ prepareTooltip ( ) ;
166
170
167
171
// Don't show empty tooltips.
168
172
if ( ! scope . tt_content ) {
@@ -235,6 +239,11 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
235
239
}
236
240
}
237
241
242
+ function prepareTooltip ( ) {
243
+ prepPlacement ( ) ;
244
+ prepPopupDelay ( ) ;
245
+ }
246
+
238
247
/**
239
248
* Observe the relevant attributes.
240
249
*/
@@ -250,14 +259,16 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
250
259
scope . tt_title = val ;
251
260
} ) ;
252
261
253
- attrs . $observe ( prefix + 'Placement' , function ( val ) {
262
+ function prepPlacement ( ) {
263
+ var val = attrs [ prefix + 'Placement' ] ;
254
264
scope . tt_placement = angular . isDefined ( val ) ? val : options . placement ;
255
- } ) ;
265
+ }
256
266
257
- attrs . $observe ( prefix + 'PopupDelay' , function ( val ) {
267
+ function prepPopupDelay ( ) {
268
+ var val = attrs [ prefix + 'PopupDelay' ] ;
258
269
var delay = parseInt ( val , 10 ) ;
259
270
scope . tt_popupDelay = ! isNaN ( delay ) ? delay : options . popupDelay ;
260
- } ) ;
271
+ }
261
272
262
273
var unregisterTriggers = function ( ) {
263
274
element . unbind ( triggers . show , showTooltipBind ) ;
0 commit comments