# HG changeset patch # User rougeronj # Date 1442418847 -7200 # Node ID 03aa989092bbd64703a9126aecec39ac875134d1 # Parent 904effa4b6d75f5a4f99a2dc12960f93db4e84ae rename idView to viewIndex diff -r 904effa4b6d7 -r 03aa989092bb client/js/renderer/scene.js --- a/client/js/renderer/scene.js Wed Sep 16 17:36:46 2015 +0200 +++ b/client/js/renderer/scene.js Wed Sep 16 17:54:07 2015 +0200 @@ -1209,8 +1209,8 @@ } return; } - if (typeof _params.idView !== 'undefined'){ - this.view = this.addRepresentation("View", this.renkan.project.get("views").at(this.validViewIndex(_params.idView))); + if (typeof _params.viewIndex !== 'undefined'){ + this.view = this.addRepresentation("View", this.renkan.project.get("views").at(this.validViewIndex(_params.viewIndex))); if (!this.renkan.options.default_view){ this.view.autoScale(); } diff -r 904effa4b6d7 -r 03aa989092bb client/js/renderer/viewrepr.js --- a/client/js/renderer/viewrepr.js Wed Sep 16 17:36:46 2015 +0200 +++ b/client/js/renderer/viewrepr.js Wed Sep 16 17:54:07 2015 +0200 @@ -203,13 +203,13 @@ result.view = Math.round(this.offset.x*1000)/1000 + ',' + Math.round(this.offset.y*1000)/1000 + ',' + Math.round(this.scale*1000)/1000; if (this.renkan.project.get("views").indexOf(this.model) > -1){ - result.idView = this.renkan.project.get("views").indexOf(this.model); - if (result.idView === this.renkan.project.get("views").length - 1){ - result.idView = -1; + result.viewIndex = this.renkan.project.get("views").indexOf(this.model); + if (result.viewIndex === this.renkan.project.get("views").length - 1){ + result.viewIndex = -1; } } else { - if (result.idView){ - delete result.idView; + if (result.viewIndex){ + delete result.viewIndex; } } this.renkan.router.navigate("?" + decodeURIComponent($.param(result)), {trigger: false, replace: true});