Improve the way we init the view. The data loader send a "loaded" event, hooked by the scene.py and initializing the backbone.history and the view.
We don't use redraw_active in save-once and full-json, because it was making the view initialization dependent of these file which are externals.
Small fix to hide the "set saved view" button when there is only one view.
define(['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {
'use strict';
var Utils = requtils.getUtils();
/* NodeEditButton Begin */
//var NodeEditButton = Renderer.NodeEditButton = Utils.inherit(Renderer._NodeButton);
var NodeEditButton = Utils.inherit(NodeButton);
_(NodeEditButton.prototype).extend({
_init: function() {
this.type = "Node-edit-button";
this.lastSectorInner = 0;
this.startAngle = this.options.hide_nodes ? -125 : -135;
this.endAngle = this.options.hide_nodes ? -55 : -45;
this.imageName = "edit";
this.text = "Edit";
},
mouseup: function() {
if (!this.renderer.is_dragging) {
this.source_representation.openEditor();
}
}
}).value();
/* NodeEditButton End */
return NodeEditButton;
});