close popup editor as soon as the node get hidden again
clean title text to remove html and keep only the text
--- a/client/js/renderer/noderepr.js Fri Sep 18 15:36:46 2015 +0200
+++ b/client/js/renderer/noderepr.js Fri Sep 18 15:37:50 2015 +0200
@@ -143,7 +143,14 @@
this.circle.opacity = this.options.show_node_circles ? opacity : 0.01;
- var _text = this.model.get("title") || this.renkan.translate(this.options.label_untitled_nodes) || "";
+
+ //strip html from title
+ var html = this.model.get("title");
+ var div = document.createElement("div");
+ div.innerHTML = html;
+ var clean_title = div.textContent || div.innerText || "";
+
+ var _text = clean_title || this.renkan.translate(this.options.label_untitled_nodes) || "";
_text = Utils.shortenText(_text, this.options.node_label_max_length);
if (typeof this.highlighted === "object") {
@@ -408,6 +415,7 @@
}
//when the mouse don't hover the node anymore, we hide it
if (this.hidden) {
+ this.renderer.removeRepresentationsOfType("editor");
this.hide();
}
else {