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

Unified Diff: app/app.js

Issue 6971045: Panzoom Module
Patch Set: Panzoom Module Created 12 years, 4 months 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 | « [revision details] ('k') | app/assets/javascripts/d3-components.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/app.js
=== modified file 'app/app.js'
--- app/app.js 2012-12-14 20:25:16 +0000
+++ app/app.js 2012-12-19 13:45:10 +0000
@@ -537,37 +537,22 @@
* @method show_environment
*/
show_environment: function(req, res, next) {
- var view = this.getViewInfo('environment'),
- instance = view.instance,
- self = this;
- if (!instance) {
- console.log('new env view');
- this.showView('environment',
- { getModelURL: Y.bind(this.getModelURL, this),
- /** A simple closure so changes to the value are available.*/
- getServiceEndpoints: function() {return self.serviceEndpoints;},
- loadService: this.loadService,
- db: this.db,
- env: this.env},
- {render: true});
- } else {
- /* The current impl makes extensive use of
- * event handlers which are not being properly rebound
- * when the view is attached. There is a workable pattern
- * to enable this but we have to land the basics of this branch
- * first.
- */
- this.showView('environment',
- { getModelURL: Y.bind(this.getModelURL, this),
- /** A simple closure so changes to the value are available.*/
- getServiceEndpoints: function() {return self.serviceEndpoints;},
- loadService: this.loadService,
- db: this.db,
- env: this.env},
- { update: false,
- render: true,
- callback: function(view) {view.postRender();}});
- }
+ var self = this,
+ view = this.getViewInfo('environment'),
+ options = {
+ getModelURL: Y.bind(this.getModelURL, this),
+ /** A simple closure so changes to the value are available.*/
+ getServiceEndpoints: function() {
+ return self.serviceEndpoints;},
+ loadService: this.loadService,
+ db: this.db,
+ env: this.env};
+
+ this.showView('environment', options, {
+ callback: function() {
+ this.views.environment.instance.postRender();
+ },
+ render: true});
},
/**
« no previous file with comments | « [revision details] ('k') | app/assets/javascripts/d3-components.js » ('j') | no next file with comments »

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