This commit is contained in:
Bernard Xie 2023-02-24 11:57:52 -08:00
parent e850b24b25
commit 26169f5aba
No known key found for this signature in database
GPG key ID: 3C3E0036CE0F892C

View file

@ -96,6 +96,9 @@ func (el *ThemableElement) SetMaskUrl(url string) {
func (el *ThemableElement) Render() string { func (el *ThemableElement) Render() string {
out := "<" + el.tag out := "<" + el.tag
if len(el.Href) > 0 {
out += fmt.Sprintf(` href="%s"`, el.Href)
}
if el.X != math.MaxFloat64 { if el.X != math.MaxFloat64 {
out += fmt.Sprintf(` x="%f"`, el.X) out += fmt.Sprintf(` x="%f"`, el.X)
} }
@ -148,9 +151,6 @@ func (el *ThemableElement) Render() string {
if len(el.Transform) > 0 { if len(el.Transform) > 0 {
out += fmt.Sprintf(` transform="%s"`, el.Transform) out += fmt.Sprintf(` transform="%s"`, el.Transform)
} }
if len(el.Href) > 0 {
out += fmt.Sprintf(` href="%s"`, el.Href)
}
if len(el.Xmlns) > 0 { if len(el.Xmlns) > 0 {
out += fmt.Sprintf(` xmlns="%s"`, el.Xmlns) out += fmt.Sprintf(` xmlns="%s"`, el.Xmlns)
} }