Skip to content

fix(create-grid): include elements scrolled out of view in the grid#3773

Merged
WilcoFiers merged 14 commits intodevelopfrom
grid-scroll
Nov 14, 2022
Merged

fix(create-grid): include elements scrolled out of view in the grid#3773
WilcoFiers merged 14 commits intodevelopfrom
grid-scroll

Conversation

@WilcoFiers
Copy link
Copy Markdown
Contributor

Closes issue: #3772

Comment on lines +46 to +47
'<div id="n0" style="position: fixed; top:-31px; height: 60px">0</div>' +
'<div id="n1" style="position: fixed; top:-31px; height: 30px">1</div>' +
Copy link
Copy Markdown
Contributor Author

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.

@WilcoFiers WilcoFiers marked this pull request as ready for review November 10, 2022 13:55
@WilcoFiers WilcoFiers requested a review from a team as a code owner November 10, 2022 13:55
@WilcoFiers WilcoFiers requested a review from straker November 10, 2022 15:03
Comment on lines +386 to +388
if (debug) {
console.log({ x, y }, { rowIndex, colIndex }, { top, right, bottom, left });
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, will fix

Copy link
Copy Markdown
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Direction LGTM

straker
straker previously approved these changes Nov 14, 2022
'Element midpoint exceeds the grid bounds'
);
const row = this.cells[rowIndex - this.cells._negativeIndex] ?? [];
return row[colIndex - row._negativeIndex] ?? null;
Copy link
Copy Markdown
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants