242 _this.renkan.project.addView( { zoom_level:_this.scale, offset:_this.offset, hidden_nodes: _this.hiddenNodes } ); |
242 _this.renkan.project.addView( { zoom_level:_this.scale, offset:_this.offset, hidden_nodes: _this.hiddenNodes } ); |
243 }); |
243 }); |
244 this.$.find(".Rk-ZoomSetSaved").click( function() { |
244 this.$.find(".Rk-ZoomSetSaved").click( function() { |
245 var view = _this.renkan.project.get("views").last(); |
245 var view = _this.renkan.project.get("views").last(); |
246 if(view){ |
246 if(view){ |
|
247 _this.showNodes(false); |
247 _this.setScale(view.get("zoom_level"), new paper.Point(view.get("offset"))); |
248 _this.setScale(view.get("zoom_level"), new paper.Point(view.get("offset"))); |
248 _this.hiddenNodes = view.get("hidden_nodes") || []; |
249 _this.hiddenNodes = (view.get("hidden_nodes") || []).concat(); |
249 _this.hideNodes(); |
250 _this.hideNodes(); |
250 } |
251 } |
251 }); |
252 }); |
252 this.$.find(".Rk-ShowHiddenNodes").mouseenter( function() { |
253 this.$.find(".Rk-ShowHiddenNodes").mouseenter( function() { |
253 _this.showNodes(true); |
254 _this.showNodes(true); |
254 _this.$.find(".Rk-ShowHiddenNodes").mouseleave( function() { |
255 _this.$.find(".Rk-ShowHiddenNodes").mouseleave( function() { |
255 _this.hideNodes(false); |
256 _this.hideNodes(); |
256 }); |
257 }); |
257 }); |
258 }); |
258 this.$.find(".Rk-ShowHiddenNodes").click( function() { |
259 this.$.find(".Rk-ShowHiddenNodes").click( function() { |
259 _this.showNodes(false); |
260 _this.showNodes(false); |
260 _this.$.find(".Rk-ShowHiddenNodes").off( "mouseleave" ); |
261 _this.$.find(".Rk-ShowHiddenNodes").off( "mouseleave" ); |