OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 library fn; | 5 library fn; |
6 | 6 |
7 import 'app.dart'; | 7 import 'app.dart'; |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:collection'; | 9 import 'dart:collection'; |
10 import 'dart:mirrors'; | 10 import 'dart:mirrors'; |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 assert(false); | 712 assert(false); |
713 // Paragraph does not support having children currently | 713 // Paragraph does not support having children currently |
714 } | 714 } |
715 } | 715 } |
716 | 716 |
717 class FlexContainer extends MultiChildRenderObjectWrapper { | 717 class FlexContainer extends MultiChildRenderObjectWrapper { |
718 RenderFlex root; | 718 RenderFlex root; |
719 RenderFlex createNode() => new RenderFlex(direction: this.direction); | 719 RenderFlex createNode() => new RenderFlex(direction: this.direction); |
720 | 720 |
721 final FlexDirection direction; | 721 final FlexDirection direction; |
| 722 final FlexJustifyContent justifyContent; |
722 | 723 |
723 FlexContainer({ | 724 FlexContainer({ |
724 Object key, | 725 Object key, |
725 List<UINode> children, | 726 List<UINode> children, |
726 this.direction: FlexDirection.horizontal | 727 this.direction: FlexDirection.horizontal, |
| 728 this.justifyContent: FlexJustifyContent.flexStart |
727 }) : super(key: key, children: children); | 729 }) : super(key: key, children: children); |
728 | 730 |
729 void syncRenderObject(UINode old) { | 731 void syncRenderObject(UINode old) { |
730 super.syncRenderObject(old); | 732 super.syncRenderObject(old); |
731 root.direction = direction; | 733 root.direction = direction; |
| 734 root.justifyContent = justifyContent; |
732 } | 735 } |
733 } | 736 } |
734 | 737 |
735 class FlexExpandingChild extends ParentDataNode { | 738 class FlexExpandingChild extends ParentDataNode { |
736 FlexExpandingChild(UINode content, [int flex = 1]) | 739 FlexExpandingChild(UINode content, [int flex = 1]) |
737 : super(content, new FlexBoxParentData()..flex = flex); | 740 : super(content, new FlexBoxParentData()..flex = flex); |
738 } | 741 } |
739 | 742 |
740 class Image extends RenderObjectWrapper { | 743 class Image extends RenderObjectWrapper { |
741 RenderImage root; | 744 RenderImage root; |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 assert(root.parent is RenderView); | 1036 assert(root.parent is RenderView); |
1034 } | 1037 } |
1035 } | 1038 } |
1036 | 1039 |
1037 class Text extends Component { | 1040 class Text extends Component { |
1038 Text(this.data) : super(key: '*text*'); | 1041 Text(this.data) : super(key: '*text*'); |
1039 final String data; | 1042 final String data; |
1040 bool get interchangeable => true; | 1043 bool get interchangeable => true; |
1041 UINode build() => new Paragraph(text: data); | 1044 UINode build() => new Paragraph(text: data); |
1042 } | 1045 } |
OLD | NEW |