# animateTransform

The animateTransform element animates a transformation attribute on its target element, thereby allowing animations to control translation, scaling, rotation, and/or skewing.

Usually, this element is create with:

const animateTransform = parentElement.add('animateTransform')

It's possible create as a disconnected element with gySVG('animateTransform') and attach it to the SVG document with .attachTo().

More info: mdn (opens new window) | w3c (opens new window)

# .type()

animateTransform.type( _ )

Set the type attribute. It defines the type of transformation, whose values change over time.

  • argument: {string} transformationType Must be 'translate' | 'scale' | 'rotate' | 'skewX' | 'skewY'

  • returns: {gySVGObject} The original object

const type = element.type();

Get the type current value.