blocks2image: More reliable offset calculations - #7783
Merged
Conversation
blocks2image: Fix cropping when exporting a single stackblocks2image: Don't rely on magic numbers when exporting a single stack
blocks2image: Don't rely on magic numbers when exporting a single stackblocks2image: Remove block type check
This was referenced Sep 7, 2024
blocks2image: Remove block type checkblocks2image: More reliable offset calculations
Member
|
@Samq64 Take a second look at your changes, if you still agree with them and feel quite confident, we can merge this. |
Member
Author
|
The console complains about the iframe not having an src but that was not introduced here. |
Member
Author
|
@TheColaber Could you please review this since you have a couple open PRs waiting for it? |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7644
Changes
Use
getBBox()to determinetranslateYwhen exporting blocks. Also adds the tiny bit of padding from #7644 so the block borders are never clipped.Reason for changes
Better addon compatibility
Tests
Tested on Chromium with custom block colours, custom block shape and cat blocks.
Export all is the same as before and still needs work.Done!Related: #5604 (comment)