Comparing version 0.4.0 to 0.4.1
@@ -80,2 +80,18 @@ declare global { | ||
/** | ||
* Updates cached child position data. | ||
* | ||
* If the element is hidden using `display: none` it will pickup incorrect children | ||
* positional data which will lead to artifacts on the first visible change after | ||
* the element was unhidden again. | ||
* | ||
* This can be prevented by re-collecting the positional data once every time the | ||
* element is unhidden. This needs to be done manually, however, because the element | ||
* cannot detect that itself. | ||
* | ||
* Caution: While the process itself will be run during animation frame timing, doing | ||
* this too often could still degrade performance, as the element needs to access the | ||
* computed style values of every child. | ||
*/ | ||
refresh(): void; | ||
/** | ||
* Animates the transition of the elements that have moved. | ||
@@ -82,0 +98,0 @@ */ |
@@ -163,2 +163,20 @@ /** | ||
/** | ||
* Updates cached child position data. | ||
* | ||
* If the element is hidden using `display: none` it will pickup incorrect children | ||
* positional data which will lead to artifacts on the first visible change after | ||
* the element was unhidden again. | ||
* | ||
* This can be prevented by re-collecting the positional data once every time the | ||
* element is unhidden. This needs to be done manually, however, because the element | ||
* cannot detect that itself. | ||
* | ||
* Caution: While the process itself will be run during animation frame timing, doing | ||
* this too often could still degrade performance, as the element needs to access the | ||
* computed style values of every child. | ||
*/ | ||
refresh() { | ||
batchCallback(() => this._childData = this._collectChildData()); | ||
} | ||
/** | ||
* Animates the transition of the elements that have moved. | ||
@@ -165,0 +183,0 @@ */ |
{ | ||
"name": "dom-flip", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Smooth position animation for web components", | ||
@@ -5,0 +5,0 @@ "main": "dist/dom-flip.js", |
@@ -235,2 +235,21 @@ declare global { | ||
/** | ||
* Updates cached child position data. | ||
* | ||
* If the element is hidden using `display: none` it will pickup incorrect children | ||
* positional data which will lead to artifacts on the first visible change after | ||
* the element was unhidden again. | ||
* | ||
* This can be prevented by re-collecting the positional data once every time the | ||
* element is unhidden. This needs to be done manually, however, because the element | ||
* cannot detect that itself. | ||
* | ||
* Caution: While the process itself will be run during animation frame timing, doing | ||
* this too often could still degrade performance, as the element needs to access the | ||
* computed style values of every child. | ||
*/ | ||
refresh() { | ||
batchCallback(() => this._childData = this._collectChildData()); | ||
} | ||
/** | ||
* Animates the transition of the elements that have moved. | ||
@@ -237,0 +256,0 @@ */ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47446
811