refactor: Don't use skew_ and translate_ attributes on SVGs to animate blocks.#6782
Merged
gonfunko merged 4 commits intoJan 18, 2023
Merged
Conversation
BeksOmega
reviewed
Jan 18, 2023
BeksOmega
approved these changes
Jan 18, 2023
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.
The basics
npm run formatandnpm run lintThe details
Resolves
Fixes #6595
Proposed Changes
This change stops setting skew_ and translation_ attributes on SVGs for blocks. It introduces an internal getter for the translation, and stores it in a proper field on BlockSvg.
skew_ was only being set to a non-'' value in one place, and then immediately read back to set the transform. Instead, the transform is simply setting using the directly-calculated skew value, so there's no need to carry it around and clear it at other points.
WorkspaceCommentSvg also maintained the skew_ and translate_ attributes, but they appear to be vestigial from a long-ago copy-paste and not actually used, so they were removed.