diff -r b38cf3d4cf1f -r 423bdf56d103 client/js/renderer/edgeeditor.js --- a/client/js/renderer/edgeeditor.js Mon Jun 01 11:53:03 2015 +0200 +++ b/client/js/renderer/edgeeditor.js Tue Jun 02 00:39:47 2015 +0200 @@ -29,11 +29,12 @@ uri: _model.get("uri"), short_uri: Utils.shortenText((_model.get("uri") || "").replace(/^(https?:\/\/)?(www\.)?/,'').replace(/\/$/,''),40), description: _model.get("description"), - color: _model.get("color") || _created_by.get("color"), + color: (_model.has("style") && _model.get("style").color) || _created_by.get("color"), + dash: _model.has("style") && _model.get("style").dash ? "checked" : "", from_title: _from_model.get("title"), to_title: _to_model.get("title"), - from_color: _from_model.get("color") || (_from_model.get("created_by") || Utils._USER_PLACEHOLDER(this.renkan)).get("color"), - to_color: _to_model.get("color") || (_to_model.get("created_by") || Utils._USER_PLACEHOLDER(this.renkan)).get("color"), + from_color: (_from_model.has("style") && _from_model.get("style").color) || (_from_model.get("created_by") || Utils._USER_PLACEHOLDER(this.renkan)).get("color"), + to_color: (_to_model.has("style") && _to_model.get("style").color) || (_to_model.get("created_by") || Utils._USER_PLACEHOLDER(this.renkan)).get("color"), created_by_color: _created_by.get("color"), created_by_title: _created_by.get("title") }, @@ -65,6 +66,10 @@ if (_this.options.show_edge_editor_uri) { _data.uri = _this.editor_$.find(".Rk-Edit-URI").val(); } + if (_this.options.show_node_editor_style) { + var dash = _this.editor_$.find(".Rk-Edit-Dash").is(':checked'); + _data.style = _.assign( ((_model.has("style") && _.clone(_model.get("style"))) || {}), {dash: dash}); + } _this.editor_$.find(".Rk-Edit-Goto").attr("href",_data.uri || "#"); _model.set(_data); paper.view.draw(); @@ -123,12 +128,12 @@ }, function(_e) { _e.preventDefault(); - _this.editor_$.find(".Rk-Edit-Color").css("background", _model.get("color") || (_model.get("created_by") || Utils._USER_PLACEHOLDER(_this.renkan)).get("color")); + _this.editor_$.find(".Rk-Edit-Color").css("background", (_model.has("style") && _model.get("style").color)|| (_model.get("created_by") || Utils._USER_PLACEHOLDER(_this.renkan)).get("color")); } ).click(function(_e) { _e.preventDefault(); if (_this.renderer.isEditable()) { - _model.set("color", $(this).attr("data-color")); + _model.set("style", _.assign( ((_model.has("style") && _.clone(_model.get("style"))) || {}), {color: $(this).attr("data-color")})); _picker.hide(); paper.view.draw(); } else {