Skip to content
Snippets Groups Projects
Unverified Commit 2c1e095c authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #4071 from paulkaplan/dynamic-card-height

Try to always keep the tutorial in view despite screen height
parents 912306e6 f6c98d61
No related branches found
No related tags found
No related merge requests found
...@@ -234,7 +234,11 @@ const Cards = props => { ...@@ -234,7 +234,11 @@ const Cards = props => {
if (x === 0 && y === 0) { if (x === 0 && y === 0) {
// initialize positions // initialize positions
x = isRtl ? -292 : 292; x = isRtl ? -292 : 292;
y = 365; // The tallest cards are about 385px high, and the default position is pinned
// to near the bottom of the blocks palette to allow room to work above.
const tallCardHeight = 385;
const bottomMargin = 60; // To avoid overlapping the backpack region
y = window.innerHeight - tallCardHeight - bottomMargin;
} }
const steps = content[activeDeckId].steps; const steps = content[activeDeckId].steps;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment