Merge pull request #30 from gravitystorm/background-panel
authorRichard Fairhurst <richard@systemeD.net>
Sun, 4 Mar 2012 14:34:01 +0000 (06:34 -0800)
committerRichard Fairhurst <richard@systemeD.net>
Sun, 4 Mar 2012 14:34:01 +0000 (06:34 -0800)
Background panel

net/systemeD/potlatch2/TagViewer.mxml
net/systemeD/potlatch2/panels/BackgroundMergePanel.mxml
net/systemeD/potlatch2/panels/BackgroundPanel.mxml
resources/stylesheets/snapshot.css

index a2cbc157b3e66c768f8803f2203806e119746735..bbca135b9170cd8350fc5cb32be7e6b9a8bf87a3 100644 (file)
               markerPanelContents.init(selectedEntity, layer);
               sidebar.selectedChild = markerPanel;
             } else if (connection is SnapshotConnection) {
-              backgroundPanelContents.init(selectedEntity, layer);
+              backgroundPanelContents.init(selectedEntity);
               sidebar.selectedChild = backgroundPanel;
             } else {
               refreshFeatureIcon();
index d8827f1a0e7d072d537ae33c0be212e98175de06..a68da1bb09e428e465e1bdd650c6fc3eded8de6c 100644 (file)
@@ -6,19 +6,23 @@
     the background layer can be easily merged.
 -->
 
-<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" height="100%">
-  <mx:Text id="backgroundMergePanelText" text="Review and Merge tags from the Background layer" width="100%" styleName="helpInfo" />
+<mx:VBox
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark"
+    height="100%">
+  <s:RichText id="backgroundMergePanelText" width="100%">Review and Merge tags from the Background layer</s:RichText>
   <mx:DataGrid editable="false" id="backgroundPanelDG" width="100%" height="50%">
     <mx:columns>
       <mx:DataGridColumn editable="false" dataField="k" headerText="Key" />
       <mx:DataGridColumn editable="false" dataField="e" headerText="OSM value" />
-      <mx:DataGridColumn editable="false" headerText="Merge" width="50" textAlign="center">
+      <mx:DataGridColumn editable="false" headerText="Merge" width="150" textAlign="center">
         <mx:itemRenderer>
-          <mx:Component>
-            <mx:HBox horizontalAlign="center" verticalAlign="middle">
-              <mx:Button label="&lt;&lt;" visible="{parentDocument.buttonVisible(data.b, data.e)}" click="parentDocument.mergeForKey(data.k);" />
+          <fx:Component>
+            <mx:HBox horizontalAlign="center" verticalAlign="middle" width="100%">
+              <s:Button width="50" label="&lt;&lt;" visible="{parentDocument.buttonVisible(data.b, data.e)}" click="parentDocument.mergeForKey(data.k);" />
             </mx:HBox>
-          </mx:Component>
+          </fx:Component>
         </mx:itemRenderer>
       </mx:DataGridColumn>
       <mx:DataGridColumn editable="false" itemRenderer="net.systemeD.potlatch2.panels.BackgroundMergeFieldComponent" dataField="b" headerText="Background value" />
   <mx:ViewStack id="statusStack" resizeToContent="true" width="100%">
     <mx:VBox id="empty" />
     <mx:VBox id="not_complete">
-      <mx:Text text="All the data copied to the main layer? Click 'complete'!" />
-      <mx:Button label="Complete" click="markComplete()"/>
+      <s:VGroup width="100%">
+        <s:RichText width="100%">If all the information from this feature is accounted for in the main layer, you can mark this feature as 'complete'.</s:RichText>
+        <s:RichText width="100%">This lets other contributors see what still needs reconciling.</s:RichText>
+        <s:Button label="Mark feature as Complete" click="markComplete()"/>
+      </s:VGroup>
     </mx:VBox>
-    <mx:VBox id="complete">
-      <mx:Text text="This feature has been marked as complete. If this is wrong, press the button below." />
-      <mx:Button label="Not complete" click="markNotComplete()"/>
+    <mx:VBox id="complete" width="100%">
+      <s:VGroup width="100%">
+        <s:RichText width="100%">This feature has been marked as 'complete'. If this is incorrect, and there is still reconciling required, you can mark this feature as 'not complete'.</s:RichText>
+        <s:Button label="Mark feature as Not complete" click="markNotComplete()"/>
+      </s:VGroup>
     </mx:VBox>
   </mx:ViewStack>
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
 
       import net.systemeD.halcyon.connection.*;
       import net.systemeD.halcyon.MapPaint;
           }
       }
   ]]>
-  </mx:Script>
+  </fx:Script>
 </mx:VBox>
\ No newline at end of file
index b6c9348c1c68a0efc4c346717728fbae2eab2783..394f400cf5a4c6a60665bf862670d3c21459ec14 100644 (file)
@@ -7,38 +7,49 @@
 <mx:VBox
     xmlns:fx="http://ns.adobe.com/mxml/2009"
     xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark"
     height="100%">
-  <mx:Text id="backgroundPanelText" text="You have selected a Background Feature." width="100%" styleName="helpInfo" />
+  <s:VGroup width="100%">
+    <s:RichText width="100%" id="backgroundPanelText" text="You have selected a Background Feature." />
+    <s:RichText text="{connectionName}" />
+  </s:VGroup>
   <mx:DataGrid editable="false" id="backgroundPanelDG" width="100%" height="50%">
     <mx:columns>
       <mx:DataGridColumn editable="false" dataField="key" headerText="key" />
       <mx:DataGridColumn editable="false" dataField="value" headerText="value" />
     </mx:columns>
   </mx:DataGrid>
+  <s:VGroup width="100%">
+    <s:RichText width="100%">You can see a side-by-side tagging comparison by ctrl+clicking a feature on the main layer.</s:RichText>
+  </s:VGroup>
   <mx:ViewStack id="statusStack" resizeToContent="true" width="100%">
     <mx:VBox id="empty" />
-    <mx:VBox id="not_complete">
-      <mx:Text text="All the data copied to the main layer? Click 'complete'!" />
-      <mx:Button label="Complete" click="markComplete()"/>
+    <mx:VBox id="not_complete" width="100%">
+      <s:VGroup width="100%">
+        <s:RichText width="100%">If all the information from this feature is accounted for in the main layer, you can mark this feature as 'complete'.</s:RichText>
+        <s:RichText width="100%">This lets other contributors see what still needs reconciling.</s:RichText>
+        <s:Button label="Mark feature as Complete" click="markComplete()"/>
+      </s:VGroup>
     </mx:VBox>
-    <mx:VBox id="complete">
-      <mx:Text text="This feature has been marked as complete. If this is wrong, press the button below." />
-      <mx:Button label="Not complete" click="markNotComplete()"/>
+    <mx:VBox id="complete" width="100%">
+      <s:VGroup width="100%">
+        <s:RichText width="100%">This feature has been marked as 'complete'. If this is incorrect, and there is still reconciling required, you can mark this feature as 'not complete'.</s:RichText>
+        <s:Button label="Mark feature as Not complete" click="markNotComplete()"/>
+      </s:VGroup>
     </mx:VBox>
   </mx:ViewStack>
   <fx:Script><![CDATA[
 
       import net.systemeD.halcyon.connection.*;
-      import net.systemeD.halcyon.MapPaint;
       import net.systemeD.potlatch2.utils.SnapshotConnection;
       import mx.collections.*;
 
       private var selectedEntity:Entity;
       private var tagDataProvider:ArrayCollection;
-      private var layer:MapPaint;
+      [Bindable]
+      private var connectionName:String;
 
-      public function init(entity:Entity, layer:MapPaint):void {
-          this.layer = layer;
+      public function init(entity:Entity):void {
           if ( tagDataProvider == null ) {
               tagDataProvider = new ArrayCollection();
               backgroundPanelDG.dataProvider = tagDataProvider;
@@ -46,6 +57,7 @@
 
           selectedEntity=entity;
           selectedEntity.addEventListener(Connection.STATUS_CHANGED, statusEvent, false, 0, true);
+          connectionName = selectedEntity.connection.name;
           setStatusStack();
           updateTagDataProvider();
       }
index ef9442782779b9c0c5d6513fc76edfc6840225cf..5450546e3a9cefb52e2699637d78e95b82eb4fe6 100644 (file)
@@ -4,21 +4,23 @@
 
 */
 
-way :hover     { z-index: 2; width: 1; color: yellow; }
-way :selected { z-index: 2; width: 2; color: yellow; }
-way !:drawn { z-index:10; width: 1; color: black; }
-
-node :selectedway { z-index: 8; icon-image: square; icon-width: 6; color: green; }
-node :hoverway { z-index: 9; icon-image: square; icon-width: 6; color: blue; }
-node :selected { z-index: 9; icon-image: square; icon-width: 6; color: red; casing-color: black; casing-width: 1; }
-node !:drawn :poi { z-index: 2; icon-image: square; icon-width: 4; color: green; casing-color: black; casing-width: 1; }
-node !:drawn :hasTags { z-index: 9; icon-image: circle; icon-width: 3; color: black; }
-node :hasTags :selectedway { z-index: 9; icon-image: square; icon-width: 8; color: black; layer: 5; }
-
-way[_status=incomplete]::statushighlight { z-index: 0; width: 10; color: #d95f02; }
-way[_status=complete]::statushighlight { z-index: 0; width: 10; color: #1b9e77; opacity: 0.4; }
-node[_status=incomplete]::statushighlight :hasTags { z-index: 0; icon-image: square; icon-width: 10; color: #d95f02; }
-node[_status=complete]::statushighlight :hasTags { z-index: 0; icon-image: square; icon-width: 10; color: #1b9e77; opacity: 0.4; }
+way :hover     { z-index: 2; width: 14; color: yellow; linecap: round; }
+way :selected { z-index: 2; width: 14; color: yellow; linecap: round; }
+way !:drawn { z-index: 1; width: 14; color: #444444; linecap: round; }
+
+node :selectedway { z-index: 8; icon-image: circle; icon-width: 8; color: green; }
+node :hoverway { z-index: 9; icon-image: circle; icon-width: 8; color: blue; }
+node :selected { z-index: 9; icon-image: circle; icon-width: 8; color: red; casing-color: black; casing-width: 1; }
+node !:drawn :poi { z-index: 6; icon-image: circle; icon-width: 8; color: green; casing-color: black; casing-width: 1; }
+node !:drawn :hasTags { z-index: 9; icon-image: circle; icon-width: 8; color: black; }
+node :hasTags :selectedway { z-index: 9; icon-image: circle; icon-width: 8; color: black; }
+
+way[_status=incomplete]::statushighlight { z-index: 0; width: 20; color: #d95f02; linecap: round; }
+way[_status=complete]::statushighlight { z-index: 0; width: 18; color: #1b9e77; opacity: 0.4; linecap: round; }
+way[_status=complete] { opacity: 0.7; }
+node[_status=incomplete]::statushighlight :hasTags { z-index: 5; icon-image: circle; icon-width: 12; color: #d95f02; }
+node[_status=complete]::statushighlight :hasTags { z-index: 5; icon-image: circle; icon-width: 10; color: #1b9e77; opacity: 0.4; }
+node[_status=complete] { opacity: 0.7; }