Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit a7c1b68

Browse files
committed
Merge pull request #28 from KynoYang/fix-tooltip-try
Positioning tooltip before init after changing side
2 parents 7efbcea + e6be67e commit a7c1b68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/js/angular-tooltips.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,14 @@
251251
return offsets[worst] < offsets[key] ? worst : key;
252252
});
253253

254-
if (offsets[worstOffset] < 5) {
254+
if (side != bestPosition && offsets[worstOffset] < 20) {
255255

256256
side = bestPosition;
257257

258+
$scope.tooltipPositioning(side);
258259
$scope.initTooltip(bestPosition);
259260
}
261+
260262
};
261263

262264
//make sure that the tooltip is hidden when the directive is destroyed

0 commit comments

Comments
 (0)