OLD | NEW |
1 part of effects; | 1 part of effects; |
2 | 2 |
3 class Css3TransitionEffect extends ShowHideEffect { | 3 class Css3TransitionEffect extends ShowHideEffect { |
4 static const List<String> _reservedProperties = const ['transitionProperty', '
transitionDuration']; | 4 static const List<String> _reservedProperties = const ['transitionProperty', '
transitionDuration']; |
5 final String _property; | 5 final String _property; |
6 final String _hideValue; | 6 final String _hideValue; |
7 final String _showValue; | 7 final String _showValue; |
8 final Map<String, String> _animatingOverrides; | 8 final Map<String, String> _animatingOverrides; |
9 | 9 |
10 Css3TransitionEffect(this._property, this._hideValue, this._showValue, [Map<St
ring, String> animatingOverrides]) : _animatingOverrides = animatingOverrides ==
null ? new Map<String, String>() : new Map<String, String>.from(animatingOverri
des) { | 10 Css3TransitionEffect(this._property, this._hideValue, this._showValue, [Map<St
ring, String> animatingOverrides]) : _animatingOverrides = animatingOverrides ==
null ? new Map<String, String>() : new Map<String, String>.from(animatingOverri
des) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 void _setShowValue(Element element, String value, int desiredDuration, EffectT
iming timing) { | 72 void _setShowValue(Element element, String value, int desiredDuration, EffectT
iming timing) { |
73 final cssTimingValue = CssEffectTiming._getCssValue(timing); | 73 final cssTimingValue = CssEffectTiming._getCssValue(timing); |
74 | 74 |
75 element.style.transitionTimingFunction = cssTimingValue; | 75 element.style.transitionTimingFunction = cssTimingValue; |
76 element.style.transitionProperty = _property; | 76 element.style.transitionProperty = _property; |
77 element.style.transitionDuration = '${desiredDuration}ms'; | 77 element.style.transitionDuration = '${desiredDuration}ms'; |
78 element.style.setProperty(_property, value); | 78 element.style.setProperty(_property, value); |
79 } | 79 } |
80 | 80 |
81 static Map<String, String> _recordProperties(Element element, Collection<Strin
g> properties) { | 81 static Map<String, String> _recordProperties(Element element, Iterable<String>
properties) { |
82 final map = new Map<String, String>(); | 82 final map = new Map<String, String>(); |
83 | 83 |
84 for(final p in properties) { | 84 for(final p in properties) { |
85 assert(!map.containsKey(p)); | 85 assert(!map.containsKey(p)); |
86 map[p] = element.style.getPropertyValue(p); | 86 map[p] = element.style.getPropertyValue(p); |
87 } | 87 } |
88 | 88 |
89 return map; | 89 return map; |
90 } | 90 } |
91 } | 91 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 static Map<String, String> cleanup(Element element) { | 125 static Map<String, String> cleanup(Element element) { |
126 final value = _values[element]; | 126 final value = _values[element]; |
127 assert(value != null); | 127 assert(value != null); |
128 _values[element] = null; | 128 _values[element] = null; |
129 return value._cleanup(); | 129 return value._cleanup(); |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 | 133 |
OLD | NEW |