-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(create-grid): include elements scrolled out of view in the grid #3773
Conversation
'<div id="n0" style="position: fixed; top:-31px; height: 60px">0</div>' + | ||
'<div id="n1" style="position: fixed; top:-31px; height: 30px">1</div>' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a weird bug around isOffScreen. Something with bottom:0 is considered on screen. Changing that caused a bunch of other problems. Need to look into that, but seems like a separate issue.
lib/commons/dom/create-grid.js
Outdated
if (debug) { | ||
console.log({ x, y }, { rowIndex, colIndex }, { top, right, bottom, left }); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, will fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Direction LGTM
lib/commons/dom/create-grid.js
Outdated
'Element midpoint exceeds the grid bounds' | ||
); | ||
const row = this.cells[rowIndex - this.cells._negativeIndex] ?? []; | ||
return row[colIndex - row._negativeIndex] ?? null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small thing. Maybe this should return an empty array instead of null? That way when you use it in get-rect-stack we wouldn't need to do default it to an empty array using || []
after the call?
Closes issue: #3772