Skip to content

Commit

Permalink
MDN Feature Pages for SVGAnimatedPreserveAspectRatio
Browse files Browse the repository at this point in the history
  • Loading branch information
yashrajbharti committed Dec 3, 2024
1 parent d489042 commit 1282c1b
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "SVGAnimatedPreserveAspectRatio: animVal property"
short-title: animVal
slug: Web/API/SVGAnimatedPreserveAspectRatio/animVal
page-type: web-api-instance-property
browser-compat: api.SVGAnimatedPreserveAspectRatio.animVal
---

{{APIRef("SVG")}}

The **`SVGAnimatedPreserveAspectRatio.animVal`** read-only property of the {{domxref("SVGAnimatedPreserveAspectRatio")}} interface represents the current animated value of the `preserveAspectRatio` attribute of an SVG element.

This property provides access to the animated state of the `preserveAspectRatio` attribute during an animation. If the attribute is not currently being animated, `animVal` will be the same as `baseVal`.

## Value

An {{domxref("SVGPreserveAspectRatio")}} object that represents the animated value of the `preserveAspectRatio` attribute.

- If the attribute is animated, `animVal` reflects the current animation state.
- If the attribute is not animated, `animVal` will be identical to `baseVal`.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("SVGAnimatedPreserveAspectRatio.baseVal")}}
- {{domxref("SVGPreserveAspectRatio")}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "SVGAnimatedPreserveAspectRatio: baseVal property"
short-title: baseVal
slug: Web/API/SVGAnimatedPreserveAspectRatio/baseVal
page-type: web-api-instance-property
browser-compat: api.SVGAnimatedPreserveAspectRatio.baseVal
---

{{APIRef("SVG")}}

The **`SVGAnimatedPreserveAspectRatio.baseVal`** read-only property of the {{domxref("SVGAnimatedPreserveAspectRatio")}} interface represents the base (non-animated) value of the `preserveAspectRatio` attribute of an SVG element.

This property provides access to the current value of the `preserveAspectRatio` attribute before any animation is applied. It is returned as an {{domxref("SVGPreserveAspectRatio")}} object.

## Value

An {{domxref("SVGPreserveAspectRatio")}} object that represents the non-animated value of the `preserveAspectRatio` attribute.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("SVGAnimatedPreserveAspectRatio.animVal")}}
- {{domxref("SVGPreserveAspectRatio")}}

0 comments on commit 1282c1b

Please sign in to comment.