Author: Christian Lopes
Date: 2010-01-19 15:11:02 -0800 (Tue, 19 Jan 2010)
New Revision: 18968

Modified:
   cytoscapeweb/trunk/cytoscapeweb/default.properties
   
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/model/data/VisualStyleVO.as
   cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/PanZoomMediator.as
   
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/GraphView.as
   
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/PanZoomBox.mxml
   
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/SubGraphView.as
Log:
- Decreased the min. zoom value from 10% to 1% (see Mantis #2130).
- Added default Passthrough Mapper to edge labels. 

Modified: cytoscapeweb/trunk/cytoscapeweb/default.properties
===================================================================
--- cytoscapeweb/trunk/cytoscapeweb/default.properties  2010-01-19 23:05:15 UTC 
(rev 18967)
+++ cytoscapeweb/trunk/cytoscapeweb/default.properties  2010-01-19 23:11:02 UTC 
(rev 18968)
@@ -1,3 +1,3 @@
-build.version=0.3
+build.version=0.3.1
 
 FLEX_HOME=/Applications/Adobe Flex Builder 3 Plug-in/sdks/3.2.0/
\ No newline at end of file

Modified: 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/model/data/VisualStyleVO.as
===================================================================
--- 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/model/data/VisualStyleVO.as
    2010-01-19 23:05:15 UTC (rev 18967)
+++ 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/model/data/VisualStyleVO.as
    2010-01-19 23:11:02 UTC (rev 18968)
@@ -99,6 +99,7 @@
                                                      { attrValue: "false", 
value: ArrowShapes.NONE } ]
                         }
                     },
+                    label: { passthroughMapper: { attrName: "label" } },
                     labelHorizontalAnchor: "center",
                     labelVerticalAnchor: "middle",
                     labelXOffset: 0,

Modified: 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/PanZoomMediator.as
===================================================================
--- 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/PanZoomMediator.as    
    2010-01-19 23:05:15 UTC (rev 18967)
+++ 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/PanZoomMediator.as    
    2010-01-19 23:11:02 UTC (rev 18968)
@@ -55,6 +55,7 @@
         
         private var _panTimer:Timer = new Timer(16);
         private var _pressedPanButton:Button;
+        private var _ignoreZoomChange:Boolean;
         
         private function get panZoomBox():PanZoomBox {
             return viewComponent as PanZoomBox;
@@ -159,15 +160,15 @@
            }
            
            private function onZoomSliderChange(e:SliderEvent):void {
-               sendNotification(ApplicationFacade.ZOOM_GRAPH, e.value/100);
+                sendNotification(ApplicationFacade.ZOOM_GRAPH, e.value/100);
            }
            
            private function onZoomInClick(e:Event):void {
-               var zoomValue:Number = zoomSlider.value;
+               var zoomValue:Number = Math.round(graphProxy.zoom*10000)/100;
                
                if (zoomValue < zoomSlider.maximum) {
                 var tickValues:Array = zoomSlider.tickValues;
-                for (var i:int = 0; i < tickValues.length - 1; i++) {
+                for (var i:int = 0; i < tickValues.length - 1; i++) {trace(i+" 
: "+ zoomValue+" - "+tickValues[i]+" | "+tickValues[i+1]);
                        // Get the next larger tick value of the pre-defined 
range:
                        if (zoomValue >= tickValues[i] && zoomValue < 
tickValues[i+1]) {
                                zoomValue = tickValues[i+1];
@@ -179,11 +180,11 @@
            }
            
            private function onZoomOutClick(e:Event):void {
-               var zoomValue:Number = zoomSlider.value;
+               var zoomValue:Number = Math.round(graphProxy.zoom*10000)/100;
                
                if (zoomValue > zoomSlider.minimum) {
                 var tickValues:Array = zoomSlider.tickValues;
-                for (var i:int = tickValues.length; i > 0; i--) {
+                for (var i:int = tickValues.length-1; i >= 0; i--) {trace(i+" 
: "+ zoomValue+" <= "+tickValues[i]+" && > "+tickValues[i-1]);
                     // Get the next lower tick value of the pre-defined range:
                     if (zoomValue <= tickValues[i] && zoomValue > 
tickValues[i-1]) {
                         zoomValue = tickValues[i-1];

Modified: 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/GraphView.as
===================================================================
--- 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/GraphView.as
   2010-01-19 23:05:15 UTC (rev 18967)
+++ 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/GraphView.as
   2010-01-19 23:11:02 UTC (rev 18968)
@@ -113,13 +113,6 @@
                evt.currentTarget.removeEventListener(evt.type, 
arguments.callee);
                evt.currentTarget.dispose();
                 dispatchEvent(new 
GraphViewEvent(GraphViewEvent.RENDER_COMPLETE));
-
-// TODO: remove                
-                //*****
-//                var bmp:BitmapData = new BitmapData(1, 1, false, 0xffffff);
-//                var storm:StormEmitter = new 
StormEmitter(Sprite(graphContainer.parent), width, height, bmp);
-//                storm.start();
-                //*****
             });
             par.play();
         }
@@ -168,7 +161,7 @@
         }
         
         public function zoomToFit():Number {
-               // Reset zoom first:
+                   // Reset zoom first:
                if (graphContainer.scaleX != 1)
                   zoomTo(1);
                

Modified: 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/PanZoomBox.mxml
===================================================================
--- 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/PanZoomBox.mxml
        2010-01-19 23:05:15 UTC (rev 18967)
+++ 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/PanZoomBox.mxml
        2010-01-19 23:11:02 UTC (rev 18968)
@@ -38,8 +38,8 @@
        import org.cytoscapeweb.view.components.slider.TrackSkin;
        import org.cytoscapeweb.view.components.slider.ThumbSkin;
        
-       private function dataTipFormat(value:Number):String{
-          return $('zoom.slider.datatip', Math.round(value));
+       private function toolTipFormat(value:Number, 
bundleKey:String='zoom.slider.datatip'):String {
+           return $(bundleKey, Math.round(value));
        }
 ]]>
 </mx:Script>
@@ -88,16 +88,16 @@
         <mx:GridRow>
             <mx:GridItem colSpan="3">
                 <mx:HSlider id="zoomSlider" width="76"
-                            minimum="10" maximum="300"
+                            minimum="1" maximum="300"
+                            dataTipPrecision="2"
+                            snapInterval="1"
                             liveDragging="true"
-                            dataTipPrecision="0"
-                            snapInterval="1"
-                            tickValues="{[10,25,50,75,100,125,150,200,300]}"
+                            tickValues="{[1,10,25,50,75,100,125,150,200,300]}"
                             tickLength="0"
                             tickOffset="4"
                             value="100"
-                            toolTip="{$('zoom.slider.tooltip', 
Math.round(zoomSlider.value))}"
-                            dataTipFormatFunction="{dataTipFormat}"
+                            toolTip="{toolTipFormat(zoomSlider.value, 
'zoom.slider.tooltip')}"
+                            dataTipFormatFunction="{toolTipFormat}"
                             trackSkin="{TrackSkin}"
                             thumbSkin="{ThumbSkin}"/>
             </mx:GridItem>

Modified: 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/SubGraphView.as
===================================================================
--- 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/SubGraphView.as
        2010-01-19 23:05:15 UTC (rev 18967)
+++ 
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/components/SubGraphView.as
        2010-01-19 23:11:02 UTC (rev 18968)
@@ -69,7 +69,7 @@
     import org.cytoscapeweb.view.layout.PresetLayout;
     import org.cytoscapeweb.view.render.Labeler;
     
-    // TODO: rename to "GraphView" and call GraphView "NetworkView"
+
     public class SubGraphView extends Visualization {
         
         // ========[ CONSTANTS 
]====================================================================

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.


Reply via email to