Support "top" placement so we can tooltip the navigation menu

This commit is contained in:
Bryan Housel
2017-03-24 21:43:29 -04:00
parent 424ad63993
commit 525994082c

View File

@@ -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 = [