Skip to content

Commit

Permalink
Support "top" placement so we can tooltip the navigation menu
Browse files Browse the repository at this point in the history
  • Loading branch information
bhousel committed Mar 25, 2017
1 parent 424ad63 commit 5259940
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/ui/curtain.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,13 @@ export function uiCurtain() {
pos = [box.left - 200, box.top + box.height / 2 - dimensions[1] / 2];

} else {
side = 'bottom';
pos = [box.left, box.top + box.height];
// need real tooltip height to calculate "top" placement
tooltip
.attr('class', 'curtain-tooltip tooltip in')
.call(uiToggle(true));
var tip = tooltip.node().getBoundingClientRect();
side = 'top';
pos = [box.left + box.width / 2 - dimensions[0] / 2, box.top - tip.height];
}

pos = [
Expand Down

0 comments on commit 5259940

Please sign in to comment.