lib/Models/NowViewing.js
function(terria) {
  this._terria = terria;
  this._eventSubscriptions = new EventHelper();

  /**
   * Gets the list of items that we are "now viewing".  It is recommended that you use
   * the methods on this instance instead of manipulating the list of items directly.
   * This property is observable.
   * @type {CatalogItem[]}
   */
  this.items = [];

  knockout.track(this, ["items"]);

  this.showNowViewingRequested = new CesiumEvent();

  this._eventSubscriptions.add(
    this.terria.beforeViewerChanged,
    function() {
      beforeViewerChanged(this);
    },
    this
  );

  this._eventSubscriptions.add(
    this.terria.afterViewerChanged,
    function() {
      afterViewerChanged(this);
    },
    this
  );
}
function(terria) {
  this._terria = terria;
  this._eventSubscriptions = new EventHelper();

  /**
   * Gets the list of items that we are "now viewing".  It is recommended that you use
   * the methods on this instance instead of manipulating the list of items directly.
   * This property is observable.
   * @type {CatalogItem[]}
   */
  this.items = [];

  knockout.track(this, ["items"]);

  this.showNowViewingRequested = new CesiumEvent();

  this._eventSubscriptions.add(
    this.terria.beforeViewerChanged,
    function() {
      beforeViewerChanged(this);
    },
    this
  );

  this._eventSubscriptions.add(
    this.terria.afterViewerChanged,
    function() {
      afterViewerChanged(this);
    },
    this
  );
}
function ( terria ) { this . _terria = terria ; this . _eventSubscriptions = new EventHelper ( ) ; /**
   * Gets the list of items that we are "now viewing".  It is recommended that you use
   * the methods on this instance instead of manipulating the list of items directly.
   * This property is observable.
   * @type {CatalogItem[]}
   */ this . items = [ ] ; knockout . track ( this , [ "items" ] ) ; this . showNowViewingRequested = new CesiumEvent ( ) ; this . _eventSubscriptions . add ( this . terria . beforeViewerChanged , function ( ) { beforeViewerChanged ( this ) ; } , this ) ; this . _eventSubscriptions . add ( this . terria . afterViewerChanged , function ( ) { afterViewerChanged ( this ) ; } , this ) ; }
The model for the "Now Viewing" pane.
The model for the Now Viewing pane .