Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
sidvishnoi committed Apr 17, 2020
1 parent 2bb70a8 commit deec8b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/dfn-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const name = "core/dfn-panel";
export async function run() {
const css = await loadStyle();
document.head.insertBefore(
hyperHTML`<style id="respec-dfn-panel-css">${css}</style>`,
hyperHTML`<style>${css}</style>`,
document.querySelector("link")
);

Expand Down Expand Up @@ -170,9 +170,8 @@ function displayPanel(dfn, panel, { x, y }) {
if (panelRect.right > SCREEN_WIDTH) {
const newLeft = Math.max(MARGIN, x + MARGIN - panelRect.width);
const newCaretOffset = left - newLeft;
const caret = panel.querySelector(".caret");
panel.style.left = `${newLeft}px`;
caret.style.left = `${newCaretOffset}px`;
panel.querySelector(".caret").style.left = `${newCaretOffset}px`;
}
}

Expand Down

0 comments on commit deec8b9

Please sign in to comment.