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

feat: adding writer.updateDimensions method #245

Merged
merged 4 commits into from Jul 12, 2021
Merged

Conversation

chanind
Copy link
Owner

@chanind chanind commented Jul 12, 2021

This PR adds an updateDimensions({ width, height, padding }) method, which will update the size of an existing HanziWriter instance without needing to recreate the instance and without needing to reset the render state.

closes #244

@chanind chanind changed the title feat: adding a updateDimensions method feat: adding writer.updateDimensions method Jul 12, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2021

Codecov Report

Merging #245 (ec178f8) into master (3766a8b) will decrease coverage by 0.11%.
The diff coverage is 92.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #245      +/-   ##
==========================================
- Coverage   96.18%   96.07%   -0.12%     
==========================================
  Files          32       32              
  Lines        1102     1121      +19     
  Branches      196      202       +6     
==========================================
+ Hits         1060     1077      +17     
- Misses         38       40       +2     
  Partials        4        4              
Impacted Files Coverage Δ
src/Quiz.ts 94.36% <0.00%> (-1.35%) ⬇️
src/HanziWriter.ts 93.92% <95.23%> (-0.06%) ⬇️
src/RenderState.ts 98.11% <100.00%> (+0.03%) ⬆️
src/renderers/RenderTargetBase.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3766a8b...ec178f8. Read the comment docs.

@chanind chanind merged commit f1a810c into master Jul 12, 2021
@chanind chanind deleted the update-dimensions branch July 12, 2021 14:52
@chanind
Copy link
Owner Author

chanind commented Jul 12, 2021

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to dynamically change width/height of current HanziWriter?
2 participants