equal
deleted
inserted
replaced
55 _this.params = { |
55 _this.params = { |
56 "zoom_level": _this.model.get("zoom_level"), |
56 "zoom_level": _this.model.get("zoom_level"), |
57 "offset": _this.model.get("offset"), |
57 "offset": _this.model.get("offset"), |
58 "hidden_nodes": _this.model.get("hidden_nodes") |
58 "hidden_nodes": _this.model.get("hidden_nodes") |
59 }; |
59 }; |
|
60 _this.updateUrl(); |
60 }); |
61 }); |
61 |
62 |
62 this.$.find(".Rk-ZoomSetSaved").click( function() { |
63 this.$.find(".Rk-ZoomSetSaved").click( function() { |
63 _this.setScale(_this.params.zoom_level, new paper.Point(_this.params.offset)); |
64 _this.setScale(_this.params.zoom_level, new paper.Point(_this.params.offset)); |
64 _this.showNodes(false); |
65 _this.showNodes(false); |
194 if (parameters.length > 1){ |
195 if (parameters.length > 1){ |
195 parameters[1].split("&").forEach(function(part) { |
196 parameters[1].split("&").forEach(function(part) { |
196 var item = part.split("="); |
197 var item = part.split("="); |
197 result[item[0]] = decodeURIComponent(item[1]); |
198 result[item[0]] = decodeURIComponent(item[1]); |
198 }); |
199 }); |
199 } |
200 } |
200 result.view = Math.round(this.offset.x*1000)/1000 + ',' + Math.round(this.offset.y*1000)/1000 + ',' + Math.round(this.scale*1000)/1000; |
201 result.view = Math.round(this.offset.x*1000)/1000 + ',' + Math.round(this.offset.y*1000)/1000 + ',' + Math.round(this.scale*1000)/1000; |
201 // if (this.hiddenNodes.length > 0){ |
202 |
202 // result.hiddenNodes = this.hiddenNodes.join(); |
203 if (this.renkan.project.get("views").indexOf(this.model) > -1){ |
203 // } |
204 result.idView = this.renkan.project.get("views").indexOf(this.model); |
|
205 } else { |
|
206 if (result.idView){ |
|
207 delete result.idView; |
|
208 } |
|
209 } |
204 this.renkan.router.navigate("?" + decodeURIComponent($.param(result)), {trigger: false, replace: true}); |
210 this.renkan.router.navigate("?" + decodeURIComponent($.param(result)), {trigger: false, replace: true}); |
205 } |
211 } |
206 }, |
212 }, |
207 }).value(); |
213 }).value(); |
208 |
214 |