# 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 created with:

const animateTransform = parentElement.add('animateTransform')

It's possible to create it 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( transformationType )

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.