Add popup_editor and editor_panel option to allow the editor panel to bin in an external div
Update the scene, the node editor and the edge editor to include the options
--- a/client/js/defaults.js Mon Apr 27 17:23:14 2015 +0200
+++ b/client/js/defaults.js Tue May 05 17:59:14 2015 +0200
@@ -10,6 +10,10 @@
/* List of Bins */
static_url: "",
/* URL for static resources */
+ popup_editor: true,
+ /* show the node editor as a popup inside the renkan view */
+ editor_panel: 'editor-panel',
+ /* GUI continer DOM element ID of the editor panel */
show_bins: true,
/* Show bins in left column */
properties: [],
--- a/client/js/renderer/edgeeditor.js Mon Apr 27 17:23:14 2015 +0200
+++ b/client/js/renderer/edgeeditor.js Tue May 05 17:59:14 2015 +0200
@@ -138,8 +138,10 @@
}
},
redraw: function() {
- var _coords = this.source_representation.paper_coords;
- Utils.drawEditBox(this.options, _coords, this.editor_block, 5, this.editor_$);
+ if (this.options.popup_editor){
+ var _coords = this.source_representation.paper_coords;
+ Utils.drawEditBox(this.options, _coords, this.editor_block, 5, this.editor_$);
+ }
this.editor_$.show();
paper.view.draw();
}
--- a/client/js/renderer/nodeeditor.js Mon Apr 27 17:23:14 2015 +0200
+++ b/client/js/renderer/nodeeditor.js Tue May 05 17:59:14 2015 +0200
@@ -202,8 +202,10 @@
});
},
redraw: function() {
- var _coords = this.source_representation.paper_coords;
- Utils.drawEditBox(this.options, _coords, this.editor_block, this.source_representation.circle_radius * 0.75, this.editor_$);
+ if (this.options.popup_editor){
+ var _coords = this.source_representation.paper_coords;
+ Utils.drawEditBox(this.options, _coords, this.editor_block, this.source_representation.circle_radius * 0.75, this.editor_$);
+ }
this.editor_$.show();
paper.view.draw();
}
--- a/client/js/renderer/scene.js Mon Apr 27 17:23:14 2015 +0200
+++ b/client/js/renderer/scene.js Tue May 05 17:59:14 2015 +0200
@@ -14,7 +14,11 @@
this.onStatusChange();
this.canvas_$ = this.$.find(".Rk-Canvas");
this.labels_$ = this.$.find(".Rk-Labels");
- this.editor_$ = this.$.find(".Rk-Editor");
+ if (!_renkan.options.popup_editor){
+ this.editor_$ = $("#" + _renkan.options.editor_panel);
+ }else{
+ this.editor_$ = this.$.find(".Rk-Editor");
+ }
this.notif_$ = this.$.find(".Rk-Notifications");
paper.setup(this.canvas_$[0]);
this.scale = 1;