func (e *Element) Translate(x, y float64) {
	e.Transform(Translate{X: x, Y: y})
}
Translate sets an SVG element transform to translation.
It will override an old transform value.
package svg
import (
	"fmt"
	"strings"
	"github.com/dennwc/dom"
	"github.com/dennwc/dom/js"
)
func NewElement(tag string) *Element {
	return &Element{dom.Doc.CreateElementNS("http://www.w3.org/2000/svg", tag)}
}
func NewContainer(tag string) *Container {
	return &Container{*NewElement(tag)}
}
func New(w, h dom.Unit) *SVG {
	e := NewContainer("svg")
	dom.Body.AppendChild(e.DOMElement())
	e.SetAttribute("width", w.String())
	e.SetAttribute("height", h.String())
	return &SVG{*e}
}
func NewFullscreen() *SVG {
	return New(dom.Perc(100), dom.Vh(98))
}
var _ js.Wrapper = (*Element)(nil)
func (e *Element) JSValue() js.Ref {
	return e.e.JSValue()
}
type Element struct {
	e *dom.Element
}
func (e *Element) SetAttribute(k string, v interface{}) {
	e.e.SetAttribute(k, v)
}
func (e *Element) Style() *dom.Style {
	return dom.AsStyle(js.Value{Ref: e.JSValue().Get("style")})
}
func (e *Element) Transform(arr ...Transform) {
	str := make([]string, 0, len(arr))
	for _, t := range arr {
		str = append(str, t.TransformString())
	}
	e.e.SetAttribute("transform", strings.Join(str, " "))
}