|
106 | 106 |
|
107 | 107 | $scope.initTooltip = function initTooltip (tooltipSide) {
|
108 | 108 | if (!$scope.isTooltipEmpty()) {
|
109 |
| - theTooltip.css('display', 'initial'); |
| 109 | + |
| 110 | + theTooltip.css('visibility', 'visible'); |
110 | 111 |
|
111 | 112 | height = thisElement[0].offsetHeight;
|
112 | 113 | width = thisElement[0].offsetWidth;
|
|
118 | 119 | $scope.parseSpeed();
|
119 | 120 | $scope.tooltipPositioning(tooltipSide);
|
120 | 121 | } else {
|
121 |
| - theTooltip.css('display', 'none'); |
| 122 | + theTooltip.css('visibility', 'hidden'); |
122 | 123 | }
|
123 | 124 | };
|
124 | 125 |
|
|
127 | 128 | offsetLeft = $scope.getOffsetLeft(thisElement[0]);
|
128 | 129 | };
|
129 | 130 |
|
130 |
| - $scope.getOffsetTop = function getOffsetTop (elem){ |
| 131 | + /*$scope.getOffsetTop = function getOffsetTop (elem){ |
131 | 132 | return elem.getBoundingClientRect().top + $window.scrollY;
|
132 | 133 | };
|
133 | 134 |
|
134 | 135 | $scope.getOffsetLeft = function getOffsetLeft (elem){
|
135 | 136 | return elem.getBoundingClientRect().left + $window.scrollX;
|
136 |
| - }; |
| 137 | + };*/ |
| 138 | + $scope.getOffsetTop = function getOffsetTop (elem){ |
| 139 | + var offtop = elem.getBoundingClientRect().top + $window.scrollY; |
| 140 | + //IE8 - 11 fix - window.scrollY is undefied, and offtop is NaN. |
| 141 | + if(isNaN(offtop)) { |
| 142 | + //get the offset on old properties |
| 143 | + offtop = elem.getBoundingClientRect().top + $window.pageYOffset; |
| 144 | + } |
| 145 | + return offtop; |
| 146 | + }; |
| 147 | + |
| 148 | + $scope.getOffsetLeft = function getOffsetLeft (elem){ |
| 149 | + var offleft = elem.getBoundingClientRect().left + $window.scrollX; |
| 150 | + //IE8 - 11 fix - window.scrollX is undefied, and offtop is NaN. |
| 151 | + if(isNaN(offleft)) { |
| 152 | + //get the offset on old properties |
| 153 | + offleft = elem.getBoundingClientRect().left + $window.pageXOffset; |
| 154 | + } |
| 155 | + return offleft; |
| 156 | + }; |
137 | 157 |
|
138 | 158 | function onMouseEnterAndMouseOver() {
|
139 | 159 | if (!lazyMode || !initialized) {
|
|
196 | 216 | };
|
197 | 217 |
|
198 | 218 | $scope.hideTooltip = function hideTooltip () {
|
199 |
| - theTooltip.css('transition', 'opacity ' + speed + 'ms linear, display 0s linear ' + speed + 'ms'); |
| 219 | + theTooltip.css('transition', 'opacity ' + speed + 'ms linear, visibility 0s linear ' + speed + 'ms'); |
200 | 220 | theTooltip.removeClass(CSS_PREFIX + 'open');
|
201 | 221 | $scope.clearTriggers();
|
202 | 222 | $scope.bindShowTriggers();
|
|
0 commit comments