Skip to content

Commit 3fd095b

Browse files
committed
refactor: enable * states
1 parent a95e378 commit 3fd095b

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

Diff for: nativescript-angular/animations/transition-animation-engine.ts

+2-15
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ import {
2121
import { dashCaseToCamelCase } from "./utils";
2222
import { NgView } from "../element-registry";
2323

24-
const NULL_REMOVED_QUERIED_STATE: ElementAnimationState = {
25-
namespaceId: "",
26-
setForRemoval: null,
27-
hasAnimation: false,
28-
removedBeforeQueried: true
29-
};
30-
3124
function eraseStylesOverride(element: NgView, styles: ɵStyleData) {
3225
if (!element.style) {
3326
return;
@@ -46,7 +39,7 @@ function setStylesOverride(element: NgView, styles: ɵStyleData) {
4639

4740
Object.keys(styles).forEach(prop => {
4841
const camelCaseProp = dashCaseToCamelCase(prop);
49-
element.style[camelCaseProp] = styles[prop];
42+
element.style[camelCaseProp] = styles[camelCaseProp];
5043
});
5144
}
5245

@@ -428,13 +421,7 @@ function cloakAndComputeStyles(
428421
elementPropsMap.forEach((props: Set<string>, element: any) => {
429422
const styles: ɵStyleData = {};
430423
props.forEach(prop => {
431-
const value = styles[prop] = driver.computeStyle(element, prop, defaultStyle);
432-
433-
// there is no easy way to detect this because a sub element could be removed
434-
// by a parent animation element being detached.
435-
if (!value || value.length === 0) {
436-
element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;
437-
}
424+
styles[prop] = driver.computeStyle(element, prop, defaultStyle);
438425
});
439426
valuesMap.set(element, styles);
440427
});

0 commit comments

Comments
 (0)