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

Allow to disable viewport features calculation #164

Merged
merged 4 commits into from
Aug 3, 2021

Conversation

alasarr
Copy link
Contributor

@alasarr alasarr commented Aug 3, 2021

This PR allows disabling viewport features calculation on demand. It requires to add an optional parameter to useCartoLayerProps, so the api would be like this:

// null because the second parameter is uniqueIdProperty. default to cartodb_id or geoid
useCartoLayerProps(source, null, viewportFeatures=false).

I've changed useCartoLayerProps to object destructing, so the api is:

useCartoLayerProps({ source,  viewportFeatures: false }).

@borja-munoz this update needs to be added to the reference

@alasarr alasarr requested a review from VictorVelarde August 3, 2021 19:08
@coveralls
Copy link
Collaborator

coveralls commented Aug 3, 2021

Pull Request Test Coverage Report for Build 1095207390

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 75.463%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/react-api/src/hooks/useCartoLayerProps.js 0 1 0.0%
Totals Coverage Status
Change from base Build 1094704887: -0.1%
Covered Lines: 709
Relevant Lines: 876

💛 - Coveralls

@alasarr alasarr merged commit 57aaf18 into master Aug 3, 2021
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