Skip to content

Fix S2Layer base class and props. - #869

Merged
1chandu merged 1 commit into
masterfrom
s2LayerFix
Aug 22, 2017
Merged

1chandu merged 1 commit into
masterfrom
s2LayerFix

Conversation

@1chandu

@1chandu 1chandu commented Aug 21, 2017

Copy link
Copy Markdown
Contributor

Fix for #800

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],

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.

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] ?

@ibgreen ibgreen Aug 22, 2017 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

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.

Fixed here : #870

@ibgreen ibgreen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks great. But we should fix the color-picker.js at the source, not patch it here.

super(props);
}

initializeState() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this can be cut on compositeLayers.

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.

good catch, I added it when debugging, forgot to remove.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I was referring to initializeState but I guess the constructor could also be cut.

@1chandu 1chandu added this to the v4.1 PATCH milestone Aug 22, 2017
@1chandu
1chandu merged commit d82b8a8 into master Aug 22, 2017
@1chandu
1chandu deleted the s2LayerFix branch August 22, 2017 01:19
This was referenced Aug 22, 2017
1chandu added a commit that referenced this pull request Aug 25, 2017
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