Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(448)

Unified Diff: app/views/environment.js

Issue 6971045: Panzoom Module
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/templates/overview.handlebars ('k') | app/views/topology/mega.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/views/environment.js
=== modified file 'app/views/environment.js'
--- app/views/environment.js 2012-12-11 03:58:03 +0000
+++ app/views/environment.js 2012-12-19 13:45:10 +0000
@@ -23,7 +23,9 @@
{
initializer: function() {
console.log('View: Initialized: Env');
- this.publish('navigateTo', {preventable: false});
+ this.publish('navigateTo', {
+ broadcast: true,
+ preventable: false});
},
render: function() {
@@ -48,18 +50,24 @@
container: container});
// Bind all the behaviors we need as modules.
topo.addModule(views.MegaModule);
+ topo.addModule(views.PanZoomModule);
topo.addTarget(this);
this.topo = topo;
}
+
topo.render();
return this;
},
- // XXX: This method is a pass through,
- // it will be removed when we move to
- // incremental rendering.
+
postRender: function() {
- this.topo.modules.MegaModule.postRender();
+ this.topo.attachContainer();
+ this.topo.fire('rendered');
+ // Bind d3 events (manually)
+ // this needs to be postRender and
+ // the jiggle in phases has broken
+ // the existing (from change to showView)
+ this.topo.bindAllD3Events();
}
}, {
ATTRS: {}
@@ -68,15 +76,15 @@
views.environment = EnvironmentView;
}, '0.1.0', {
requires: ['juju-templates',
- 'juju-view-utils',
- 'juju-models',
- 'd3',
- 'd3-components',
- 'base-build',
- 'handlebars-base',
- 'node',
- 'svg-layouts',
- 'event-resize',
- 'slider',
- 'view']
+ 'juju-view-utils',
+ 'juju-models',
+ 'd3',
+ 'd3-components',
+ 'base-build',
+ 'handlebars-base',
+ 'node',
+ 'svg-layouts',
+ 'event-resize',
+ 'slider',
+ 'view']
});
« no previous file with comments | « app/templates/overview.handlebars ('k') | app/views/topology/mega.js » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 204d58d