Repository navigation
Fix S2Layer base class and props. - #869
Conversation
| getS2Token: f => f.token, | ||
| getPath: f => f.path, | ||
| getFillColor: f => [f.value * 256, (1 - f.value) * 256, (1 - f.value) * 128], | ||
| getStrokeColor: f => [255, 255, 128], |
There was a problem hiding this comment.
getStrokeColor: f => [255, 255, 128], getFillColor: f => [255, 255, 128],
When color-picker.js calls these methods, it doesn't pass any parameters, f is going to be undefined, kept them in same style as getStrokeWidth below, but may be we should just change them to callback: () => [255, 255, 128] ?
There was a problem hiding this comment.
Not sure what happened to my comments here, but we should keep the feature dependent fill color or we lose the ability to show neighbouring S2 cells, which is a key part of the demo of this layer.
We need to fix this in another place. The error probably related to failing to forward some accessor.
ibgreen
left a comment
There was a problem hiding this comment.
Looks great. But we should fix the color-picker.js at the source, not patch it here.
| super(props); | ||
| } | ||
|
|
||
| initializeState() { |
There was a problem hiding this comment.
I think this can be cut on compositeLayers.
There was a problem hiding this comment.
good catch, I added it when debugging, forgot to remove.
There was a problem hiding this comment.
I was referring to initializeState but I guess the constructor could also be cut.
Fix for #800