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

Improvement disable control button when change state we do not redraw panel #1094

Merged

Conversation

vvlladd28
Copy link
Contributor

When studying the code, it was found that the optimal movement, which causes a complete redrawing of the control panel, when changes disable state.

This PR makes the following changes:

  • When we change disable state, we change CSS class and internal state
  • When you lock a button, we forcibly render it inactive
  • Changed CSS styles to remove class duplication for different DOM element

@vvlladd28
Copy link
Contributor Author

Please review my PR @Falke-Design

Copy link
Collaborator

@Falke-Design Falke-Design left a comment

Choose a reason for hiding this comment

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

Why do you think it is important to merge this? Clearly the difference is that the Toolbar is not rendered new, but every change on the Toolbar cause a re-render so why should we handle this different?

Anyway thank you for your contribution.

cypress/integration/toolbar.spec.js Outdated Show resolved Hide resolved
@vvlladd28
Copy link
Contributor Author

For example, I can give an example of code from the leaflet library, they have buttons for zooming the map and don't render after disable. The redraw render is complex for the browser.

@vvlladd28 vvlladd28 changed the base branch from master to develop March 9, 2022 09:05
@codeofsumit codeofsumit merged commit 8256536 into geoman-io:develop Apr 20, 2022
BaharWeb pushed a commit to BaharWeb/leaflet-geoman that referenced this pull request May 13, 2022
… panel (geoman-io#1094) (patch)

* Improvement disable control button when change state we do not redraw the control panel

* Fixed test

* Fixed test

* Fix removing event listener

Co-authored-by: Sumit Kumar <sk@outlook.com>
Co-authored-by: Florian Bischof <design.falke@gmail.com>
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.

None yet

3 participants