Changeset 291


Ignore:
Timestamp:
03/29/09 23:09:12 (9 years ago)
Author:
tschaub
Message:

basic viewer constructor

Location:
apps/opengeo/geoexplorer/trunk
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • apps/opengeo/geoexplorer/trunk/debug.html

    r254 r291  
    1717
    1818        <!-- GeoExplorer resources -->
     19        <script type="text/javascript" src="lib/Viewer.js"></script>
    1920        <script type="text/javascript" src="lib/GeoExplorer.js"></script>
    2021        <script type="text/javascript" src="lib/GeoExplorer/dispatch.js"></script>
  • apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js

    r285 r291  
    11/**
    22 * Copyright (c) 2008 The Open Planning Project
     3 *
     4 * @requires Viewer.js
    35 */
    46
     
    2527 *
    2628 * Extends:
    27  *  - Ext.util.Observable
     29 *  - Viewer
    2830 */
    29 var GeoExplorer = function(config) {
    30    
    31     this.initialConfig = Ext.apply({}, config);
    32    
    33     // add any custom application events
    34     this.addEvents(
    35         /**
    36          * Event: ready
    37          * Fires when the entire application is ready.
    38          */
    39         "ready"
    40     );
    41    
    42     this.load();
    43    
    44 };
    45 
    46 Ext.extend(GeoExplorer, Ext.util.Observable, {
     31var GeoExplorer = Ext.extend(Viewer, {
    4732   
    4833    /**
     
    6550     */
    6651    load: function() {
    67         GeoExplorer.dispatch(
    68             [
    69                 function(done) {
    70                     Ext.onReady(function() {
    71                         this.createLayout();
    72                         done();
    73                     }, this);
    74                 }
    75                 // other functions to be executed in parallel can go here
    76             ], function() {
    77                 // executed when all of the above are done
    78                 this.fireEvent("ready");
    79             },
    80             this // scope for all above functions
    81         );
     52        Ext.onReady(this.createLayout, this);
    8253    },
    8354   
Note: See TracChangeset for help on using the changeset viewer.