-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDN feature pages for SVGAnimatedTransformList (#37077)
* add: MDN feature pages for SVGAnimatedTransformList * Update files/en-us/web/api/svganimatedtransformlist/baseval/index.md Co-authored-by: Estelle Weyl <estelle@openwebdocs.org> * Update files/en-us/web/api/svganimatedtransformlist/animval/index.md Co-authored-by: Estelle Weyl <estelle@openwebdocs.org> * Update files/en-us/web/api/svganimatedtransformlist/baseval/index.md Co-authored-by: Estelle Weyl <estelle@openwebdocs.org> * Update files/en-us/web/api/svganimatedtransformlist/baseval/index.md Co-authored-by: Estelle Weyl <estelle@openwebdocs.org> * fix: changed to console dir for objects * fix: property value for animval * simplified code example * fix: see also section with relevant links --------- Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
- Loading branch information
1 parent
6db682e
commit 4f59a1b
Showing
3 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
files/en-us/web/api/svganimatedtransformlist/animval/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
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 **`animVal`** read-only property of the {{domxref("SVGAnimatedTransformList")}} interface represents the animated value of the `transform` attribute of an SVG element. | ||
|
||
This property reflects the SVG element's {{SVGAttr("transform")}}, the {{SVGElement("linearGradient")}} or {{SVGElement("radialGradient")}} element's {{SVGAttr("gradientTransform")}} attribute, or the {{SVGElement("pattern")}} element's {{SVGAttr("patternTransform")}} attribute as a readonly {{ domxref("SVGTransformList") }}, providing access to the dynamically updated {{ domxref("SVGTransform") }} for each transform function during an animation. If no animation is active, this property 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.querySelector("rect"); | ||
|
||
// Access the animated transform list (if any) | ||
const animTransforms = rect.transform.animVal; | ||
|
||
// Log the animated transforms to the console | ||
console.dir(animTransforms); | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("SVGTransformList")}} | ||
- {{domxref("SVGTransform")}} |
43 changes: 43 additions & 0 deletions
43
files/en-us/web/api/svganimatedtransformlist/baseval/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
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 **`baseVal`** read-only property of the {{domxref("SVGAnimatedTransformList")}} interface represents the non-animated value of the `transform` attribute of an SVG element. | ||
|
||
This property reflects the SVG element's {{SVGAttr("transform")}}, the {{SVGElement("linearGradient")}} or {{SVGElement("radialGradient")}} element's {{SVGAttr("gradientTransform")}} attribute, or the {{SVGElement("pattern")}} element's {{SVGAttr("patternTransform")}} attribute value as a readonly {{ domxref("SVGTransformList") }}, providing access to a static {{ domxref("SVGTransform") }} for each transform function set on the SVG element. | ||
|
||
## 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.querySelector("rect"); | ||
|
||
// Access the non-animated transform list of the element | ||
const baseTransforms = rect.transform.baseVal; | ||
|
||
// Log the base transforms to the console | ||
console.dir(baseTransforms); | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("SVGTransformList")}} | ||
- {{domxref("SVGTransform")}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters