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

Fix: DrawingToolLayer disables interactivity of the layers behind it #263

Merged
merged 3 commits into from
Jan 3, 2022

Conversation

padawannn
Copy link
Contributor

@padawannn padawannn commented Jan 2, 2022

When you finish drawing, all layers behind the DrawingToolLayer lose their interactivity. For example, all these layers will not show their popup. To solve it we disable the pick DrawingToolLayer property unless you're editing or drawing

@padawannn padawannn requested review from alasarr and Clebal January 2, 2022 12:03
@coveralls
Copy link
Collaborator

coveralls commented Jan 2, 2022

Pull Request Test Coverage Report for Build 1646062627

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 69.913%

Totals Coverage Status
Change from base Build 1637103023: 0.0%
Covered Lines: 1116
Relevant Lines: 1500

💛 - Coveralls

@Clebal
Copy link
Contributor

Clebal commented Jan 2, 2022

Good catch @padawannn. Only the features behind the polygon loss their interactivity, that's why I would just disable polygon fill when it isn't needed:

getFillColor: [...mainColor.slice(0, 3), 255 * 0.08],
filled: isEdit,

It wasn't a good approach using [0, 0, 0, 0] to make polygon transparent and by this way, we avoid one ternary and creating [0,0,0,0] in each render.

But disabling interactivity is also ok I guess.

@padawannn
Copy link
Contributor Author

padawannn commented Jan 2, 2022

Good catch @padawannn. Only the features behind the polygon loss their interactivity, that's why I would just disable polygon fill when it isn't needed:

getFillColor: isEdit && [...mainColor.slice(0, 3), 255 * 0.08],
filled: isEdit,

It wasn't a good approach using [0, 0, 0, 0] to make polygon transparent.

But disabling interactivity is also ok I guess.

Thank @Clebal but I prefer to disable the pickable property because is easier to understand

@padawannn padawannn merged commit c9f2f45 into master Jan 3, 2022
@padawannn padawannn deleted the padawannn/drawing-layer-disable-interactivity branch January 3, 2022 09:44
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.

3 participants