Changeset 90 for gssim_ui/branches


Ignore:
Timestamp:
10/07/11 14:23:36 (14 years ago)
Author:
mcichenski
Message:

auto image place
visible area rectangle color changed to green
test on images taken from internet (5x5 matrix)

Location:
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/ScheduleViewerTest.mxml

    r15 r90  
    1818                        protected function application1_creationCompleteHandler(event:FlexEvent):void 
    1919                        { 
    20                                 var img : Image = img1; 
    21                                 img.x = 0; 
    22                                 img.y = 0; 
    23                                 this.removeChild(img1); 
    24                                 mimg.addImage(img); 
    25                                 var img : Image = img2; 
    26                                 img.x = img1.width; 
    27                                 img.y = 0; 
    28                                 this.removeChild(img2); 
    29                                 mimg.addImage(img); 
    30                                 var img : Image = img3; 
    31                                 img.x = img1.width; 
    32                                 img.y = img1.height; 
    33                                 this.removeChild(img3); 
    34                                 mimg.addImage(img); 
    35                                 var img : Image = img4; 
    36                                 img.x = 0; 
    37                                 img.y = img1.height; 
    38                                 this.removeChild(img4); 
    39                                 mimg.addImage(img); 
     20                                for (var j : Number = 0; j < 5; j++) 
     21                                { 
     22                                        for (var i : Number = 0; i < 5; i++) 
     23                                        { 
     24                                                var img : Image = new Image(); 
     25                                                img.source = "http://www.desktopmedia.eu/data/media/22/Tiger-fractal-in-Blue.jpg"; 
     26                                                img.width = 1920; 
     27                                                img.height = 1200; 
     28                                                mimg.addImage(img); 
     29                                        } 
     30                                        mimg.addRow(); 
     31                                } 
    4032                                nav.container = mimg; 
    4133                        } 
     
    4335                ]]> 
    4436        </mx:Script> 
    45          
    46         <mx:Image source="assets/gannt.png" id="img1"/> 
    47         <mx:Image source="assets/gannt.png" id="img2"/> 
    48         <mx:Image source="assets/gannt.png" id="img3"/> 
    49         <mx:Image source="assets/gannt.png" id="img4"/> 
    5037         
    5138        <mx:HBox> 
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/gssim/components/MultiImageContainer.mxml

    r88 r90  
    1717                         
    1818                        private var images : ArrayCollection = new ArrayCollection(); 
     19                        private var firstInCurrentRow : Image; 
     20                        private var lastInCurrentRow : Image; 
    1921                         
    2022                        public function get gallery() : ArrayCollection 
     
    5759                        public function addImage(img : Image) : void 
    5860                        { 
     61                                if (images.length > 0) 
     62                                { 
     63                                        img.x = (lastInCurrentRow == null ? 0 : lastInCurrentRow.width + lastInCurrentRow.x);  
     64                                        img.y = (firstInCurrentRow == null ? 0 : firstInCurrentRow.height + firstInCurrentRow.y); 
     65                                } 
     66                                lastInCurrentRow = img; 
    5967                                images.addItem(img); 
    6068                                this.addElement(img); 
     69                        } 
     70                         
     71                        public function addRow() : void 
     72                        { 
     73                                firstInCurrentRow = images.getItemAt(images.length - 1) as Image; 
     74                                lastInCurrentRow = null; 
    6175                        } 
    6276                         
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/gssim/components/MultiImageNavigator.mxml

    r89 r90  
    4545                                rectangle.height = 50; 
    4646                                rectangle.radiusX = 0; 
    47                                 var rectangleFill : SolidColor = new SolidColor(ColorKeys.BLACK); 
     47                                var rectangleFill : SolidColor = new SolidColor(ColorKeys.GREEN); 
    4848                                rectangleFill.alpha = 0.3; 
    4949                                rectangle.fill = rectangleFill; 
Note: See TracChangeset for help on using the changeset viewer.