SVGAnimatedPreserveAspectRatio
SVG animated preserveAspectRatio interface
The SVGAnimatedPreserveAspectRatio interface is used for attributes of type SVGPreserveAspectRatio which can be animated.
Interface overview
| Also implement | None |
|---|---|
| Methods | None |
| Properties |
|
| Normative document | SVG 1.1 (2nd Edition) |
Properties
-
SVGAnimatedPreserveAspectRatio.baseValRead only -
Is a
SVGPreserveAspectRatiothat represents the base value of the given attribute before applying any animations. -
SVGAnimatedPreserveAspectRatio.animValRead only -
Is a
SVGPreserveAspectRatiothat represents the current animated value of the given attribute. If the given attribute is not currently being animated, then theSVGPreserveAspectRatiowill have the same contents asbaseVal. The object referenced byanimValis always distinct from the one referenced bybaseVal, even when the attribute is not animated.
Methods
The SVGAnimatedPreserveAspectRatio interface do not provide any specific methods.
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
SVGAnimatedPreserveAspectRatio |
5 |
12 |
1.5 |
9 |
≤12.1 |
5 |
≤37 |
18 |
4 |
≤12.1 |
4 |
1.0 |
animVal |
5 |
12 |
22 |
10 |
≤12.1 |
6 |
≤37 |
18 |
22 |
≤12.1 |
6 |
1.0 |
baseVal |
5 |
12 |
22 |
10 |
≤12.1 |
6 |
≤37 |
18 |
22 |
≤12.1 |
6 |
1.0 |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedPreserveAspectRatio