Repository: flex-asjs Updated Branches: refs/heads/develop eb71e5561 -> df7ba9600
Add âexpandâ attribute to make container grow all space available. This property seems that will be deprecated in the future versions of MDL, in the meanwhile⦠Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/df7ba960 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/df7ba960 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/df7ba960 Branch: refs/heads/develop Commit: df7ba9600de200092dabe031f88b348e3f59ab7e Parents: eb71e55 Author: Carlos Rovira <[email protected]> Authored: Tue Nov 15 23:56:51 2016 +0100 Committer: Carlos Rovira <[email protected]> Committed: Tue Nov 15 23:56:51 2016 +0100 ---------------------------------------------------------------------- .../flexjs/MDLExample/src/main/flex/App.mxml | 34 +++++++++----------- .../apache/flex/mdl/supportClasses/CardInner.as | 22 +++++++++++++ 2 files changed, 37 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/df7ba960/examples/flexjs/MDLExample/src/main/flex/App.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/MDLExample/src/main/flex/App.mxml b/examples/flexjs/MDLExample/src/main/flex/App.mxml index c163e95..d941881 100644 --- a/examples/flexjs/MDLExample/src/main/flex/App.mxml +++ b/examples/flexjs/MDLExample/src/main/flex/App.mxml @@ -119,6 +119,16 @@ limitations under the License. </mdl:CardSupportingText> <mdl:CardActions border="true"> <mdl:Button text="Get Started" ripple="true" colored="true"/> + <mdl:Spacer/> + <mdl:Button id="demo_menu" icon="true"> + <i class="material-icons">more_vert</i> + </mdl:Button> + <!-- + <mdl:Menu ripple="true" dataMdlFor="demo_menu"> + <mdl:MenuItem text="Some Action"/> + <mdl:MenuItem text="Another Action"/> + <mdl:MenuItem text="Another Action 2"/> + </mdl:Menu>--> </mdl:CardActions> <mdl:CardMenu> <mdl:Button icon="true" ripple="true" style="color: #fff;"> @@ -131,9 +141,12 @@ limitations under the License. <mdl:Slider minimum="0" maximum="10" value="2" stepSize="2" width="200"/> <mdl:Card width="320" height="320" shadow="2" style="margin:10;"> - <mdl:CardTitle className="dogTitle"> + <mdl:CardTitle className="dogTitle" expand="true"> <js:H2 text="Update" className="mdl-card__title-text"/> </mdl:CardTitle> + <!--<mdl:CardMedia> + <js:Image url="assets/Unknown.jpg" height="176"/> + </mdl:CardMedia>--> <mdl:CardSupportingText> <js:MultilineLabel text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenan convallis."/> </mdl:CardSupportingText> @@ -143,30 +156,13 @@ limitations under the License. </mdl:Card> <mdl:Card width="256" height="256" shadow="2" style="margin:10;background: url('assets/image_card.jpg') center / cover"> - <mdl:CardTitle/> + <mdl:CardTitle expand="true"/> <mdl:CardActions style="height: 52px; padding: 16px; background: rgba(0, 0, 0, 0.2);"> <js:Span text="Image.jpg" style="color: #fff; font-size: 14px; font-weight: 500;"/> </mdl:CardActions> </mdl:Card> </js:HContainer> - - - <!-- - <mdl:Spacer/> - <mdl:Button id="demo_menu" icon="true"> - <i class="material-icons">more_vert</i> - </mdl:Button> - - <mdl:Menu ripple="true" dataMdlFor="demo_menu"> - <mdl:MenuItem text="Some Action"/> - <mdl:MenuItem text="Another Action"/> - </mdl:Menu> - - <mdl:CardMedia> - <js:Image url="assets/Unknown.jpg" height="176"/> - </mdl:CardMedia>--> - </js:Form> </js:View> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/df7ba960/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as index 3580337..8afeaa5 100644 --- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as +++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/supportClasses/CardInner.as @@ -96,6 +96,28 @@ package org.apache.flex.mdl.supportClasses _border = value; className += (_border ? " mdl-card--border" : ""); + } + + private var _expand:Boolean = false; + /** + * A boolean flag to activate "mdl-card--expand" effect selector. + * Makes the container grows all available space. Is flex css dependant + * It seems it will be deprecated in new MDL versions. + * + * @langversion 3.0 + * @playerversion Flash 10.2 + * @playerversion AIR 2.6 + * @productversion FlexJS 0.0 + */ + public function get expand():Boolean + { + return _expand; + } + public function set expand(value:Boolean):void + { + _expand = value; + + className += (_expand ? " mdl-card--expand" : ""); } } }
