-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SVG: factor out initialization code into a private method
Each well-formed SVG image has the following structure: SVG element - Definitions element - Root group - Other group 1 - ... - Other group n This patch factors out initialization code into a private method in such as way that the creation of this structure is clear from the code. The root group is the replacement for the parent group from before. We need this group as we cannot apply the viewport transform on the SVG element itself (this caused issues in Chrome). If other code appends groups to the SVG image, in reality it is appending those groups to the root group, but this detail is abstracted away by this patch.
- Loading branch information
1 parent
fa90573
commit 426fc45
Showing
1 changed file
with
33 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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