Repository navigation
feat(themes): add a theme creator on a labelled mock of the current app - #133
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 52 minutes. View limit details
Summary
Merge Risk:
|
… a line that shifts the page
99eeb2a to
cbe80ac
Compare
…the colour list still
| const spot = document.querySelector('.marks .ring'); | ||
| if (!spot || !canvas) return; | ||
| const view = canvas.getBoundingClientRect(); | ||
| const box = spot.getBoundingClientRect(); | ||
| if (box.top >= view.top && box.bottom <= view.bottom) return; | ||
| canvas.scrollBy({ | ||
| top: box.top + box.height / 2 - (view.top + view.height / 2), | ||
| behavior: 'smooth' | ||
| }); |
There was a problem hiding this comment.
Bring the located token into view when the canvas does not scroll.
At 1100px and below, .canvas has overflow: visible and position: static. The canvas rect then spans the whole mock. The check at Line 369 always passes, so the function returns early. canvas.scrollBy never runs. The .view block is shown above the panel (column-reverse). A tap on a token row therefore highlights a ring that stays off-screen. Nothing visibly happens.
When canvas.scrollHeight <= canvas.clientHeight, call spot.scrollIntoView({ block: 'center', behavior: 'smooth' }) instead. Keep canvas.scrollBy for the wide layout.
Summary
Before
After