~bcsaller/juju-gui/phantom-testing

« back to all changes in this revision

Viewing changes to app/app.js

  • Committer: Benjamin Saller
  • Author(s): Benjamin Saller
  • Date: 2013-01-21 17:08:41 UTC
  • mfrom: (328.2.9 persistent-layout)
  • Revision ID: bcsaller@gmail.com-20130121170841-v93vkqfxgtgyfwuu
Tags: 0.1.5
Support for service positions from server

Provides support for loading initial and updated position 
from annotations stored on the server. Updates occur
via a shared codepath with the drag event handler
to ensure proper updates are applied over time.

There is still an issue with deltas interrupting the drag.

R=gary.poster, frankban
CC=
https://codereview.appspot.com/7132061

Show diffs side-by-side

added added

removed removed

Lines of Context:
325
325
      Y.log(evt, 'debug', 'App: Database changed');
326
326
 
327
327
      var self = this;
 
328
      var active = this.get('activeView');
328
329
 
329
330
      // Compare endpoints map against db to see if it needs to be changed.
330
331
      var updateNeeded = this.db.services.some(function(service) {
346
347
      }
347
348
 
348
349
      // Redispatch to current view to update.
349
 
      this.dispatch();
 
350
      if (active && active.name === 'EnvironmentView') {
 
351
        active.update();
 
352
      } else {
 
353
        this.dispatch();
 
354
      }
350
355
    },
351
356
 
352
357
    /**