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

Don't update dynamiccssrules on panning, add chromium percentage missing redraw workaround #140

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jonenst
Copy link
Collaborator

@jonenst jonenst commented Dec 13, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?
NO

What kind of change does this PR introduce?

feature/bugfix

What is the current behavior?
css rules are updated when the viewbox changes, even for translations. But we only use the zoom level in rules
Also, chromium doesn't update the rendering when of percents (stroke-width), so add a workaround to force redraw
when the zoom changes by 1 percent

What is the new behavior (if this is a feature change)?
no update of rules during translations. Chromium redraw on zoom workaround (enabled all the time for consistency)

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

Other information:

we could split this PR in 2. We could enable the workaround only if we detect dynamic rules with percentages

@jonenst jonenst changed the title Don't update dynamiccssrules on translations, add chromium workaround Don't update dynamiccssrules on panning, add chromium workaround Dec 13, 2024
@jonenst jonenst changed the title Don't update dynamiccssrules on panning, add chromium workaround Don't update dynamiccssrules on panning, add chromium percentage missing redraw workaround Dec 13, 2024
Signed-off-by: HARPER Jon <jon.harper87@gmail.com>
This allows to see the effect of the workarounds for the css containing percent in the demo.
And it's generally useful to have this kind of css when enabling level of detail

Signed-off-by: HARPER Jon <jon.harper87@gmail.com>
Signed-off-by: HARPER Jon <jon.harper87@gmail.com>
Signed-off-by: HARPER Jon <jon.harper87@gmail.com>
@jonenst jonenst force-pushed the fixsvgpercentwhenzoom branch from 912cebd to 52cdd79 Compare December 17, 2024 09:00
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