Reposition popover on scroll
Browse files- src/highlight.ts +1 -0
- src/stage.ts +1 -0
src/highlight.ts
CHANGED
@@ -30,6 +30,7 @@ export function refreshActiveHighlight() {
|
|
30 |
|
31 |
trackActiveElement(activeHighlight);
|
32 |
refreshStage();
|
|
|
33 |
}
|
34 |
|
35 |
function transferHighlight(from: Element, to: Element) {
|
|
|
30 |
|
31 |
trackActiveElement(activeHighlight);
|
32 |
refreshStage();
|
33 |
+
repositionPopover(activeHighlight);
|
34 |
}
|
35 |
|
36 |
function transferHighlight(from: Element, to: Element) {
|
src/stage.ts
CHANGED
@@ -89,6 +89,7 @@ function mountStage(stagePosition: StageDefinition) {
|
|
89 |
}
|
90 |
|
91 |
function renderStage(stagePosition: StageDefinition) {
|
|
|
92 |
if (!stageSvg) {
|
93 |
mountStage(stagePosition);
|
94 |
|
|
|
89 |
}
|
90 |
|
91 |
function renderStage(stagePosition: StageDefinition) {
|
92 |
+
// TODO: cancel rendering if element is not visible
|
93 |
if (!stageSvg) {
|
94 |
mountStage(stagePosition);
|
95 |
|