Skip to content
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

Remove broken debug bindings #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Remove broken debug bindings #66

wants to merge 1 commit into from

Conversation

sritchie
Copy link
Collaborator

Looks like I left a couple of debug bindings in grid.js, which caused an exception when lineX or lineY were set to false.

I also found it very confusing that origin was able to be used before being defined. This feels like a messy bug where the origin property is used first... and the const origin later in the file was re-binding this variable? That shouldn't be possible but removing the origin binding didn't cause any errors, which was troubling.

axis the variable and axis the function were clashing as well, so I did some renaming there to make things unambiguous.

@@ -133,7 +132,7 @@ export class Grid extends Primitive {
// Register lines
const lines = (() => {
const result = [];
for (axis of this.axes) {
for (const axis of this.axes) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was rebinding the function binding...

@@ -183,12 +182,14 @@ export class Grid extends Primitive {
touched["origin"] ||
init
) {
return this.updateRanges();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

these artifacts are all over the codebase from the coffeescript conversion.

}
window.cake1 = this.axes[0].buffer;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

whoops!

}
const x = Array.from(dimensions).includes(1) ? 0 : origin.x;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

while debugging a different problem that turned out to be user error, I introduced this mild cleanup.

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.

1 participant