Skip to content

Commit

Permalink
Don't add empty transform
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Dec 8, 2024
1 parent e37d741 commit c89253d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/svg/svg.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ type pathObj struct {
StrokeLineJoin string `xml:"stroke-linejoin,attr,omitempty"`
StrokeDashArray string `xml:"stroke-dasharray,attr,omitempty"`
D string `xml:"d,attr"`
Transform string `xml:"transform,attr"`
Transform string `xml:"transform,attr,omitempty"`
}

type rectObj struct {
Expand All @@ -156,7 +156,7 @@ type rectObj struct {
Y string `xml:"y,attr,omitempty"`
Width string `xml:"width,attr,omitempty"`
Height string `xml:"height,attr,omitempty"`
Transform string `xml:"transform,attr"`
Transform string `xml:"transform,attr,omitempty"`
}

type circleObj struct {
Expand All @@ -171,7 +171,7 @@ type circleObj struct {
CX string `xml:"cx,attr,omitempty"`
CY string `xml:"cy,attr,omitempty"`
R string `xml:"r,attr,omitempty"`
Transform string `xml:"transform,attr"`
Transform string `xml:"transform,attr,omitempty"`
}

type ellipseObj struct {
Expand All @@ -187,7 +187,7 @@ type ellipseObj struct {
CY string `xml:"cy,attr,omitempty"`
RX string `xml:"rx,attr,omitempty"`
RY string `xml:"ry,attr,omitempty"`
Transform string `xml:"transform,attr"`
Transform string `xml:"transform,attr,omitempty"`
}

type polygonObj struct {
Expand All @@ -200,7 +200,7 @@ type polygonObj struct {
StrokeLineJoin string `xml:"stroke-linejoin,attr,omitempty"`
StrokeDashArray string `xml:"stroke-dasharray,attr,omitempty"`
Points string `xml:"points,attr"`
Transform string `xml:"transform,attr"`
Transform string `xml:"transform,attr,omitempty"`
}

type objGroup struct {
Expand All @@ -212,7 +212,7 @@ type objGroup struct {
StrokeLineCap string `xml:"stroke-linecap,attr,omitempty"`
StrokeLineJoin string `xml:"stroke-linejoin,attr,omitempty"`
StrokeDashArray string `xml:"stroke-dasharray,attr,omitempty"`
Transform string `xml:"transform,attr"`
Transform string `xml:"transform,attr,omitempty"`
Paths []*pathObj `xml:"path"`
Circles []*circleObj `xml:"circle"`
Ellipses []*ellipseObj `xml:"ellipse"`
Expand Down

0 comments on commit c89253d

Please sign in to comment.