File tree 1 file changed +20
-9
lines changed
1 file changed +20
-9
lines changed Original file line number Diff line number Diff line change 67
67
68
68
body . append ( theTooltip ) ;
69
69
70
+ $scope . isTooltipEmpty = function checkEmptyTooltip ( ) {
71
+
72
+ if ( ! title && ! content ) {
73
+
74
+ return true ;
75
+ }
76
+ } ;
77
+
70
78
$scope . initTooltip = function initTooltip ( tooltipSide ) {
71
79
72
- height = thisElement [ 0 ] . offsetHeight ;
73
- width = thisElement [ 0 ] . offsetWidth ;
74
- offsetTop = $scope . getRootOffsetTop ( thisElement [ 0 ] , 0 ) ;
75
- offsetLeft = $scope . getRootOffsetLeft ( thisElement [ 0 ] , 0 ) ;
76
- //get tooltip dimension
77
- theTooltipHeight = theTooltip [ 0 ] . offsetHeight ;
78
- theTooltipWidth = theTooltip [ 0 ] . offsetWidth ;
80
+ if ( ! $scope . isTooltipEmpty ( ) ) {
81
+
82
+ height = thisElement [ 0 ] . offsetHeight ;
83
+ width = thisElement [ 0 ] . offsetWidth ;
84
+ offsetTop = $scope . getRootOffsetTop ( thisElement [ 0 ] , 0 ) ;
85
+ offsetLeft = $scope . getRootOffsetLeft ( thisElement [ 0 ] , 0 ) ;
86
+ //get tooltip dimension
87
+ theTooltipHeight = theTooltip [ 0 ] . offsetHeight ;
88
+ theTooltipWidth = theTooltip [ 0 ] . offsetWidth ;
79
89
80
- $scope . parseSpeed ( ) ;
81
- $scope . tooltipPositioning ( tooltipSide ) ;
90
+ $scope . parseSpeed ( ) ;
91
+ $scope . tooltipPositioning ( tooltipSide ) ;
92
+ }
82
93
} ;
83
94
84
95
$scope . getRootOffsetTop = function getRootOffsetTop ( elem , val ) {
You can’t perform that action at this time.
0 commit comments