client/js/renderer/scene.js
changeset 361 a31875be59cf
parent 357 70e577b0cdc6
child 364 4b37ff239933
equal deleted inserted replaced
360:56e47b1d5ffe 361:a31875be59cf
   330         });
   330         });
   331         
   331         
   332         this.renkan.project.on("add:users remove:users", _thRedrawUsers);
   332         this.renkan.project.on("add:users remove:users", _thRedrawUsers);
   333 
   333 
   334         this.renkan.project.on("add:views remove:views", function(_node) {
   334         this.renkan.project.on("add:views remove:views", function(_node) {
   335         	_this.renkan.project.set({dirty:true});
       
   336             if(_this.renkan.project.get('views').length > 0) {
   335             if(_this.renkan.project.get('views').length > 0) {
   337                 _this.$.find(".Rk-ZoomSetSaved").show();
   336                 _this.$.find(".Rk-ZoomSetSaved").show();
   338             }
   337             }
   339             else {
   338             else {
   340                 _this.$.find(".Rk-ZoomSetSaved").hide();
   339                 _this.$.find(".Rk-ZoomSetSaved").hide();
   341             }
   340             }
   342         });
   341         });
   343 
   342 
   344         this.renkan.project.on("add:nodes", function(_node) {
   343         this.renkan.project.on("add:nodes", function(_node) {
   345         	_this.renkan.project.set({dirty:true});
       
   346             _this.addRepresentation("Node", _node);
   344             _this.addRepresentation("Node", _node);
   347             _thRedraw();
   345             _thRedraw();
   348         });
   346         });
   349         this.renkan.project.on("add:edges", function(_edge) {
   347         this.renkan.project.on("add:edges", function(_edge) {
   350         	_this.renkan.project.set({dirty:true});
       
   351             _this.addRepresentation("Edge", _edge);
   348             _this.addRepresentation("Edge", _edge);
   352             _thRedraw();
   349             _thRedraw();
   353         });
   350         });
   354         this.renkan.project.on("change:title", function(_model, _title) {
   351         this.renkan.project.on("change:title", function(_model, _title) {
   355         	_this.renkan.project.set({dirty:true});
       
   356             var el = _this.$.find(".Rk-PadTitle");
   352             var el = _this.$.find(".Rk-PadTitle");
   357             if (el.is("input")) {
   353             if (el.is("input")) {
   358                 if (el.val() !== _title) {
   354                 if (el.val() !== _title) {
   359                     el.val(_title);
   355                     el.val(_title);
   360                 }
   356                 }