Repository: flex-asjs Updated Branches: refs/heads/develop b1ba88e8f -> 1ae959d4c
Updates for DesktopMap example. Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1ae959d4 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1ae959d4 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1ae959d4 Branch: refs/heads/develop Commit: 1ae959d4c7cfabcbda23b37868f0fb3868cbf87b Parents: b1ba88e Author: Peter Ent <p...@apache.org> Authored: Tue Apr 18 14:18:07 2017 -0400 Committer: Peter Ent <p...@apache.org> Committed: Tue Apr 18 14:18:07 2017 -0400 ---------------------------------------------------------------------- .../DesktopMap/src/main/flex/MyInitialView.mxml | 89 ++++++++++++++------ .../flexjs/DesktopMap/src/main/flex/NoLayout.as | 35 ++++++++ 2 files changed, 96 insertions(+), 28 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1ae959d4/examples/flexjs/DesktopMap/src/main/flex/MyInitialView.mxml ---------------------------------------------------------------------- diff --git a/examples/flexjs/DesktopMap/src/main/flex/MyInitialView.mxml b/examples/flexjs/DesktopMap/src/main/flex/MyInitialView.mxml index 7a1d46d..cedfe57 100644 --- a/examples/flexjs/DesktopMap/src/main/flex/MyInitialView.mxml +++ b/examples/flexjs/DesktopMap/src/main/flex/MyInitialView.mxml @@ -91,57 +91,90 @@ limitations under the License. <fx:Style> @namespace basic "library://ns.apache.org/flexjs/basic"; + + .MapPanel { + border: 1px solid #555555; + backgroundColor: darkgray; + margin-top: 20px; + margin-left: auto; + margin-right: auto; + } + + .LocationGroup { + flex-grow: 0; + padding: 4px; + } + + .Map { + flex-grow: 1; + } + + .SearchGroup { + flex-grow: 0; + padding: 4px; + backgroundColor: lightgray; + } + + .InputGroup { + flex-grow: 0; + padding: 4px; + margin-top: 10px; + } </fx:Style> <js:beads> <js:ViewDataBinding /> + <local:NoLayout /> </js:beads> - - <js:Container x="5" y="5" className="topContainer" > + <js:Panel title="Map" width="50%" height="600" className="MapPanel"> <js:beads> - <js:VerticalLayout /> + <js:VerticalFlexLayout /> </js:beads> - <js:Container> + <js:Group className="LocationGroup"> <js:beads> - <js:HorizontalLayout /> + <js:OneFlexibleChildHorizontalLayout flexibleChild="mapLocation" /> </js:beads> <js:Label text="Location:" /> <js:TextInput id="mapLocation" /> <js:TextButton text="Go" click="orientMap()" /> - </js:Container> + </js:Group> - <google:Map id="map" width="450" height="300" token="AIzaSyDkQgg2iojLCYeuW6hK7DkuAHD-SwJJhdE" /> + <google:Map id="map" className="Map" token="AIzaSyDkQgg2iojLCYeuW6hK7DkuAHD-SwJJhdE" /> - <js:Container> + <js:Group className="SearchGroup"> <js:beads> - <js:HorizontalLayout /> + <js:OneFlexibleChildHorizontalLayout flexibleChild="search" /> </js:beads> <js:Label text="Search on Map:" /> <js:TextInput id="search" /> <js:TextButton text="Find" click="searchOnMap()" /> <js:TextButton text="Clear" click="clearSearchResults()" /> - </js:Container> - - <js:Label text="History:" /> - - <!--<js:List id="historyList" />--> - <js:DropDownList id="list" width="100" height="17" - change="changeCity(event)" - dataProvider="{MyModel(applicationModel).cities}" /> - - <js:Label text="Lat:" /> - <js:TextInput id="latInput" text="-34.397" /> + </js:Group> - <js:Label text="Long:" /> - <js:TextInput id="longInput" text="150.644" /> - - <js:Label text="Zoom:" /> - <js:TextInput id="zoomInput" text="8" /> - - <js:TextButton text="MapIt" click="mapIt()" /> - </js:Container> + <js:Group className="InputGroup"> + <js:beads> + <js:VerticalLayout /> + </js:beads> + <js:Label text="History" /> + <js:DropDownList id="list" width="100" height="17" + change="changeCity(event)" + dataProvider="{MyModel(applicationModel).cities}" /> + + <js:Label text="Lat:" /> + <js:TextInput id="latInput" text="-34.397" /> + + <js:Label text="Long:" /> + <js:TextInput id="longInput" text="150.644" /> + + <js:Label text="Zoom:" /> + <js:TextInput id="zoomInput" text="8" /> + + <js:TextButton text="MapIt" click="mapIt()" /> + </js:Group> + + </js:Panel> </js:View> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1ae959d4/examples/flexjs/DesktopMap/src/main/flex/NoLayout.as ---------------------------------------------------------------------- diff --git a/examples/flexjs/DesktopMap/src/main/flex/NoLayout.as b/examples/flexjs/DesktopMap/src/main/flex/NoLayout.as new file mode 100644 index 0000000..d5e265b --- /dev/null +++ b/examples/flexjs/DesktopMap/src/main/flex/NoLayout.as @@ -0,0 +1,35 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// +package +{ + import org.apache.flex.core.LayoutBase; + + /** + * This layout does nothing which allows any styles to be applied + * to the container in which it is used. + */ + + public class NoLayout extends LayoutBase + { + public function NoLayout() + { + super(); + } + } +} \ No newline at end of file