diff -r e457ec945e50 -r 0d5998b32a7c client/js/renderer/edgeeditor.js --- a/client/js/renderer/edgeeditor.js Sat Apr 25 04:13:53 2015 +0200 +++ b/client/js/renderer/edgeeditor.js Sat Apr 25 04:37:06 2015 +0200 @@ -10,11 +10,11 @@ var EdgeEditor = Utils.inherit(BaseEditor); _(EdgeEditor.prototype).extend({ - _init: function() { - BaseEditor.prototype._init.apply(this); - this.template = this.options.templates['templates/edgeeditor.html']; - this.readOnlyTemplate = this.options.templates['templates/edgeeditor_readonly.html']; - }, + _init: function() { + BaseEditor.prototype._init.apply(this); + this.template = this.options.templates['templates/edgeeditor.html']; + this.readOnlyTemplate = this.options.templates['templates/edgeeditor_readonly.html']; + }, draw: function() { var _model = this.source_representation.model, _from_model = _model.get("from"), @@ -57,21 +57,21 @@ if (this.renderer.isEditable()) { var onFieldChange = _.throttle(function() { - _.defer(function() { - if (_this.renderer.isEditable()) { - var _data = { + _.defer(function() { + if (_this.renderer.isEditable()) { + var _data = { title: _this.editor_$.find(".Rk-Edit-Title").val() - }; - if (_this.options.show_edge_editor_uri) { - _data.uri = _this.editor_$.find(".Rk-Edit-URI").val(); + }; + if (_this.options.show_edge_editor_uri) { + _data.uri = _this.editor_$.find(".Rk-Edit-URI").val(); + } + _this.editor_$.find(".Rk-Edit-Goto").attr("href",_data.uri || "#"); + _model.set(_data); + paper.view.draw(); + } else { + closeEditor(); } - _this.editor_$.find(".Rk-Edit-Goto").attr("href",_data.uri || "#"); - _model.set(_data); - paper.view.draw(); - } else { - closeEditor(); - } - }); + }); },500); this.editor_$.on("keyup", function(_e) { @@ -144,7 +144,6 @@ paper.view.draw(); } }).value(); -// }); /* EdgeEditor End */