Skip to content

Commit

Permalink
change logic so that cr-poem and cr-poem2 doesn't interfere with one …
Browse files Browse the repository at this point in the history
…another.
  • Loading branch information
andrewpbray committed Jul 31, 2024
1 parent 4caaf65 commit 237f1c6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions _extensions/closeread/closeread.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ function updateStickies(allStickies, focusedStickyName, trigger) {

if (focusedSticky.classList.contains("cr-poem")) {
scalePoemFull(focusedSticky);
highlightSpans(focusedSticky, trigger.element);
}

highlightSpans(focusedSticky, trigger.element);

}

Expand Down Expand Up @@ -127,8 +128,10 @@ function highlightSpans(focusedSticky, triggerEl) {
}
});

// scale to span
scalePoemToSpan(focusedSticky, highlightIds);
if (focusedSticky.classList.contains("cr-poem") {
// scale to span using transform
scalePoemToSpan(focusedSticky, highlightIds);
}

}

Expand Down

0 comments on commit 237f1c6

Please sign in to comment.