OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 class _ChildrenElementList extends ListBase<Element> | 7 class _ChildrenElementList extends ListBase<Element> |
8 implements NodeListWrapper { | 8 implements NodeListWrapper { |
9 // Raw Element. | 9 // Raw Element. |
10 final Element _element; | 10 final Element _element; |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 **/ | 814 **/ |
815 @Experimental() | 815 @Experimental() |
816 @SupportedBrowser(SupportedBrowser.CHROME, '36') | 816 @SupportedBrowser(SupportedBrowser.CHROME, '36') |
817 AnimationPlayer animate(Iterable<Map<String, dynamic>> frames, [timing]) { | 817 AnimationPlayer animate(Iterable<Map<String, dynamic>> frames, [timing]) { |
818 if (frames is! Iterable || !(frames.every((x) => x is Map))) { | 818 if (frames is! Iterable || !(frames.every((x) => x is Map))) { |
819 throw new ArgumentError("The frames parameter should be a List of Maps " | 819 throw new ArgumentError("The frames parameter should be a List of Maps " |
820 "with frame information"); | 820 "with frame information"); |
821 } | 821 } |
822 var convertedFrames = frames; | 822 var convertedFrames = frames; |
823 if (convertedFrames is Iterable) { | 823 if (convertedFrames is Iterable) { |
| 824 $if DART2JS |
| 825 convertedFrames = frames.map(convertDartToNative_Dictionary).toList(); |
| 826 $else |
824 convertedFrames = convertDartToNative_List( | 827 convertedFrames = convertDartToNative_List( |
825 frames.map(convertDartToNative_Dictionary).toList()); | 828 frames.map(convertDartToNative_Dictionary).toList()); |
| 829 $endif |
826 } | 830 } |
827 var convertedTiming = timing; | 831 var convertedTiming = timing; |
828 if (convertedTiming is Map) { | 832 if (convertedTiming is Map) { |
829 convertedTiming = convertDartToNative_Dictionary(convertedTiming); | 833 convertedTiming = convertDartToNative_Dictionary(convertedTiming); |
830 } | 834 } |
831 return convertedTiming == null | 835 return convertedTiming == null |
832 ? _animate(convertedFrames) | 836 ? _animate(convertedFrames) |
833 : _animate(convertedFrames, convertedTiming); | 837 : _animate(convertedFrames, convertedTiming); |
834 } | 838 } |
835 | 839 |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1710 const ScrollAlignment._internal(this._value); | 1714 const ScrollAlignment._internal(this._value); |
1711 toString() => 'ScrollAlignment.$_value'; | 1715 toString() => 'ScrollAlignment.$_value'; |
1712 | 1716 |
1713 /// Attempt to align the element to the top of the scrollable area. | 1717 /// Attempt to align the element to the top of the scrollable area. |
1714 static const TOP = const ScrollAlignment._internal('TOP'); | 1718 static const TOP = const ScrollAlignment._internal('TOP'); |
1715 /// Attempt to center the element in the scrollable area. | 1719 /// Attempt to center the element in the scrollable area. |
1716 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1720 static const CENTER = const ScrollAlignment._internal('CENTER'); |
1717 /// Attempt to align the element to the bottom of the scrollable area. | 1721 /// Attempt to align the element to the bottom of the scrollable area. |
1718 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1722 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
1719 } | 1723 } |
OLD | NEW |