created a transforming svg g element in js