Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDN feature pages for SVGAnimatedTransformList #37077

Merged
merged 9 commits into from
Dec 6, 2024
44 changes: 44 additions & 0 deletions files/en-us/web/api/svganimatedtransformlist/animval/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: SVGAnimatedTransformList.animVal Property
short-title: animVal
slug: Web/API/SVGAnimatedTransformList/animVal
page-type: web-api-instance-property
browser-compat: api.SVGAnimatedTransformList.animVal
---

{{APIRef("SVG")}}

The **`SVGAnimatedTransformList.animVal`** read-only property of the {{domxref("SVGAnimatedTransformList")}} interface represents the animated value of the `transform` attribute of an SVG element.
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved

This property provides access to the current value of the `transform` attribute during an animation. If the transform is not currently being animated, `animVal` will return the same value as `baseVal`.

## Value

An {{domxref("SVGTransformList")}} object that reflects the current animated value of the `transform` attribute.

## Examples

```js
// Get the rectangle element
const rect = document.getElementById("myRect");

// Access the animated transform list (if any)
const animTransforms = rect.transform.animVal;

// Log the animated transforms to the console
console.log(animTransforms);
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("SVGAnimatedTransformList.baseVal")}}
- {{domxref("SVGTransformList")}}
- {{domxref("SVGTransform")}}
44 changes: 44 additions & 0 deletions files/en-us/web/api/svganimatedtransformlist/baseval/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: SVGAnimatedTransformList.baseVal Property
short-title: baseVal
slug: Web/API/SVGAnimatedTransformList/baseVal
page-type: web-api-instance-property
browser-compat: api.SVGAnimatedTransformList.baseVal
---

{{APIRef("SVG")}}

The **`SVGAnimatedTransformList.baseVal`** read-only property of the {{domxref("SVGAnimatedTransformList")}} interface represents the non-animated value of the `transform` attribute of an SVG element.
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved

This property provides access to the static value of the `transform` attribute, as set by the `transform` or similar presentation attributes (such as `gradientTransform` or `patternTransform`) of an SVG element.
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved

## Value

An {{domxref("SVGTransformList")}} object that represents the current, non-animated value of the `transform` attribute.

## Examples

```js
// Get the rectangle element
const rect = document.getElementById("myRect");

// Access the non-animated transform list of the element
const baseTransforms = rect.transform.baseVal;

// Log the base transforms to the console
console.log(baseTransforms);
yashrajbharti marked this conversation as resolved.
Show resolved Hide resolved
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("SVGAnimatedTransformList.animVal")}}
- {{domxref("SVGTransformList")}}
- {{domxref("SVGTransform")}}
4 changes: 2 additions & 2 deletions files/en-us/web/api/svganimatedtransformlist/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ The `SVGAnimatedTransformList` interface is used for attributes which take a lis
</thead>
<tbody>
<tr>
<td><code>baseVal</code></td>
<td><code>{{domxref("SVGAnimatedTransformList.baseVal")}}</code></td>
<td>{{ domxref("SVGTransformList") }}</td>
<td>
The base value of the given attribute before applying any animations.
</td>
</tr>
<tr>
<td><code>animVal</code></td>
<td><code>{{domxref("SVGAnimatedTransformList.animVal")}}</code></td>
<td>{{ domxref("SVGTransformList") }}</td>
<td>
A read only {{ domxref("SVGTransformList") }} representing
Expand Down
Loading