-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
base: master
Are you sure you want to change the base?
Conversation
@@ -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) { |
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.
this was rebinding the function binding...
@@ -183,12 +182,14 @@ export class Grid extends Primitive { | |||
touched["origin"] || | |||
init | |||
) { | |||
return this.updateRanges(); |
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.
these artifacts are all over the codebase from the coffeescript conversion.
} | ||
window.cake1 = this.axes[0].buffer; |
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.
whoops!
} | ||
const x = Array.from(dimensions).includes(1) ? 0 : origin.x; |
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.
while debugging a different problem that turned out to be user error, I introduced this mild cleanup.
Looks like I left a couple of debug bindings in grid.js, which caused an exception when
lineX
orlineY
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 theorigin
property is used first... and theconst origin
later in the file was re-binding this variable? That shouldn't be possible but removing theorigin
binding didn't cause any errors, which was troubling.axis
the variable andaxis
the function were clashing as well, so I did some renaming there to make things unambiguous.