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

IE11 support by adding viewBox #67

Merged
merged 1 commit into from
Feb 13, 2025
Merged

IE11 support by adding viewBox #67

merged 1 commit into from
Feb 13, 2025

Conversation

LasseRafn
Copy link
Owner

Potentially fixes #51

Changes

  1. Added viewBox attribute to the SVG document in the makeSvgAvatar() method
  • The viewBox attribute is essential for proper scaling in IE11
  • Format is "0 0 width height" which defines the coordinate system
  • Uses the same dimensions as the SVG element itself
  • This maintains aspect ratio when resizing in IE11

Copy link

⚠️ Coverage decreased (-0.29%) to 75.68%

Patch: 0 of 1 relevant changed lines are covered.

Show more details
@@               Coverage Report               @@
##              master              #67    +/- ##
##            1a6487a7         a0af29ca        ##
=================================================
- Coverage      75.97%           75.68%    -0.29%
  Complexity       105              105         -
  CRAP          138.18           138.18         -
  CRAP Avg       34.55            34.55         -
=================================================
  Files              4                4         -
  Lines            258              259        +1
=================================================
  Hits            1956             1956         -
- Misses            62               63        +1

Files with reduced coverage (1)

File master #67 Change Lines Covered Lines
src/InitialAvatar.php 77.60 % 77.29 % -0.31 % 251 (+1) 194 (-)

See full report on OtterWise

@LasseRafn LasseRafn merged commit 5146d72 into master Feb 13, 2025
13 checks passed
@LasseRafn LasseRafn deleted the fix-51 branch February 13, 2025 15:52
Copy link

⚠️ Coverage decreased (-0.29%) to 75.68%

Patch: 0 of 1 relevant changed lines are covered.

Show more details
@@               Coverage Report               @@
##              master              #67    +/- ##
##            1a6487a7         a0af29ca        ##
=================================================
- Coverage      75.97%           75.68%    -0.29%
  Complexity       105              105         -
  CRAP          138.18           138.18         -
  CRAP Avg       34.55            34.55         -
=================================================
  Files              4                4         -
  Lines            258              259        +1
=================================================
  Hits            1956             1956         -
- Misses            62               63        +1

Files with reduced coverage (1)

File master #67 Change Lines Covered Lines
src/InitialAvatar.php 77.60 % 77.29 % -0.31 % 251 (+1) 194 (-)

See full report on OtterWise

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.

[Regression] SVGs not resizing in IE11
1 participant