Skip to content

Refactor block animations to not store data on SVG elements #6595

@BeksOmega

Description

@BeksOmega

Describe the bug

Currently the block animations code stores data on properties of SVG element objects, which are also referenced in the main block code. This design has caused us problems in the past (namely #6541) because it is difficult to refactor the code when you're dealing with side effects on "private" properties that are triggered by other files.

Suggested solution

I think the easiest thing is just to add some public getters and setters for handling the skew and the translation (so that the block code and the block animation code can both mess with it). But there may also be a more elegant solution that does better at information hiding.

Additional Info

Related to #6559

Metadata

Metadata

Assignees

Labels

issue: feature requestDescribes a new feature and why it should be added

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions