-
Notifications
You must be signed in to change notification settings - Fork 61
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
allow subfield access #141
allow subfield access #141
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @bmschmidt and the rest of your teammates on Graphite |
aa964e6
to
2dac6bb
Compare
1cd7eec
to
9b53f80
Compare
src/aesthetics/Aesthetic.ts
Outdated
for (let i = 0; i < this.subfield.length; i++) { | ||
v = v[this.subfield[i]] as Input['domainType']; | ||
} | ||
return v; | ||
// Needs a default perhaps? | ||
return 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.
The return null;
statement is unreachable due to the preceding return v;
statement. Consider restructuring the function to ensure all code paths are reachable.
2dac6bb
to
c7a8537
Compare
9b53f80
to
bff128f
Compare
src/aesthetics/Aesthetic.ts
Outdated
for (let i = 0; i < this.subfield.length; i++) { | ||
v = v[this.subfield[i]] as Input['domainType']; | ||
} | ||
return v; | ||
// Needs a default perhaps? | ||
return 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.
The return null;
statement is unreachable due to the preceding return statement. Consider handling the case where this.field
is not found in point
before the loop.
d175c73
to
fb591fb
Compare
bff128f
to
c96085d
Compare
src/aesthetics/Aesthetic.ts
Outdated
for (let i = 0; i < this.subfield.length; i++) { | ||
v = v[this.subfield[i]] as Input['domainType']; | ||
} | ||
return v; | ||
// Needs a default perhaps? | ||
return 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.
The return statement here is unreachable due to the preceding return statement inside the if block. Consider removing it.
@@ -824,8 +824,8 @@ export class DataSelection { | |||
if (i === undefined) { | |||
i = this.cursor; | |||
} | |||
if (i > this.selectionSize) { | |||
undefined; | |||
if (i >= this.selectionSize) { |
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.
The condition i > this.selectionSize
should be i >= this.selectionSize
to correctly handle out-of-bounds access.
same here, "trunk branch locked" |
fb591fb
to
9cdf75f
Compare
c96085d
to
09bb35d
Compare
for (let i = 0; i < this.subfield.length; i++) { | ||
v = v[this.subfield[i]] as Input['domainType']; | ||
} | ||
return v; |
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.
Unreachable code after return v;
in value_for
method. Remove the redundant return null;
statement.
9cdf75f
to
5903dbd
Compare
09bb35d
to
a3d1a8a
Compare
for (let i = 0; i < this.subfield.length; i++) { | ||
v = v[this.subfield[i]] as Input['domainType']; | ||
} | ||
return v; |
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.
Redundant return statement. Remove the line after return v;
.
This makes it possible for deepscatter to access not just single-depth fields, but also structs that can get probed into.
Struct<x: Float32, y: Float32>
This is useful because often a single transformation should create two or more columns.
Important
Enhance Deepscatter by adding support for accessing subfields within struct fields, improving data transformation and rendering.
Aesthetic
class to handle subfields.AestheticSet
to support subfield access.regl_rendering.ts
.selection.ts
andscatterplot.ts
to work with subfields.TupleMap
andTupleSet
inutilityFunctions.ts
for managing nested keys.Tile
class to support subfield access.This description was created by for a3d1a8a. It will automatically update as commits are pushed.